Link to home
Start Free TrialLog in
Avatar of msherw
msherw

asked on

Property Sheets

First of all, I'm not using the MFC. Therefore please don't answer this question with MFC info.  I need to know how to get the ?(help) off the title bar of the dialog box. I've created an array PROPSHEETPAGE psp[7] and PROPSHEETHEADER psh and used the PropertySheet function.  The flags are     psp[0].dwFlags = PSP_USETITLE;
and
psh.dwFlags = PSH_PROPSHEETPAGE;

Avatar of TKII
TKII

The ? for the context help should be removed if you are deleting the WS_EX_CONTEXTHELP from your dialog resource in the resource file (maybe you have a resource editor to do that or simply use a text editor). If you create the dialog dynamically you should  change the style before creating the dialog, i.e. filter out the WS_EX_CONTEXTHELP from the extended styles.
Avatar of msherw

ASKER

I'm not creating the propertypage frame(which is where the ? actually is located) dialog, the function PropertySheet is, therefore I cannot filter-out the WS_EX_CONTEXTHELP style.
I have tried SetClassLong(hDlg,GCL_STYLE, DS_SYSMODAL | DS_3DLOOK | WS_CAPTION); in the WM_INITDIALOG of the starting page but that does not work either.

If none of your pages have PSP_HASHELP in the PROPSHEETPAGE, the help button is invisible.  (If you don't set PSH_HASHELP in your PROPSHEETHEADER that is.)
Avatar of msherw

ASKER

PSH_HASHELP is not anywhere in my definition of my propertysheet  pages the only flag defined is psp[0].dwFlags = PSP_USETITLE;
and for the header  psh.dwFlags = PSH_PROPSHEETPAGE; but the ? is still there. I know, I can't figure it out either!!!!!!

Check the flags in the debugger and send a little piece of code to us.
Avatar of msherw

ASKER

Here's the code that defines and creates the property sheet

int CreatePropertySheet(HWND hwndOwner)
{
    PROPSHEETPAGE psp[7];
    PROPSHEETHEADER psh;

    psp[0].dwSize = sizeof(PROPSHEETPAGE);
    psp[0].dwFlags = PSP_USETITLE;
    psp[0].hInstance = pShared->hInst;
    psp[0].pszTemplate = MAKEINTRESOURCE(IDD_VIPOPT);
    psp[0].pszIcon = NULL;
    psp[0].pfnDlgProc = (DLGPROC) VipOptions;
    psp[0].pszTitle = "Vip";
    psp[0].lParam = 0;

    psp[1].dwSize = sizeof(PROPSHEETPAGE);
    psp[1].dwFlags = PSP_USETITLE;
    psp[1].hInstance = pShared->hInst;
    psp[1].pszTemplate = MAKEINTRESOURCE(IDD_VIP_FONTS);
    psp[1].pszIcon = NULL;
    psp[1].pfnDlgProc = (DLGPROC) VipFontOptions;
    psp[1].pszTitle = "Menu and Help Fonts";
    psp[1].lParam = 0;
   
    psp[2].dwSize = sizeof(PROPSHEETPAGE);
    psp[2].dwFlags = PSP_USETITLE;
    psp[2].hInstance = pShared->hInst;
    psp[2].pszTemplate = MAKEINTRESOURCE(IDD_VIEW_COLORS);
    psp[2].pszIcon = NULL;
    psp[2].pfnDlgProc = (DLGPROC) VipViewOptions;
    psp[2].pszTitle = "View Font and Colors";
    psp[2].lParam = 0;

    psp[3].dwSize = sizeof(PROPSHEETPAGE);
    psp[3].dwFlags = PSP_USETITLE;
    psp[3].hInstance = pShared->hInst;
    psp[3].pszTemplate = MAKEINTRESOURCE(IDD_GENOPT);
    psp[3].pszIcon = NULL;
    psp[3].pfnDlgProc = (DLGPROC) GeneralOptions;
    psp[3].pszTitle = "General";
    psp[3].lParam = 0;

    psp[4].dwSize = sizeof(PROPSHEETPAGE);
    psp[4].dwFlags = PSP_USETITLE;
    psp[4].hInstance = pShared->hInst;
    psp[4].pszTemplate = MAKEINTRESOURCE(IDD_WSNMGR);
    psp[4].pszIcon = NULL;
    psp[4].pfnDlgProc = (DLGPROC) WSNMgrOptions;
    psp[4].pszTitle = "WorkStation Manager";
    psp[4].lParam = 0;

    psp[5].dwSize = sizeof(PROPSHEETPAGE);
    psp[5].dwFlags = PSP_USETITLE;
    psp[5].hInstance = pShared->hInst;
    psp[5].pszTemplate = MAKEINTRESOURCE(IDD_VEROPT);
    psp[5].pszIcon = NULL;
    psp[5].pfnDlgProc = (DLGPROC) VersionOptions;
    psp[5].pszTitle = "Version Manager";
    psp[5].lParam = 0;

    psp[6].dwSize = sizeof(PROPSHEETPAGE);
    psp[6].dwFlags = PSP_USETITLE;
    psp[6].hInstance = pShared->hInst;
    psp[6].pszTemplate = MAKEINTRESOURCE(IDD_TBREDOPT);
    psp[6].pszIcon = NULL;
    psp[6].pfnDlgProc = (DLGPROC) TBredOptions;
    psp[6].pszTitle = "TBredcom";
    psp[6].lParam = 0;

    psh.dwSize = sizeof(PROPSHEETHEADER);
    psh.dwFlags = PSH_PROPSHEETPAGE;
    psh.hwndParent = hwndOwner;
    psh.nStartPage = 0;
      psh.hInstance = pShared->hInst;
    psh.pszIcon = NULL;
      psh.pszCaption = NULL;
    psh.pszCaption = (LPSTR) "Thoroughbred Workstation Options";
    psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE);
    psh.ppsp = (LPCPROPSHEETPAGE) &psp;

    return (PropertySheet(&psh));
}


int DoOptionsTab(void)
{
      HWND hwndOptions;
    if (pShared->hwndMGR != NULL)
      {
            hwndOptions = FindWindow(NULL,"ThoroughBred Workstation Options");
        if (hwndOptions == NULL)
            {
            pShared->pCOptions = new COptions(pShared);
            pShared->pCOptions->DefWeb = pShared->pCOptions->OldDefWeb = -1;
            pShared->pCOptions->DefDsk = pShared->pCOptions->OldDefDsk = -1;
        pShared->pCOptions->GetVipOptions();
        pShared->pCOptions->GetVipFontOptions();
        pShared->pCOptions->GetVipViewOptions();
        pShared->pCOptions->GetWsnMgrOptions();
            pShared->pCOptions->GetVerOptions();
            pShared->pCOptions->GetTBredOptions();
            CreatePropertySheet(pShared->hwndMGR);
            };
      }
return (TRUE);
}

Check the 'more styles' page in the resource editor and disable the context help check box. If this isn't it I have no idea.
Avatar of msherw

ASKER

the parent dialog which is the property page frame is not defined in the resource editor, Sorry you could not help but it was a nice try.

I meant the dialog resources for the tabpages.
Avatar of msherw

ASKER

I've already done everything possible to those pages. Context_help is not checked.
ASKER CERTIFIED SOLUTION
Avatar of kraken
kraken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of msherw

ASKER

It seems the WM_NCCREATE message was not being sent. I was getting a WM_DESTROY, then A WM_CREATE. So I trapped the WM_CREATE and did a SETWINDOWLONG changing the EX style of the window and the ? went away Thanks kraken.