would it be creating a child window if i were to want a button to be clicked and have a new dlg popup?

would i use something like this?
invoke CreateDialogParam,hInstance,IDD_DLG,hWnd,addr WndProc,0

and if so what would i define IDD_DLG as???

thanx loads:grin:
Posted on 2002-03-09 23:20:24 by sToNeRiFiK
The second parameter can either be name of the dialog box or the resource identifier of the dialog box.



Example One: String Style

in the .rc file

MyDialog DIALOG....

in your asm file, you have to create the same name of the dialog resource.

.DATA

Dlg2 DB "MyDialog", 0

.CODE

CreateDialogParam,hInstance,OFFSET Dlg2,hWnd,addr WndProc,0


or



Example Two: Equates style

in the .rc file

200 DIALOG....

.CONST
IDD_DLG EQU 200

.CODE
CreateDialogParam,hInstance,IDD_DLG,hWnd,addr WndProc,0



Remember to create another procedure that will handle the messages of the new dialog box.

Here's an example: http://www.asmcommunity.net/board/index.php?topic=4011&pagenumber=2 d/l the .zip file :)
Posted on 2002-03-09 23:33:29 by stryker
that link didnt work :(

and about the function, can i also use it if im not using a resource editor? like if im coding the dlg box with like a WinMain thingy?
and having WndProc define the dlg box?
Posted on 2002-03-10 11:49:03 by sToNeRiFiK
The link didn't work??? On that link there's a zip file for d/l and it contains an example on how to handle multiple dialog boxes.
and about the function, can i also use it if im not using a resource editor? like if im coding the dlg box with like a WinMain thingy? and having WndProc define the dlg box?
You mean you "initialize" your dialog box on Winmain and let WndProc handle the messages of that dialog box? Yes, you can. Just be sure to make each dialog boxes have their own message handling procedure. For example, your main dialog box is handled by the WndProc, if you have several dialog boxes, they too must have their own message handling procedure and must not rely on the WndProc procedure.
Posted on 2002-03-10 12:06:17 by stryker