Click here to Skip to main content
16,010,650 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CHtmlView - trapping the right click when an HT ML page is displayed Pin
ColinDavies18-Jul-02 21:49
ColinDavies18-Jul-02 21:49 
GeneralRe: CHtmlView - trapping the right click when an HT ML page is displayed Pin
BeavisInAz19-Jul-02 5:01
BeavisInAz19-Jul-02 5:01 
Questionhow to hide or remove separator bars in toolbar programmatically? Pin
ns18-Jul-02 10:08
ns18-Jul-02 10:08 
AnswerRe: how to hide or remove separator bars in toolbar programmatically? Pin
Ravi Bhavnani18-Jul-02 10:29
professionalRavi Bhavnani18-Jul-02 10:29 
AnswerRe: how to hide or remove separator bars in toolbar programmatically? Pin
Ravi Bhavnani18-Jul-02 10:30
professionalRavi Bhavnani18-Jul-02 10:30 
GeneralISAPI and Unicode Pin
Roman Nurik18-Jul-02 10:04
Roman Nurik18-Jul-02 10:04 
GeneralRe: ISAPI and Unicode Pin
Joaquín M López Muñoz18-Jul-02 10:10
Joaquín M López Muñoz18-Jul-02 10:10 
GeneralI try again - CMenu::AppendMenu Pin
[CoY0te]18-Jul-02 9:52
[CoY0te]18-Jul-02 9:52 
If you read this message already - skip it. I just place it here one more time hoping someone will help me.
The question is simple, i have the following code for my popup menu:

Menu=new CMenu;
Menu->CreatePopupMenu();
(...)
Menu->AppendMenu(MF_STRING | MF_ENABLED, 0, "Insert");
Menu->AppendMenu(MF_STRING | MF_ENABLED, 0, "Delete");
(...)
Menu->TrackPopupMenu( TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_LEFTBUTTON, Point.x, Point.y, ParentWindow);
Menu->DestroyMenu();

It works ok.
But i need to process commands to make it worth anything.
When I use:

Menu->AppendMenu(MF_STRING | MF_ENABLED, ID_INSERT_ATTRIBUTE, "Insert");
Menu->AppendMenu(MF_STRING | MF_ENABLED, ID_DELETE_ATTRIBUTE, "Delete");

These items appear as grayed and unavailable.
I've used CMenu::GetMenuItemID to check if the ID is assigned - it is (returned values were ID_INSERT_ATTRIBUTE and ID_DELETE_ATTRIBUTE).
I also used CMenu::EnableMenuItem to enable these (this function returned MF_ENABLED as a previous state of item Confused | :confused: )

Did i missed something?

By the way - i have problems with CToolTipCtrl - i almost copied all code from one of MSDN's samples but it doesn't work. If someone has some experiences with ToolTips i would like to ask a few questions.

[ CoY0te ]
( greetings to all assembler coders Smile | :) heh! )
GeneralRe: I try again - CMenu::AppendMenu Pin
Joaquín M López Muñoz18-Jul-02 10:05
Joaquín M López Muñoz18-Jul-02 10:05 
GeneralRe: I try again - CMenu::AppendMenu Pin
[CoY0te]18-Jul-02 10:43
[CoY0te]18-Jul-02 10:43 
GeneralRe: I try again - CMenu::AppendMenu Pin
Joaquín M López Muñoz18-Jul-02 11:02
Joaquín M López Muñoz18-Jul-02 11:02 
GeneralRe: I try again - CMenu::AppendMenu Pin
[CoY0te]18-Jul-02 11:13
[CoY0te]18-Jul-02 11:13 
GeneralRe: I try again - CMenu::AppendMenu Pin
Joaquín M López Muñoz18-Jul-02 11:16
Joaquín M López Muñoz18-Jul-02 11:16 
GeneralRe: I try again - CMenu::AppendMenu Pin
[CoY0te]18-Jul-02 11:33
[CoY0te]18-Jul-02 11:33 
GeneralRe: I try again - CMenu::AppendMenu Pin
Joaquín M López Muñoz18-Jul-02 11:41
Joaquín M López Muñoz18-Jul-02 11:41 
GeneralRe: I try again - CMenu::AppendMenu Pin
Jay Beckert18-Jul-02 14:25
Jay Beckert18-Jul-02 14:25 
GeneralRe: I try again - CMenu::AppendMenu Pin
[CoY0te]18-Jul-02 22:39
[CoY0te]18-Jul-02 22:39 
GeneralRe: I try again - CMenu::AppendMenu Pin
Mike Upton18-Jul-02 23:03
Mike Upton18-Jul-02 23:03 
GeneralRe: I try again - CMenu::AppendMenu Pin
[CoY0te]19-Jul-02 0:52
[CoY0te]19-Jul-02 0:52 
GeneralI like it that way Pin
KarstenK19-Jul-02 1:27
mveKarstenK19-Jul-02 1:27 
QuestionGet video adapter's name??? Pin
BlackSmith18-Jul-02 9:49
BlackSmith18-Jul-02 9:49 
AnswerRe: Get video adapter's name??? Pin
Joaquín M López Muñoz18-Jul-02 11:24
Joaquín M López Muñoz18-Jul-02 11:24 
GeneralGoing right to a subdialog Pin
Jason Hooper18-Jul-02 9:37
Jason Hooper18-Jul-02 9:37 
GeneralRe: Going right to a subdialog Pin
Joaquín M López Muñoz18-Jul-02 9:58
Joaquín M López Muñoz18-Jul-02 9:58 
GeneralRe: Going right to a subdialog Pin
Jason Hooper18-Jul-02 11:14
Jason Hooper18-Jul-02 11:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.