Is it possible to create multiple dialogs? I found an example of "stacked/nested" dialogs here on the forums but the link is dead. However, I also want both dialogs to be visible at the same time. Here is a snippet of what I'm trying to do:


DlgProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM,lParam:LPARAM
.if uMsg== WM_INITDIALOG
invoke SetWindowPos,hWnd, HWND_TOPMOST,0,0,0,0,SWP_NOACTIVATE + SWP_NOMOVE + SWP_NOSIZE
invoke LoadBitmap,hInstance,2001         
invoke CreatePatternBrush,eax
mov brush, eax
invoke FindResource,hInstance,2002,RT_RCDATA
mov hResInfo,eax
invoke LoadResource,hInstance,hResInfo
mov hResData, eax
invoke SizeofResource,hInstance,hResInfo
mov sizeRsrc,eax
invoke LockResource,hResData
mov pRsrc, eax
invoke ExtCreateRegion,NULL,sizeRsrc,pRsrc
invoke SetWindowRgn,hWnd,eax,TRUE
.elseif uMsg==WM_CTLCOLORDLG
mov eax, brush
ret
.elseif uMsg==WM_COMMAND
.if eax == 1002
invoke DialogBoxParam,hInstance,1003,hWnd, addr PopProc, NULL
.endif
mov eax,wParam
.elseif uMsg==WM_LBUTTONDBLCLK
invoke SendMessage,hWnd,WM_CLOSE,0,0
.elseif uMsg==WM_LBUTTONDOWN
invoke SendMessage,hWnd,WM_NCLBUTTONDOWN,HTCAPTION,lParam
.elseif uMsg == WM_CLOSE
invoke DeleteObject,brush
invoke EndDialog, hWnd, 0
.endif


So, I want to pop-up another dialog when the user presses my button "info". However, the dialog is not showing up :/
Posted on 2010-03-31 16:51:05 by fel0n
A dialog is, by design, supopsed to "pop up" when a program needs some feedback from the user. It, in itself, is a popup window. What you want to make is possible and technically correct, but bad design-wise and maybe even confusing to the end-user. Try creating a normal overlapped window instead.
Posted on 2010-03-31 17:03:00 by ti_mo_n
I resolved my code and now have both dialogs popping up :D I forgot to move the wParam into eax for the compare!
Posted on 2010-04-01 17:14:49 by fel0n