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

C / C++ / MFC

 
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 
I guess this conversation led us to a dead end.
I'll just start it almost from beginning,cause the problem is unusual for me and from the answers I got, i haven't found out anything yet. Anyway thanks everybody for trying to help me. Here we go:

Take a look at my code, and see what is it all about:

Version 1:
#define ID_EDIT_ATTRIBUTE WM_USER+1
Menu->AppendMenu(MF_STRING | MF_ENABLED, ID_EDIT_ATTRIBUTE, "Edit criterion"); //item is grayed

Version 2:
Menu->AppendMenu(MF_STRING | MF_ENABLED, 0, "Edit criterion"); //item is not grayed but has no command assigned

I've used these two message boxes for testing:

if (Menu->GetMenuItemID(0)==ID_EDIT_ATTRIBUTE)
MessageBox(NULL, "OK", "Item ID", MB_OK);
if (Menu->EnableMenuItem(0, MF_ENABLED | MF_BYPOSITION)==MF_ENABLED)
MessageBox(NULL, "OK", "Enabled?", MB_OK);

Both of them are appearing before TrackPopupMenu, but "Enabled?" does not appear right after TrackPopupMenu.

Conclusion: TrackPopupMenu disables these items, but why does it not accept these command ID's?

By the way - I'm using that PopupMenu in a class not derieved from anything (so it's not a CWnd class), but i pass the parent window pointer:
Menu->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_LEFTBUTTON, Point.x, Point.y, ParentWindow);

Right now I'm processing only the ID_EDIT_ATTRIBUTE command in my OnCommand method (just for testing).

The question again: Why does it NOT accept my command ID? Dead | X|

Greetings to all assembler dudes and especially for C64 demoscene!
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 
Generalheight of title bar of Cdialog Pin
ns18-Jul-02 9:18
ns18-Jul-02 9:18 
GeneralRe: height of title bar of Cdialog Pin
Joaquín M López Muñoz18-Jul-02 9:21
Joaquín M López Muñoz18-Jul-02 9:21 
GeneralRe: height of title bar of Cdialog Pin
ns18-Jul-02 9:35
ns18-Jul-02 9:35 
GeneralRe: height of title bar of Cdialog Pin
Joaquín M López Muñoz18-Jul-02 9:48
Joaquín M López Muñoz18-Jul-02 9:48 
Generalmemset equivilent for std::vector Pin
moredip18-Jul-02 7:38
moredip18-Jul-02 7:38 
GeneralRe: memset equivilent for std::vector Pin
Joaquín M López Muñoz18-Jul-02 7:54
Joaquín M López Muñoz18-Jul-02 7:54 
GeneralRe: memset equivilent for std::vector Pin
moredip18-Jul-02 7:56
moredip18-Jul-02 7:56 
GeneralRe: memset equivilent for std::vector Pin
Chris Losinger18-Jul-02 8:09
professionalChris Losinger18-Jul-02 8:09 
GeneralRe: memset equivilent for std::vector Pin
moredip18-Jul-02 8:12
moredip18-Jul-02 8:12 

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.