Hi,
How can I create modal windows, i.e. windows that are always in foreground of your application (application modal).
Thank you
W116,
a modal dialog box/window should be a pop-up window having a System menu, a title bar, and a thick border; that is, the dialog box template should specify the WS_POPUP, WS_SYSMENU, WS_CAPTION, and DS_MODALFRAME styles.
Hope it help Angelo
You can easly:
invoke SetWindowPos, hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
where hWnd is the handle to the window you create, if you want to make it "always-on-top" after you created the window, or use the WS_EX_TOPMOST flag when you invoke the CreateWindowEx to create your window (is the first parameter)
invoke CreateWindowEx,WS_EX_TOPMOST,
ADDR szClassName,
ADDR szDisplayName,
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0,
CW_USEDEFAULT, 0,
NULL, NULL,
hInst, NULL
This message was edited by Cip, on 5/11/2001 1:19:01 PMThank you for your help!
But what I want is an application modal window, not a system modal one.
Please help!
Create dialog, or normal window and fill hParent.
It'll block access to main window untill closed.