|
-
March 30th, 1999, 03:15 AM
#1
How to paint a CDialog - object without calling DoModal?
I have created a dialog - box with my resource construction kit. Now I want to show or hide this object relating to program - structure. I dont want to use the DoModal-function, because this function waits for user - action (there is no user - editable part inside at all).
Is there a possibility to create, draw and clear this object without using DoModal? Can I handle the CDialog - object like a CWnd - Object and attach it as a child to my mainwindow?
The other possiblity I think is to leave the DoModal function with creating a message-map and getting a timer - message. So I can insert my cade - parts and end the dialog with EndDialog(). But what kind of message must I wait for? Is there a WM - Message or somewhat which makes it able to jump immediately (milliseconds or so :-)) ) to my code??
Best regards
Andreas
-
March 30th, 1999, 09:20 AM
#2
Re: How to paint a CDialog - object without calling DoModal?
It sounds as if you need a modeless dialog, so try calling CDialog::Create() rather than DoModal(). This will allow you to treat it like a CWnd object.
-
March 30th, 1999, 12:41 PM
#3
Re: How to paint a CDialog - object without calling DoModal?
Many thanks, it works fine!
-
November 29th, 1999, 09:32 AM
#4
Re: How to paint a CDialog - object without calling DoModal?
Create modeless Dialog
1)Create a Dialog
2)Create a new class to this dialog
3)create a MV associated with your dialog class in your View class
4) Add header file of your dialog class in your view class header file
call Create method to the MV of dialog
and then call
ShowWindow(SW_SHOW);
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
|