Hello all,

I've been trying to figure out for days on how to create a menu bar
with a toolbar of icons.

I figured out how to add a menu resource using the following code:

memset(pMenuBar,0,sizeof(SHMENUBARINFO));

pMenuBar->cbSize = sizeof(SHMENUBARINFO);
pMenuBar->hwndParent = hWnd;
pMenuBar->dwFlags = SHCMBF_HMENU;
pMenuBar->hInstRes = hInstance;
pMenuBar->nToolBarId = IDR_mnuNSMenu;

SHCreateMenuBar(pMenuBar);

This works just fine and displays my menu, but I need to add some
icons (like in pocket word).

I tried setting the other members of the SHMEUBARINFO which are
cBmpImages, nBmpId but nothing happens.

If anybody has any good source that incorporates a toolbar with menu
items like in pocket word please let me know.

Again, I'm using Pocket PC 2003 and any source i've seen that is out
there is in Pocket PC 2002 or earlier.

Also I'm NOT USING MFC.

Thanks,

Geno

Re: How to create Menubar with Toolbar? PPC2003 by antispam

antispam
Thu Jun 17 16:58:24 CDT 2004

On 6/17/2004 5:02 PM, Geno wrote:

> Hello all,
>
> I've been trying to figure out for days on how to create a menu bar
> with a toolbar of icons.
> [...]

First create menu with common textual items
and items which you wnat to has as icons
configure as bitmap and set them proper indexes,
all settings are in properties tabs.

Then create toolbar with as much icons as bitmap
buttons you add in menubar.

Next, fill SHMENUBARINFO structure and
set resource ID of toolbar bitmap you created in
the second step.

Then create menu bar and the icons should be
visible.

Read this article for some hints:

http://www.pocketpcdn.com/articles/dialogbar.html

You need not only menu bar in your resources, but
also toolbar bitmap and menu bar should
have some items set as bitmaps with indexes.

Greets

--

Mateusz £oskot
mateusz at loskot dot net

Re: How to create Menubar with Toolbar? PPC2003 by Geno

Geno
Sat Jun 19 13:21:33 CDT 2004

Are you using EVC 4?

I created a menubar with items using the dialog editor, and none of
the properties mention anything about adding icons or bitmaps...

that may of been a thing you could do in EVC 3???



On Thu, 17 Jun 2004 21:58:24 GMT, Mateusz £oskot
<antispam@see.my.signature> wrote:

>On 6/17/2004 5:02 PM, Geno wrote:
>
>> Hello all,
>>
>> I've been trying to figure out for days on how to create a menu bar
>> with a toolbar of icons.
>> [...]
>
>First create menu with common textual items
>and items which you wnat to has as icons
>configure as bitmap and set them proper indexes,
>all settings are in properties tabs.
>
>Then create toolbar with as much icons as bitmap
>buttons you add in menubar.
>
>Next, fill SHMENUBARINFO structure and
>set resource ID of toolbar bitmap you created in
>the second step.
>
>Then create menu bar and the icons should be
>visible.
>
>Read this article for some hints:
>
>http://www.pocketpcdn.com/articles/dialogbar.html
>
>You need not only menu bar in your resources, but
>also toolbar bitmap and menu bar should
>have some items set as bitmaps with indexes.
>
>Greets


Re: How to create Menubar with Toolbar? PPC2003 by antispam

antispam
Sun Jun 20 11:40:39 CDT 2004

On 6/19/2004 8:21 PM, Geno Bisceglia wrote:

> Are you using EVC 4?
>
> I created a menubar with items using the dialog editor, and none of
> the properties mention anything about adding icons or bitmaps...
>
> that may of been a thing you could do in EVC 3???

Yes I use eVC++ 4.0

Look at these screens:

1) menu bar properties dialog with Bitmap option on
More Styles tab and 5 dummy bitmaps in the menubar (from the right):

http://wl.sggw.waw.pl/~mloskot/screen1.jpg

2) Menu with dummy bitmaps and toolbar which 5 icons
will be placed for dummy bitmaps:

http://wl.sggw.waw.pl/~mloskot/screen2.jpg

I hope this will help.

Greets

--

Mateusz £oskot
mateusz at loskot dot net

Re: How to create Menubar with Toolbar? PPC2003 by Geno

Geno
Sun Jun 20 21:21:02 CDT 2004

i see... i found out that i have to create a new menu...

for some reason those tabs weren't there after i created a menu with
text...

i made a new resource with a new menu and those options came up!

thanks for the help!!

geno

On Sun, 20 Jun 2004 16:40:39 GMT, Mateusz £oskot
<antispam@see.my.signature> wrote:

>On 6/19/2004 8:21 PM, Geno Bisceglia wrote:
>
>> Are you using EVC 4?
>>
>> I created a menubar with items using the dialog editor, and none of
>> the properties mention anything about adding icons or bitmaps...
>>
>> that may of been a thing you could do in EVC 3???
>
>Yes I use eVC++ 4.0
>
>Look at these screens:
>
>1) menu bar properties dialog with Bitmap option on
>More Styles tab and 5 dummy bitmaps in the menubar (from the right):
>
>http://wl.sggw.waw.pl/~mloskot/screen1.jpg
>
>2) Menu with dummy bitmaps and toolbar which 5 icons
>will be placed for dummy bitmaps:
>
>http://wl.sggw.waw.pl/~mloskot/screen2.jpg
>
>I hope this will help.
>
>Greets


Re: How to create Menubar with Toolbar? PPC2003 by antispam

antispam
Tue Jun 22 15:21:26 CDT 2004

On 6/21/2004 4:21 AM, Geno Bisceglia wrote:
> i made a new resource with a new menu and those options came up!
>

Great !
So, I'll delete the screen shots soon.

Best Regards


--

Mateusz £oskot
mateusz at loskot dot net