| View previous topic :: View next topic |
| Author |
Message |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Wed Jan 28, 2009 11:11 am Post subject: Win32 gui child window |
|
|
I was wondering if it was possible to create a child window with CreateWindow(Ex), that made the main window unaccessible until the child window is closed
Like in CE, when you open the Process List the main window gets unacessible untill the Process List is closed
Right now im using EnableWindow(), but i dont feel thats a proper way O.o
-Anden100
Last edited by Anden100 on Wed Jan 28, 2009 11:50 am; edited 1 time in total |
|
| Back to top |
|
 |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Wed Jan 28, 2009 11:32 am Post subject: |
|
|
I don't know much about this but...
..you can use CreateWindow for that too..
Also, show me how you called CreateWindowEx. |
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Wed Jan 28, 2009 11:33 am Post subject: |
|
|
| Code: | | procWnd = CreateWindowEx(WS_EX_STATICEDGE, "proclist", "Process List", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 210, 270, NULL, NULL, hProcInst, NULL); |
And why do you think i put Ex in a paranthese? () |
|
| Back to top |
|
 |
sloppy Expert Cheater
Reputation: 0
Joined: 17 Aug 2008 Posts: 123
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Thu Jan 29, 2009 4:57 am Post subject: |
|
|
| sloppy wrote: | | http://msdn.microsoft.com/en-us/library/ms644994.aspx#modal_boxes |
Im not using Dialogs..., im using CreateWindowEx... |
|
| Back to top |
|
 |
SXGuy I post too much
Reputation: 0
Joined: 19 Sep 2006 Posts: 3551
|
Posted: Thu Jan 29, 2009 8:38 am Post subject: |
|
|
| SetFocus on the new window i think. |
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Thu Jan 29, 2009 9:03 am Post subject: |
|
|
| SXGuy wrote: | | SetFocus on the new window i think. |
I dont thing SetFocus will disable the main window tho'.. |
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Thu Jan 29, 2009 1:26 pm Post subject: |
|
|
Start a message loop inside the thread your main thread to filter messages for your new window?
Or combine a bunch of functions such as SetActiveWindow, SetFocus, Beep and then filter WM_KILLFOCUS message and create a thread to call those functions.
I kinda wanna figure out how it actually works in Win32 as well... _________________
|
|
| Back to top |
|
 |
sloppy Expert Cheater
Reputation: 0
Joined: 17 Aug 2008 Posts: 123
|
Posted: Thu Jan 29, 2009 8:24 pm Post subject: |
|
|
| Anden100 wrote: |
Im not using Dialogs..., im using CreateWindowEx... |
Dialogs are designed to be modal. I recommend using them over EnableWindow() or filtering of the message loop. Implementation might be slightly different, but you can create and use dialogs much the same as a normal window. |
|
| Back to top |
|
 |
|