Is there an easy way to nest dialogs?  I get the error window class not found when I try to call another one on top of my main one.  I searched all over for info and thought i'd try making my main window an actual "window" with a dialog.  So far I haven't been very successful.  I have read the Iczellion tutorials on the matter and i'm a little confused.  I don't know much about window messages and dealing with them so I was hoping there was an easier way to do it.  I can get my dialog created with winmain to come up but it doesn't respond to any messages.  I have worked on my main dialog a lot so i'm hoping there is an easy way to do this  :sad:
Posted on 2005-09-09 00:34:48 by Desp
Hmmm... ok so you got your'e main dialog and that's up and running then is it?

The way i normally go about it (hope someone does'nt shoot me and say i'am wrong) :

there are a couple of messages sent thru to a dialog once running... the most
important for me was
WM_INITDIALOG  ; gets sent before window is created
WM_CLOSE          ; gets sent when the windows is about to be destroyed
Posted on 2005-09-09 08:04:57 by Draakie
oops .... cat jumped on the post button before i was done

anyway as i was saying...

WM_COMMAND ; sent to window item or items when user does something

you can get these Window-dialog messages by looking at the > uMsg < parameter

mov eax, uMsg
  ; any initialization code for you APP here
.elseif eax==WM_COMMAND
  ; user did something and we need to respond
.elseif eax==WM_CLOSE
; some closing arguments by you here
  invoke EndDialog,NULL

obviously this does'nt even begin to describe all the messages that a dialog could
have sent to it.
Hey I tried.
Good luck ---> those tutorials shipped with RADASM should help you out more
Posted on 2005-09-09 08:13:20 by Draakie
Ok, I have gotten a little further.  I can create as many dialogs as I want but I have one problem.  How do I get the hWnd of the dialog?  I am trying to call GetDlgItem and it says it can't find the resource ID.  The hWnd of the main window is being passed to the call but it is not finding the control.  How do I get the hWnd of a dialog that is created with WinMain?  For some reason it is not working right.

EDIT: I found out what the problem was.  I was using WM_CREATE instead of WM_INITDIALOG.  Problem fixed :)
Posted on 2005-09-10 19:11:05 by Desp