Click here to Skip to main content
15,920,513 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Set Text/Background colour of control in WTL Pin
CodeGuy6-Aug-01 6:49
CodeGuy6-Aug-01 6:49 
GeneralRe: Set Text/Background colour of control in WTL Pin
Christian Graus6-Aug-01 12:08
protectorChristian Graus6-Aug-01 12:08 
GeneralRe: Set Text/Background colour of control in WTL Pin
CodeGuy7-Aug-01 3:04
CodeGuy7-Aug-01 3:04 
GeneralRe: Set Text/Background colour of control in WTL Pin
Christian Graus7-Aug-01 3:20
protectorChristian Graus7-Aug-01 3:20 
GeneralRe: Set Text/Background colour of control in WTL Pin
CodeGuy7-Aug-01 3:35
CodeGuy7-Aug-01 3:35 
General(How to) Find a string in an ofstream file obj Pin
5-Aug-01 11:54
suss5-Aug-01 11:54 
GeneralRe: (How to) Find a string in an ofstream file obj Pin
Todd Smith5-Aug-01 16:28
Todd Smith5-Aug-01 16:28 
Generalmodeless dialog in wtl Pin
ov5-Aug-01 11:17
ov5-Aug-01 11:17 
I have a CDialogImpl-based class, implementing a modeless dialog. My application can have a number of such dialogs, so I'm using this code to create one:
CMyDialog *pDlg = new CMyDialog;
pDlg->Create(NULL);
pDlg->ShowWindow(SW_SHOW);
When user will press the close-button in the upper right corner of my dialog - I must destroy the object and the window, so I'm using DestroyWindow(); in WM_CLOSE handler and delete this; in OnFinalMessage().

The problem is that the program falls with ASSERT(pThis->m_pCurrentMsg == &msg) in atlwin.h, line 2281. Btw, if I close the main application - these dialogs are destroying without any ASSERTs...

How can I delete the class after the window have been destroyed?

With the best regards, Vitaly.
GeneralRe: modeless dialog in wtl Pin
Christian Graus5-Aug-01 13:47
protectorChristian Graus5-Aug-01 13:47 
GeneralRe: modeless dialog in wtl Pin
ov5-Aug-01 21:31
ov5-Aug-01 21:31 
GeneralRe: modeless dialog in wtl Pin
Todd Smith5-Aug-01 16:05
Todd Smith5-Aug-01 16:05 
GeneralRe: modeless dialog in wtl Pin
Michael Dunn5-Aug-01 21:14
sitebuilderMichael Dunn5-Aug-01 21:14 
GeneralRe: modeless dialog in wtl Pin
ov5-Aug-01 21:29
ov5-Aug-01 21:29 
GeneralRe: modeless dialog in wtl Pin
ov5-Aug-01 21:34
ov5-Aug-01 21:34 
GeneralRe: modeless dialog in wtl Pin
CodeGuy6-Aug-01 6:54
CodeGuy6-Aug-01 6:54 
GeneralWho's using a file on the LAN Pin
5-Aug-01 11:17
suss5-Aug-01 11:17 
GeneralRe: Who's using a file on the LAN Pin
Todd Smith5-Aug-01 16:36
Todd Smith5-Aug-01 16:36 
GeneralSyntax Coloring Class Pin
5-Aug-01 10:44
suss5-Aug-01 10:44 
GeneralCScrollView::OnDraw() - problems Pin
Mike Gaskey5-Aug-01 10:35
Mike Gaskey5-Aug-01 10:35 
GeneralEnter touch kills dialog base window Pin
5-Aug-01 10:27
suss5-Aug-01 10:27 
GeneralRe: Enter touch kills dialog base window Pin
Baafie5-Aug-01 11:15
Baafie5-Aug-01 11:15 
GeneralCrypto API Pin
Peter Liddle5-Aug-01 7:18
Peter Liddle5-Aug-01 7:18 
Generaljust a question... Pin
roel5-Aug-01 5:32
roel5-Aug-01 5:32 
GeneralRe: just a question... Pin
Baafie5-Aug-01 5:56
Baafie5-Aug-01 5:56 
GeneralRe: just a question... Pin
roel5-Aug-01 6:17
roel5-Aug-01 6:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.