Click here to Skip to main content
15,896,557 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Need help with using struct with template - syntax problem Pin
Cedric Moonen16-Sep-07 20:33
Cedric Moonen16-Sep-07 20:33 
QuestionErrors in David Nash's code for Win API Pin
Larry Mills Sr16-Sep-07 13:38
Larry Mills Sr16-Sep-07 13:38 
AnswerRe: Errors in David Nash's code for Win API Pin
Michael Dunn16-Sep-07 15:57
sitebuilderMichael Dunn16-Sep-07 15:57 
QuestionFile reading Pin
Jelle De Vos16-Sep-07 11:43
Jelle De Vos16-Sep-07 11:43 
AnswerRe: File reading Pin
Christian Graus16-Sep-07 12:25
protectorChristian Graus16-Sep-07 12:25 
GeneralRe: File reading Pin
David Crow17-Sep-07 2:58
David Crow17-Sep-07 2:58 
AnswerRe: File reading Pin
Hamid_RT16-Sep-07 19:14
Hamid_RT16-Sep-07 19:14 
QuestionAssert Modal Dialog wincore.cpp Pin
zqueezy16-Sep-07 11:19
zqueezy16-Sep-07 11:19 
hey folks,
i stumbled across an assertion in my program. When I want to show a dialog modally the dialog is shown correctly, but when I close the dialog I get an assert:
"Debug assertion failed! ... program ...wincore.cpp line 882" which is:
void CWnd::AssertValid() const
{
	if (m_hWnd == NULL)
		return;     // null (unattached) windows are valid

	// check for special wnd??? values
	ASSERT(HWND_TOP == NULL);       // same as desktop
	if (m_hWnd == HWND_BOTTOM)
		ASSERT(this == &CWnd::wndBottom);
	else if (m_hWnd == HWND_TOPMOST)
		ASSERT(this == &CWnd::wndTopMost);
	else if (m_hWnd == HWND_NOTOPMOST)
		ASSERT(this == &CWnd::wndNoTopMost);
	else
	{
		// should be a normal window
		ASSERT(::IsWindow(m_hWnd));    //<-- HERE


My code is farely simple:
CSelectionDlg dlg;
dlg.DoModal();

the thing is: I call this from a member-class:
-MyDialogDlg                        my dialog
-SomeClass m_instanceOfClass;       a memberclass of dialog.
                                    a function of Someclass does the above code


I found some stuff from microsoft:
http://support.microsoft.com/kb/194300/eng
which didn't work for my case!
if I add
ASSERT(::IsWindow(m_hWnd));
before the domodal nothing changes... so somehow my handle gets lost and I donnu what to do. can anybody help? maybe a simple link. i tried many links, although nothing worked for my case. I don't have any crazy stuff in my OnInit of the dialog nor do I have another dialog as model dialog

thx for your help
zqueezy
AnswerRe: Assert Modal Dialog wincore.cpp Pin
Hamid_RT16-Sep-07 19:19
Hamid_RT16-Sep-07 19:19 
GeneralRe: Assert Modal Dialog wincore.cpp Pin
zqueezy16-Sep-07 20:40
zqueezy16-Sep-07 20:40 
GeneralRe: Assert Modal Dialog wincore.cpp Pin
Roger Broomfield16-Sep-07 22:05
Roger Broomfield16-Sep-07 22:05 
QuestionTime delay Pin
pourang16-Sep-07 10:59
pourang16-Sep-07 10:59 
AnswerRe: Time delay Pin
Garth J Lancaster16-Sep-07 12:52
professionalGarth J Lancaster16-Sep-07 12:52 
GeneralRe: Time delay Pin
pourang16-Sep-07 23:14
pourang16-Sep-07 23:14 
AnswerRe: Time delay Pin
David Crow17-Sep-07 3:08
David Crow17-Sep-07 3:08 
GeneralRe: Time delay Pin
pourang17-Sep-07 6:28
pourang17-Sep-07 6:28 
Questionerror message meaning Pin
jada092316-Sep-07 10:32
jada092316-Sep-07 10:32 
AnswerRe: error message meaning Pin
Michael Dunn16-Sep-07 15:59
sitebuilderMichael Dunn16-Sep-07 15:59 
QuestionRe: error message meaning Pin
David Crow17-Sep-07 3:11
David Crow17-Sep-07 3:11 
QuestionMemory leaks with malloc/realloc . . . Pin
madpuppy16-Sep-07 6:31
madpuppy16-Sep-07 6:31 
AnswerRe: Memory leaks with malloc/realloc . . . Pin
Mark Salsbery16-Sep-07 7:45
Mark Salsbery16-Sep-07 7:45 
GeneralRe: Memory leaks with malloc/realloc . . . Pin
DevMentor.org17-Sep-07 4:47
DevMentor.org17-Sep-07 4:47 
GeneralRe: Memory leaks with malloc/realloc . . . Pin
Mark Salsbery17-Sep-07 6:42
Mark Salsbery17-Sep-07 6:42 
Questionmessage-handler function for popup menu created at runtime Pin
blackbondi16-Sep-07 5:40
blackbondi16-Sep-07 5:40 
AnswerRe: message-handler function for popup menu created at runtime Pin
Abdellatif_El_Khlifi23-Sep-07 13:02
Abdellatif_El_Khlifi23-Sep-07 13:02 

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.