Create a special child window

I want to create a sub window, that when it is created, I wont be able to browse back to the previous window untill that window is closed (like, I cant focus with the mouse the other window untill I'll finish dealing with the current window as a user) I hope you understand that..
so like, I have a room loby, and when I click a button such as "Create Room", which opens a sub window...

Here is what I wrote:

1
2
3
4
5
	CreateRoom_MainHwnd = CreateWindowEx(WS_EX_CLIENTEDGE , "RoomCreateClass", "Create Room", WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX
		| WS_MAXIMIZEBOX, NULL, NULL, 400, 300, MainHwnd, NULL, RoomCreateInstance, NULL);

	ShowWindow(CreateRoom_MainHwnd, SW_SHOW);
	UpdateWindow(CreateRoom_MainHwnd);


Thanks!
Last edited on
You want a modal dialog.
Thank you very much!!
Topic archived. No new replies allowed.