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. Problem with CPropertySheet class

Problem with CPropertySheet class

Scheduled Pinned Locked Moved C / C++ / MFC
c++wpfcomhelpquestion
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.
  • S Offline
    S Offline
    spielehelfer
    wrote on last edited by
    #1

    Hi, I've got some Problems with CPropertySheet in the development of a C++ application in emVC++. Problem is: I have a PropertySheet width 4 pages (all same size 260*92); but they all get cut of at the right side. So I startet do derive a class from CPropertySheet and overwrite the OnInit Method like in this project: Free size and extended styles in CPropertySheets This brought me a few Problems: - the CPropertyPage* pppg = GetActivePage(); causes access violation so I changed it into CPropertyPage* pppg = GetPage(0); (curious from outside, in the dialog class i can use GetActivePage(), inside I only get a 0x0 pointer) - also the pppg->MapDialogRect(rcOriginal); causes access violation and all other Methods that later on uses pppg too. This brings me down to the problem that I cannot read out the PropertyPage size on runtime and have to use fixed values to resize. so only these lines had been left from all the code: BOOL bResult = CPropertySheet::OnInitDialog(); ModifyStyleEx(0, WS_EX_TOOLWINDOW); CRect rcModified; //Tab GetTabControl()->GetWindowRect(rcModified); ScreenToClient(&rcModified); rcModified.right +=50; GetTabControl()->SetWindowPos( NULL, 0,0, rcModified.Width(), rcModified.Height(), SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOZORDER | SWP_NOACTIVATE ); //Sheet GetWindowRect(rcModified); ScreenToClient(&rcModified); rcModified.right +=50; SetWindowPos( NULL, 0,0, rcModified.Width(), rcModified.Height(), SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOZORDER | SWP_NOACTIVATE ); Anyone has an idea why I cannot acces the ActivePage() or also the work with the PropertyPage reference loaded by GetPage(0) causes access violations?

    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