Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CPrintDialog problem

CPrintDialog problem

Scheduled Pinned Locked Moved C / C++ / MFC
c++comdata-structureshelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    Wouter Dhondt
    wrote on last edited by
    #1

    I'm losing all my hair on this one. In my app, I create a CPrintDialog like this: CPrintDialog dlg(FALSE); 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 AfxWndProcBase(HWND__ * 0x0012e870, unsigned int 1240072, unsigned int 1239180, long 1239124) line 220 + 21 bytes function: ///////////////////////////////////////////////////////////////////////////// // The WndProc for all CWnd's and derived classes LRESULT CALLBACK AfxWndProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam) { // special message which identifies the window as using AfxWndProc if (nMsg == WM_QUERYAFXWNDPROC) return 1; // all other messages route through message map CWnd* pWnd = CWnd::FromHandlePermanent(hWnd); ASSERT(pWnd != NULL); // ASSERT FAIL HERE ASSERT(pWnd->m_hWnd == hWnd); return AfxCallWndProc(pWnd, hWnd, nMsg, wParam, lParam); } Any ideas? I'm thinking of some conflicting resources... New and improved: kwakkelflap.com

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups