please help me.. i have a project use mdi application. my question is, how to check mdi child already running or not..? please help me..
A:
When you created the MDI window, you used WM_MDICREATE right? Well that message returns a window handle, You should save that handle somewhere so that you can refer to it if you want to find the window later or check to see if it exists.
MDICREATESTRUCT mci;
// fill out mci...
HWND hwndChild = (HWND) SendMessage(hwndMDI, WM_MDICREATE, 0, (LPARAM)(ULONG_PTR)&mci);
// save hwndChild so that I can use it later.
John Knoeller
2010-03-03 02:42:01
Also consider using http://msdn.microsoft.com/en-us/library/ms633494(VS.85).aspx if you've "lost" the handle.
taspeotis
2010-10-24 10:54:57