Using:
Visual Studio 2005 Beta 2
Windows Mobile 5.0 Pocket PC emulator
I have a CPropertySheet derived class: e.g. CCustomPropertySheet.
It has a member variable: CCommandBar m_wndCommandBar;

I do the following to try to show the command bar:

BOOL CCustomPropertySheet::OnInitDialog()
{
BOOL bResult = CPropertySheet::OnInitDialog();
BOOL bSuccess = m_wndCommandBar.Create(this); // Returns TRUE
m_wndCommandBar.InsertMenuBar (IDR_MENU1);
return bResult;
}

However, when the property sheet shows, there is no command bar at the
bottom. I have manually created the RCDATA for IDR_MENU1 as follows:

IDR_MENU1 RCDATA
BEGIN
IDR_MENU1,
2,
I_IMAGENONE, IDOK, TBSTATE_ENABLED, TBSTYLE_BUTTON|TBSTYLE_AUTOSIZE,
IDS_OK, 0, NOMENU,

I_IMAGENONE, IDCANCEL, TBSTATE_ENABLED, TBSTYLE_BUTTON |
TBSTYLE_AUTOSIZE, IDS_CANCEL, 0, NOMENU,
END

It works great with a regular CDialog derived class, but it does not work
with CPropertySheet. Please help!

RE: Visual Studio 2005 CCommandBar not displaying in CPropertySheet by Bhupathi

Bhupathi
Thu Oct 27 11:50:40 CDT 2005

Hello Johnson,

Here am facing the same issue. CCommandBar works great with CDialog but
not with CPropertySheet.
Could you please tell me if you found the solution.

Thanks & Regards,
Bhupathi.

"Mel Johnson" wrote:

> Using:
> Visual Studio 2005 Beta 2
> Windows Mobile 5.0 Pocket PC emulator
> I have a CPropertySheet derived class: e.g. CCustomPropertySheet.
> It has a member variable: CCommandBar m_wndCommandBar;
>
> I do the following to try to show the command bar:
>
> BOOL CCustomPropertySheet::OnInitDialog()
> {
> BOOL bResult = CPropertySheet::OnInitDialog();
> BOOL bSuccess = m_wndCommandBar.Create(this); // Returns TRUE
> m_wndCommandBar.InsertMenuBar (IDR_MENU1);
> return bResult;
> }
>
> However, when the property sheet shows, there is no command bar at the
> bottom. I have manually created the RCDATA for IDR_MENU1 as follows:
>
> IDR_MENU1 RCDATA
> BEGIN
> IDR_MENU1,
> 2,
> I_IMAGENONE, IDOK, TBSTATE_ENABLED, TBSTYLE_BUTTON|TBSTYLE_AUTOSIZE,
> IDS_OK, 0, NOMENU,
>
> I_IMAGENONE, IDCANCEL, TBSTATE_ENABLED, TBSTYLE_BUTTON |
> TBSTYLE_AUTOSIZE, IDS_CANCEL, 0, NOMENU,
> END
>
> It works great with a regular CDialog derived class, but it does not work
> with CPropertySheet. Please help!
>
>
>