Locked PSH_USECALLBACK doesn't work in VS2008 MFC

  • Monday, March 05, 2012 10:56 PM
     
     

    I am trying to use PSH_USECALLBACK to assert a specific font for a property sheet. 

    Tracing through the CPropertySheet::Create() method shows that my setting of m_psh.pfnCallback is overridden (see code below).

    I don't see a workaround.  Is there?

    Thanks,

    Rich

    // finish building PROPSHEETHEADER structure

    BuildPropPageArray();

    m_bModeless = TRUE;

    m_psh.dwFlags |= (PSH_MODELESS|PSH_USECALLBACK);

    m_psh.pfnCallback = AfxPropSheetCallback;

    m_psh.hwndParent = pParentWnd->GetSafeHwnd();


    // hook the window creation process


    AfxHookWindowCreate(this);


    C++ developer

All Replies

  • Tuesday, March 06, 2012 11:08 AM
     
     Answered
    I think is the PSH_MODELESS option that disable PSH_USECALLBACK.  When this flag PSH_USECALLBACK is set, PropertySheet returns immediately after the dialog box is created

    Delphine GARRO