I want to create a "replace/find text" window that belongs to the application window. This is not the problem. But I want to give the user the possebility to click into the main window. The child window is created by DialogBoxParam. Until now the user only hears a "ping". I've read iczelion's tutorials. But nothing has changed. Why?

Some informations:
application-main window:


exstyle: WS_EX_LEFT or WS_EX_ACCEPTFILES
style: WS_OVERLAPPEDWINDOW or WS_CLIPCHILDREN or WS_CLIPSIBLINGS


resource:


DIALOG_FindReplace DIALOGEX 10, 10, 268, 75

STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "FindReplace"
FONT 8, "MS SANS SERIF", 700, 0 /*FALSE*/

BEGIN
;....
END


:confused:
Posted on 2002-07-02 05:43:00 by Marwin
To allow access to the parent window, the child dialog box must be created with one of the CreateDialog* functions. These functions will create a modeless dialog box which is what you want as opposed to modal dalog box which is what DialogBox* do.

Check out the win32 api help file for more info..
Posted on 2002-07-02 06:41:22 by MArtial_Code
Yes, as MArtial_Code said, use CreateDialogParam function to create a modeless dialog. For it to be topmost, use SetWindowPos, like so:
invoke SetWindowPos, [hDialog], HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE OR SWP_NOSIZE
Posted on 2002-07-02 10:33:22 by comrade
Do you really want topmost, or do you simply want the dialog box to be always over the main window?

You always specify an owner (parent) window (although it can be NULL). The owner window will always be behind the dialog box, and when you minimize the owner window, the dialog box will be hidden.
Posted on 2002-07-02 14:53:26 by tenkey