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;

msherwAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TKIICommented:
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.
0
msherwAuthor Commented:
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.

0
md041797Commented:
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.)
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

msherwAuthor Commented:
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!!!!!!

0
TKIICommented:
Check the flags in the debugger and send a little piece of code to us.
0
msherwAuthor Commented:
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);
}

0
TKIICommented:
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.
0
msherwAuthor Commented:
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.

0
TKIICommented:
I meant the dialog resources for the tabpages.
0
msherwAuthor Commented:
I've already done everything possible to those pages. Context_help is not checked.
0
krakenCommented:
Without MFC, it's a little rough, but here goes.

You need to have the window created by PropertySheet (your property sheet frame) catch the WM_NCCREATE message.  This message is sent to windows that are about to be created, and gives you a chance to modify their styles AND EXTENDED styles.

The reason you couldn't affect it with SetClassLong() is that WM_EX_CONTEXTHELP is an extended style and SetClassLong() only deals with standard styles.

Your message handler will receive a pointer to a CREATESTRUCT structure in the lParam.  In this structure is a member called dwExStyle.  Remove the WM_EX_CONTEXTHELP style from this member using a bitwise AND, and make sure you return TRUE.  If you return FALSE, it will not create the window at all.

An example code snippet would be:

LRESULT NcCreateHandler( WPARAM wParam, LPARAM lParam )
{
   LPCREATESTRUCT lpcs = ( LPCREATESTRUCT )lParam;
   lpcs->dwExStyle &= ~WS_EX_CONTEXTHELP;
   return TRUE;
}

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
msherwAuthor Commented:
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.

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.