Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / How to get a "hWndInsertAfter" Value?

Author
Message
MSon
19
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 11th Apr 2008 14:15 Edited at: 11th Apr 2008 14:20
Sorry for all these questions im posting at the moment, but trying to get a grip on using the MSDN Database as its good for adding features to things like BlueGui.

hWndInsertAfter seems to refer to the zPositon of a Window, with the highest Number being the Window which is forced to the front, but how can i gain the required number for a Front object, or the hWndInsertAfter value for an existing window?

IE


Everyone Be Cool, You, Be Cool.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Apr 2008 14:59
I believe you want GetForegroundWindow.

MSon
19
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 11th Apr 2008 15:36 Edited at: 11th Apr 2008 15:48
Quote: "hWndInsertAfter
[in] A handle to the window to precede the positioned window in the Z order. This parameter must be a window handle or one of the following values."


I think i Mis-Read it origionally, I thought it was like a Sprite priority Value...
So If hWndInsertAfter = GetForegroundWindow, Then it will place it infront of the Foreground Window?

i'll try that, Thanks again

Everyone Be Cool, You, Be Cool.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 11th Apr 2008 17:56
There are also some predefined values for top/bottom/topmost/not topmost.

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Apr 2008 19:50
True and it's probably the better method to use.

Set the hWndInsertAfter to the value of HWND_TOP, set x/y/cx/cy values to zero, and then set the flags to (SWP_NOMOVE || SWP_NOSIZE) ... although you may need to experiment a bit with the flags, those ones you'll definitely need.

Login to post a reply

Server time is: 2024-04-25 13:35:30
Your offset time is: 2024-04-25 13:35:30