Click here to Skip to main content
15,890,882 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problems with CArray Updated Pin
Tomasz Sowinski30-Aug-02 1:12
Tomasz Sowinski30-Aug-02 1:12 
GeneralRe: Problems with CArray Updated Pin
jhwurmbach30-Aug-02 3:20
jhwurmbach30-Aug-02 3:20 
GeneralRe: Problems with CArray Updated Pin
Tomasz Sowinski30-Aug-02 3:21
Tomasz Sowinski30-Aug-02 3:21 
GeneralRe: Problems with CArray Updated Pin
jhwurmbach30-Aug-02 3:48
jhwurmbach30-Aug-02 3:48 
GeneralProblems with CArray Pin
Koep30-Aug-02 0:48
Koep30-Aug-02 0:48 
GeneralRe: Problems with CArray Pin
mishgun30-Aug-02 1:35
mishgun30-Aug-02 1:35 
GeneralRe: Problems with CArray Pin
Koep30-Aug-02 1:43
Koep30-Aug-02 1:43 
GeneralCPrintDialog problem Pin
Wouter Dhondt29-Aug-02 23:58
Wouter Dhondt29-Aug-02 23:58 
I'm losing all my hair on this one.

In my app, I create a CPrintDialog like this:

CPrintDialog dlg(FALSE);<br />
dlg.DoModal();


which is very basic stuff. Running this, the dialog appears. When I select the printer properties, the app closes itself without a message! So I created a new app with the MFC wizard. In this app, I've put the same code. And guess what: no problems at all. The printer properties are shown without a problem.

To make things worse, I only have this problem in NT SP6. No problem in W2K. Haven't tested this on other windows versions...

In debugging, I get an assertion.
Pressing retry on the assertion:
call stack:
AfxWndProc(HWND__ * 0x0012e870, unsigned int 1240072, unsigned int 1239180, long 1239124) line 365 + 25 bytes<br />
AfxWndProcBase(HWND__ * 0x0012e870, unsigned int 1240072, unsigned int 1239180, long 1239124) line 220 + 21 bytes

function:
/////////////////////////////////////////////////////////////////////////////<br />
// The WndProc for all CWnd's and derived classes<br />
<br />
LRESULT CALLBACK<br />
AfxWndProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)<br />
{<br />
	// special message which identifies the window as using AfxWndProc<br />
	if (nMsg == WM_QUERYAFXWNDPROC)<br />
		return 1;<br />
<br />
	// all other messages route through message map<br />
	CWnd* pWnd = CWnd::FromHandlePermanent(hWnd);<br />
	ASSERT(pWnd != NULL); // ASSERT FAIL HERE	ASSERT(pWnd->m_hWnd == hWnd);<br />
	return AfxCallWndProc(pWnd, hWnd, nMsg, wParam, lParam);<br />
}


Any ideas? I'm thinking of some conflicting resources...

New and improved: kwakkelflap.com
GeneralRecompiler Engine Pin
Joel Holdsworth29-Aug-02 23:55
Joel Holdsworth29-Aug-02 23:55 
GeneralRe: Recompiler Engine Pin
Tomasz Sowinski30-Aug-02 0:03
Tomasz Sowinski30-Aug-02 0:03 
GeneralRe: Recompiler Engine Pin
Joel Holdsworth30-Aug-02 0:26
Joel Holdsworth30-Aug-02 0:26 
GeneralRe: Recompiler Engine Pin
Tomasz Sowinski30-Aug-02 0:37
Tomasz Sowinski30-Aug-02 0:37 
Generalload file in buffer Pin
Brakanjan29-Aug-02 22:44
Brakanjan29-Aug-02 22:44 
GeneralRe: load file in buffer Pin
jmkhael29-Aug-02 23:31
jmkhael29-Aug-02 23:31 
GeneralRe: load file in buffer Pin
Brakanjan30-Aug-02 2:49
Brakanjan30-Aug-02 2:49 
GeneralRe: load file in buffer Pin
Brakanjan30-Aug-02 2:56
Brakanjan30-Aug-02 2:56 
GeneralRe: load file in buffer Pin
pépé30-Aug-02 4:18
pépé30-Aug-02 4:18 
GeneralTree control alignment Pin
Anonymous29-Aug-02 22:40
Anonymous29-Aug-02 22:40 
GeneralRe: Tree control alignment Pin
Tomasz Sowinski29-Aug-02 23:34
Tomasz Sowinski29-Aug-02 23:34 
GeneralAccess of PropertyPage members Pin
Arjan Schouten29-Aug-02 22:39
Arjan Schouten29-Aug-02 22:39 
GeneralRe: Access of PropertyPage members Pin
Pavel Klocek29-Aug-02 23:17
Pavel Klocek29-Aug-02 23:17 
GeneralRe: Access of PropertyPage members Pin
Arjan Schouten29-Aug-02 23:33
Arjan Schouten29-Aug-02 23:33 
GeneralA question about a strange "extern" statement. Pin
George Ma29-Aug-02 22:30
George Ma29-Aug-02 22:30 
GeneralRe: A question about a strange "extern" statement. Pin
Dominik Reichl29-Aug-02 22:41
Dominik Reichl29-Aug-02 22:41 
GeneralRe: A question about a strange "extern" statement. Pin
Tomasz Sowinski29-Aug-02 23:42
Tomasz Sowinski29-Aug-02 23:42 

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.