Solved

Add picture to the menu edit in VB

Posted on 2002-05-24
7
155 Views
Last Modified: 2010-05-02

I want to create my own menu edit (by pressing Ctrl E)
and want to insert a pictures to some sub menues.
For example i want to put diskete picure with "Save" option.
There is a any way to do this ,because i can't find it.

help please.
0
Comment
Question by:Vlad77
7 Comments
 
LVL 20

Accepted Solution

by:
hes earned 50 total points
Comment Utility
0
 

Author Comment

by:Vlad77
Comment Utility
Thanks,but this isn't exactly what i want.
I want that this icons can be  pressed or unpressed
It's mean not only a picture but like an object with states :pressed ,unpressed (like in toolbar).

Is this possible?
0
 

Author Comment

by:Vlad77
Comment Utility
Thanks,but this isn't exactly what i want.
I want that this icons can be  pressed or unpressed
It's mean not only a picture but like an object with states :pressed ,unpressed (like in toolbar).

Is this possible?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
I am not sure that you can acheive this. maybe you will need to provide yourself multiples icons .

anyway, see
http://vbaccelerator.com/codelib/cpopmenu/article.htm
http://www.datadynamics.com/activebar/default.htm
0
 

Expert Comment

by:unni_bcanti
Comment Utility
0
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
Any progress?
0
 

Expert Comment

by:WizOfOz
Comment Utility
Just a penny...

stock somewhere the state of the menu items

you could then subclass the object containing the menu

catch the creation of the menu with
WM_INITMENU or WM_INITPOPUPMENU (not sure but you can search in the api viewer)

then
SetMenuItemBitmap
to change the bitmap for check in the menu
or
ModifyMenu
to set a bitmap instead of the normal caption
you put the bitmap in the menu

use two different bitmap for pressed or unpressed
if you need only the checkbox different use the first


then
catch the click of the mouse on the menu
(use WM_ACTIVATE)

with the mouse position use
MenuItemFromPoint API
to determine which menu entry contains the specific point
or
WM_MENUSELECT to know the menu item

remember to unsubclass the object at the end of the process or at the exit of the program

Hope this will help
Wiz
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now