Advertisement

Getting a handle

Started by March 28, 2001 08:06 AM
3 comments, last by Zeke 23 years, 10 months ago
I need to get the handle of a dialog box to use it in the procedure of another dialog box. There has to be a function for getting a handle something like GetHwnd or similar and Im sure I have used it before but I cant remember what it is and I have been searching MSDN all day and cant find a single thing about getting a handle. Can anyone help me out please? Thanks for your time Just my thoughts take them as you will. "People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face
Just my thoughts take them as you will. "People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face

Are you thinking of the FindWindow(Ex) API call? Check it out and see if that is what your looking for.

HTH,

-Z
Advertisement
Thanks for the reply but that wont work because it is a dialog box and not a window. Thanks for trying

Just my thoughts take them as you will.

"People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face
Just my thoughts take them as you will. "People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face


Point taken! Although, a dialog is also a window (sorry if it was already obvious!) . If the dialog was created without a parent, then it will show up with FindWindow.

How about EnumChildWindows? Although you will need to know the parents HWND for it to work.

-Z

Well, you could use a global variable. During the WM_INITDIALOG message of one dialog box, store the hwnd in a global variable. Then when you''re running the other dialog box, you can use the hwnd that you''ve stored previously.

Unless, you want something else?
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.

This topic is closed to new replies.

Advertisement