How to add a Icon to the head of the MenuBar 
Author Message
 How to add a Icon to the head of the MenuBar

Use MF_BITMAP in InsertMenu or MIIM_BITMAP in InsertMenuItem.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.*-*-*.com/
=====================================

Quote:

> hi,
> I make my MenuBar on ATL public ToolBar ,
> i want to add a Icon (open doc Icon ,now ) to the head of the MenuBar ~~
> Like attach photo

> How to do ??
> thanks for help me

> ajiva



Mon, 21 Nov 2005 00:40:02 GMT  
 How to add a Icon to the head of the MenuBar

Quote:
> I make my MenuBar on ATL public ToolBar ,
> i want to add a Icon (open doc Icon ,now ) to the head of the MenuBar
~~
> Like attach photo

I'd use Rebar control. Place your toolbar on a rebar band, associate an
image list containing your icon with the rebar, use
REBARBANDINFO::iImage to assign this image to a band. Alternatively, use
custom painting (see NM_CUSTOMDRAW)
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken



Mon, 21 Nov 2005 02:51:26 GMT  
 How to add a Icon to the head of the MenuBar
The thing about Devstudio is that it is a MDI window and when you maximize a
MDI document it places the document icon up there.  That behavior is built
in (for MDI).  To do it in a SDI window or dialog use one of the methods the
other posters mentioned.


Quote:


> > I make my MenuBar on ATL public ToolBar ,
> > i want to add a Icon (open doc Icon ,now ) to the head of the MenuBar
> ~~
> > Like attach photo

> I'd use Rebar control. Place your toolbar on a rebar band, associate an
> image list containing your icon with the rebar, use
> REBARBANDINFO::iImage to assign this image to a band. Alternatively, use
> custom painting (see NM_CUSTOMDRAW)
> --
> With best wishes,
>     Igor Tandetnik

> "For every complex problem, there is a solution that is simple, neat,
> and wrong." H.L. Mencken



Mon, 21 Nov 2005 23:38:49 GMT  
 How to add a Icon to the head of the MenuBar

Quote:
> The thing about Devstudio is that it is a MDI window and when you
maximize a
> MDI document it places the document icon up there.  That behavior is
built
> in (for MDI).  To do it in a SDI window or dialog use one of the
methods the
> other posters mentioned.

This behavior is only built-in if you use native menu bar. Visual Studio
does not - it's menu bar is actually a toolbar-based custom conrol (ever
seen a native menu bar you can drag around? ). So the icon to the left
is custom-painted, too.
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken



Mon, 21 Nov 2005 23:56:04 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Duplicate Minimize/Restore/Close icons in menubar

2. Q: change icon on menubar

3. How can I use ICON in a menubar?

4. Adding new Menu to main MenuBar in Visual Studio

5. Add menu to menubar from other program

6. How do I add MenuBar for dialog based application in eVC++

7. problems adding menubar into dialog

8. Adding single Icons to Imagelist (+ How to create a mask for icon)

9. Adding an icon to the Win95 icon tray.

10. add icon to the name of appli in taskbar

11. How to add an icon to a MenuItem?

12. How can I create Icons and add Image to CLI

 

 
Powered by phpBB® Forum Software