flat assembler
Message board for the users of flat assembler.

Index > Windows > Closing Dialogs.

Author
Thread Post new topic Reply to topic
calpol2004



Joined: 16 Dec 2004
Posts: 110
calpol2004 11 Feb 2006, 11:30
in my application you login in a dialog, then a second dialog pops up, unfortunatly im having trouble making the login window disappear when the new one appears. ive tried using endialog before and after the DialogBoxParam and using ShowWindow set to SW_HIDE. i could use some kind of function in the WM_INITDIALOG message in the new dialog however im having trouble getting any function in the new dialog boxes proc to be able to use the previous dialogs HWND. i think i could use findwindow or something but my dialogs don't have a WNDCLASS, is there any other way?
Post 11 Feb 2006, 11:30
View user's profile Send private message MSN Messenger Reply with quote
calpol2004



Joined: 16 Dec 2004
Posts: 110
calpol2004 11 Feb 2006, 15:01
i tried making the login window the parent then in the new window i made it use GetParent() then end the old window using the handle returned, this worked however the new window didn't have its own space in the taskbar. i tried using code from the "USECOM" example to make it "show" in the taskbar, this half worked, it had a place however the window wasnt entirely associated with it. when the window minimized it wouldn't minize into its taskbar space but into the bottom left corner and the title bar would sit there just above the "start" button. anyway i need some timeout this is stressing me out a bit Evil or Very Mad. anyway heres the code (i took out the messy code which i described above which only half worked) i'd be grateful if you could just take a quick look at my code and maybe give me some advice (by the way the username and password are both "test").

it's supposed to be a chat room, im currently setting up my server to interact with the program, though sooner i get the UI done for this the better.


Description:
Download
Filename: project.zip
Filesize: 2.47 KB
Downloaded: 226 Time(s)

Post 11 Feb 2006, 15:01
View user's profile Send private message MSN Messenger Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend 11 Feb 2006, 17:35
Do like this:
- create a dword variable initialized to 0 named hwnd_global (or sth similar)
- in wm_initdialog handler:
* check if [hwnd_global] == 0
* if yes copy [hwnddlg] to [hwnd_global]
* if no skip over to the next task (ie. do nothing)
- now pass the [hwnd_global] value to ShowWindow or EndDialog when needed
Post 11 Feb 2006, 17:35
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.