|
-
Feb 26th, 2001, 02:09 PM
#1
Thread Starter
Frenzied Member
How do I get another window in the same instance as my orginal but have its own control? When I try it, if I close the second window it ends the program. I dont want that. When I create another window away from the instance, it becomes modal and it will not let me interact with first window. Prob something simple I am sure.
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Feb 26th, 2001, 02:41 PM
#2
Monday Morning Lunatic
Have a separate window procedure for the second window, unless they're identical, in which case don't call PostQuitMessage unless all the windows have closed.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Feb 26th, 2001, 02:57 PM
#3
Thread Starter
Frenzied Member
Should it use the same class and instance? Or should I create a new one?
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Feb 26th, 2001, 02:57 PM
#4
Monday Morning Lunatic
Huh? Are you using MFC or some other framework method?
Either way I think a separate instance is better.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Feb 26th, 2001, 03:01 PM
#5
Thread Starter
Frenzied Member
No standard windows api. Sorry I realized asking about the class was stupid after I hit post. I meant the windows class you register, and the answer is no. But I will create a new instance and see if that works.
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Feb 26th, 2001, 03:04 PM
#6
Monday Morning Lunatic
You can use the same window class (I see what you mean now, sorry!). But you may need to find some way of differentiating between the two windows in the event handler -- try using SetWindowLong(..., GWL_USERDATA) and GetWindowLong to store identifiers.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Feb 26th, 2001, 03:29 PM
#7
Thread Starter
Frenzied Member
Ok I got it to work. Thanks for that SetWindow And GetWindow, I would not have tought of that.
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Feb 26th, 2001, 04:06 PM
#8
Monday Morning Lunatic
Neither did I...I first noticed it in Microsoft's COM samples in the platform SDK and thought "that's a good idea"...so I used it in my Window class.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Feb 26th, 2001, 04:09 PM
#9
Thread Starter
Frenzied Member
Got another question, how do you have a window that is not displayed in the title bar?
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Feb 26th, 2001, 04:11 PM
#10
Thread Starter
Frenzied Member
I mean task bar. I need to get more sleep.
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Feb 26th, 2001, 04:16 PM
#11
Monday Morning Lunatic
It's gibbering something about Tool Windows in the help...
Okay -- the only reasonable thing I can find is:
1. Create a hidden window
2. Use that as the parent of your window
This will prevent a taskbar button...hopefully
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Feb 26th, 2001, 04:31 PM
#12
Thread Starter
Frenzied Member
Yuck!!!!
There must be a better way.
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|