Wince6.0 - closing multiple modeless child dialog from parent window

I am new to VC++ window programming. I created a small window application using MFC. From the parent window, I can create an instance of Modeless dialog from a button "New Dialog" click. I would like to close all those Child Dialogs by clicking on another button "Close All". The following seems work fine, on Windows 7, although I am not sure if I am doing it the right way.
1
2
3
4
5
6
7
8
9
10
    do{
	hSession = ::GetWindow(m_hWnd,GW_ENABLEDPOPUP);		
	if(hSession)
	{
		if(::GetParent(hSession)==m_hWnd)
		   ::DestroyWindow(hSession);
		else if(hSession == m_hWnd)
		   break;
	}
    }while (hSession);

The questions is, when I tried to port this to Wince6.0, GW_ENABLEDPOPUP is not supported. Can someone enlighten me a work around solution for Wince6.0?

cash
Last edited on
Topic archived. No new replies allowed.