-
November 2nd, 2019, 09:56 AM
#1
CDialog not getting closed in one click
I have created a dialog (class derived from CDialog) and having one OK button in it.Problem is sometimes dialog dont get close in one go when ok button is pressed.I have debugged the code ,destructor of dialog class is getting properly called,I have also used OnDestroy() method and ON_WM_DESTROY() message.
-
November 2nd, 2019, 12:03 PM
#2
Re: CDialog not getting closed in one click
Is it a modal or modeless dialog?Is you application a single- or multithreaded?
How does you dialog's OnOK() look like?
Victor Nijegorodov
-
November 2nd, 2019, 12:56 PM
#3
Re: CDialog not getting closed in one click
It is a Modal Dialog..Application is Single threaded. Code for OnOK() is as follows:
Code:
Void handleOK()
{
CDialog::OnOK();
}
Note: handleOk has been declared in header file and also mapped with IDOK in message map.
-
November 2nd, 2019, 02:04 PM
#4
Re: CDialog not getting closed in one click
Originally Posted by Beginner_MFC
It is a Modal Dialog..Application is Single threaded. Code for OnOK() is as follows:
Code:
Void handleOK()
{
CDialog::OnOK();
}
Note: handleOk has been declared in header file and also mapped with IDOK in message map.
Put a breakpoint in the method, press F5 to start debugging and see if the breakpoint gets hit when you click the OK button.
Tags for this Thread
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
|