I'm currently working on a cross plattform project and I'm pretty new in this subject.
I tried using CommandBar to create a custom toolbar for diverse plattforms. It's working under CE7, Windows Mobile 6 and Windows Mobile 6.5.3. It isn't working under CE6.
The following code is the part which calls up the issue:
const TBBUTTON tbBtns[] = {
{2, 267, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0},
{0, 268, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0},
{1, 269, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0},
{3, 270, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0},
};
HWND hWndCB = CommandBar_Create(_AtlBaseModule.m_hInst, m_hWnd, 208);
CommandBar_AddBitmap(hWndCB, _AtlBaseModule.m_hInst, IDB_BTNS, 4, 16, 16);
CommandBar_AddButtons(hWndCB,4,tbBtns);
CommandBar_Show(hWndCB, TRUE);
I debugged the program with a CE6 device and I got a toolbar with four empty buttons. When I used GetLastError() after CommandBar_Create(), I got following system error code:
ERROR_CALL_NOT_IMPLEMENTED 120 (0x78)
This function is not supported on this system.
I don't understand why this function shouldn't be supported on CE6. In MSDN library the method is defined as a WINCE function.
Can someone explain me how to solve this problem? Otherwise I would also accept different ways to create a toolbar for CE6, CE7 and Windows Mobile.
Thanks in advance!