toolbar creation fails for windows mobile 5 (pocketpc)

Selçuk Cihan selcukcihan at gmail.com
Sun Feb 3 13:44:52 PST 2008


I have identified the source of error. The resource files seem to be
triggering the error. When i replaced the resources with minimal
sample's resource everything seemed fine. I have no experience with
resource files, all i know is they are used for icons etc ( i am not
sure if they are unique to ms visual studio ). so i will try to learn
about those resource files and then hopefully i can fix the error.

On Feb 3, 2008 9:14 PM, Selçuk Cihan <selcukcihan at gmail.com> wrote:
> Hi, i am having the following debug alert when running a wxwidgets
> application targeting winmobile: wxAssertFailure failed in
> wxToolMenuBar::MSWCreateToolbar(): SHCreateMenuBar failed.
>
> in msdn http://msdn2.microsoft.com/en-us/library/aa453678.aspx it says
>
> Windows Mobile Remarks
>
> In Windows Mobile 5.0, a soft key bar will be automatically created if
> the specification passed to SHCreateMenuBar function contains 2 or
> less top level menu items and those menu items do not contain images.
>
> If the specification passed to SHCreateMenuBar function contains
> images or more than 2 top level menu items, the behavior is as
> follows.
>
>     * SHCreateMenuBar will fail for a Windows Mobile 5.0-based Smartphone
>     * SHCreateMenuBar will create a traditional style menu bar for a
> Windows Mobile 5.0-based Pocket PC
>
> ok i am not using more than two top level menu items. In fact, i have
> built and run the minimal sample of wxwidgets for windows mobile and
> it runs without any problems. I have decided to use the same code for
> toolbar creation in my application just to see what happens and i
> still get the same error. I am working on someone else's code and i am
> porting it to mobile platform that is why there may be other portions
> of the code leading to the debug alert but i can not figure out what
> causes the error. I am using the same preprocessor definitions as in
> minimal sample. Can anyone give me ideas please, what may be the cause
> of the error? The application has one frame and in the frame following
> initialization code is used in which i get the error:




More information about the wx-users mailing list