How do I the handle of a child window while only know its ID? I tried to type-cast with (HWND) but that didn't work...
This is a discussion on Getting the handle of a child window while only knowing its ID within the Windows Programming forums, part of the Platform Specific Boards category; How do I the handle of a child window while only know its ID? I tried to type-cast with (HWND) ...
How do I the handle of a child window while only know its ID? I tried to type-cast with (HWND) but that didn't work...
Please direct all complaints regarding this post to the nearest brick wallHave a nice day.
If you know its parent window/dialog
hWnd=GetDlgItem(hParent,ID);
may work if it is a control.
If it is a window or dialog you created I suggest storing the HWNDs in an array.
Also create some #defines for the indexes.
(I have a struct I store window data like HDC's, bitmaps ect in.)
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill