DvbDream Community

- No topics related to illegal ways of watching TV ! -
It is currently Sat May 18, 2013 8:28 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Nov 09, 2007 4:05 pm 
Offline
Just can't stay away

Joined: Sun Nov 04, 2007 3:49 pm
Posts: 40
Hi Rel,

Please let me know how to get the position and size of the DD video panel, which is the window actually show the video.
I guess these events would provide the video panel information, please correct me if I am wrong:
DDEVENT_BEFORE_RESIZE
DDEVENT_AFTER_RESIZE
DDEVENT_BEFORE_DISPLAYMODE
DDEVENT_AFTER_DISPLAYMODE
DDEVENT_AFTER_INITIALITION

And how to get the position and size for the DD video panel from EventParams?

Thanks

_________________
Twinhand 1027
XP
AMD X2 5600
Geforce 8600


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 09, 2007 11:11 pm 
Offline
relocation
User avatar

Joined: Fri Jun 16, 2006 9:50 am
Posts: 1561
To get window handle,
EventParams is a pointer to HWND for DDEVENT_AFTER_INITIALITION

hWindow = *((HWND *) (EventParams))

you can then get the window size with Windows API
RECT rWin;
GetWindowRect(hWindow, &rWin);


You must check and update this value after every DDEVENT_AFTER_RESIZE event.

---------------------

Alternatively you can use DDEVENT_AFTER_RESIZE to get the values:

EventParams is a pointer to a pointer of WINDOWPOS. (double reference)
DDEVENT_AFTER_RESIZE


typedef struct _WINDOWPOS { // wp
HWND hwnd;
HWND hwndInsertAfter;
int x;
int y;
int cx;
int cy;
UINT flags;
} WINDOWPOS;


usage must be something like following line in C
(WINDOWPOS *) ((void *)(*EventParams))


(WINDOWPOS *) ((void *)(*EventParams))->x
(WINDOWPOS *) ((void *)(*EventParams))->Y
(WINDOWPOS *) ((void *)(*EventParams))->cx (width)
(WINDOWPOS *) ((void *)(*EventParams))->cy (height)

_________________
DVB Dream - because I have to dream about having time to code it


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group