im new at sdk
n here is my question
i have created 2 windows with the same Windows class
what am i trying to do is to close one window first n when the other(the second one) window is closed or Destroyed as well, then the application will terminate(WM_QUIT will not be sent until both windows have been closed)
i know it has somthing to do with hwnd but how?
than you.

here is the code(when i close either window, they both close and application terminates):
Code:
LRESULT CALLBACK WindowProc(HWND hwnd,
							UINT msg,
							WPARAM wparam,
							LPARAM lparam)
{
	switch(msg)
	{
	case WM_CREATE:
		{

			// return success
			return(0);
		} break;

	case WM_DESTROY:
		{
			PostQuitMessage(0);

			return(0);
		} break;

	default:break;

	} 

	return (DefWindowProc(hwnd, msg, wparam, lparam));

} // end WindProc