Click here to Skip to main content
15,913,758 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to detect the browser version? Pin
Cyrus Dang3-May-05 16:55
Cyrus Dang3-May-05 16:55 
GeneralRe: How to detect the browser version? Pin
Priyank Bolia3-May-05 19:33
Priyank Bolia3-May-05 19:33 
GeneralRe: How to detect the browser version? Pin
David Crow4-May-05 2:08
David Crow4-May-05 2:08 
GeneralRe: How to detect the browser version? Pin
Cyrus Dang4-May-05 7:48
Cyrus Dang4-May-05 7:48 
GeneralToggle line numbers in MS Visual C++ 6.0 Pin
knapak3-May-05 12:31
knapak3-May-05 12:31 
GeneralRe: Toggle line numbers in MS Visual C++ 6.0 Pin
David Crow3-May-05 16:49
David Crow3-May-05 16:49 
GeneralRe: Toggle line numbers in MS Visual C++ 6.0 Pin
knapak4-May-05 8:43
knapak4-May-05 8:43 
GeneralPopUp Menu Pin
javi_jmc3-May-05 12:30
javi_jmc3-May-05 12:30 
Hi everybody,

I have created an PopUp Menu in a CDialog...it works OK.

Now I want to create a PopUp Menu inside an ActiveX every time I click Button RIGHT of the mouse...
I have copied the code inside the function WM_RBUTTONDOWN...The problem is that it shows the Menu but it is DISABLED (it is shown but I can not select an option).

How can I do it to solve it...to make it enable?

Thanks

Here the code :


HMENU hMenu = ::CreatePopupMenu();
if (NULL != hMenu)
{
// add a few test items
::AppendMenu(hMenu, MF_ENABLED | MF_STRING & !MF_GRAYED, 1, "Change Color");
::AppendMenu(hMenu, MF_ENABLED | MF_STRING & !MF_GRAYED, 2, "Hide");
::AppendMenu(hMenu, MF_ENABLED | MF_STRING & !MF_GRAYED, 3, "Item 3-");

ClientToScreen(&point);

int sel = ::TrackPopupMenuEx(hMenu,
TPM_CENTERALIGN | TPM_RETURNCMD,
point.x,
point.y,
m_hWnd,
NULL);

CString s;

s.Format("The selected item is %d", sel);
TRACE(s);

:estroyMenu(hMenu);
GeneralRe: PopUp Menu Pin
Ryan Binns3-May-05 18:40
Ryan Binns3-May-05 18:40 
QuestionHow to implement delay Pin
hithesh3-May-05 12:22
hithesh3-May-05 12:22 
AnswerRe: How to implement delay Pin
Christian Graus3-May-05 13:37
protectorChristian Graus3-May-05 13:37 
GeneralRe: How to implement delay Pin
Anonymous3-May-05 14:01
Anonymous3-May-05 14:01 
GeneralRe: How to implement delay Pin
Christian Graus3-May-05 14:06
protectorChristian Graus3-May-05 14:06 
GeneralRe: How to implement delay Pin
hithesh23-May-05 14:34
susshithesh23-May-05 14:34 
GeneralRe: How to implement delay Pin
Christian Graus3-May-05 14:46
protectorChristian Graus3-May-05 14:46 
GeneralRe: How to implement delay Pin
hithesh3-May-05 16:54
hithesh3-May-05 16:54 
GeneralRe: How to implement delay Pin
Christian Graus3-May-05 16:58
protectorChristian Graus3-May-05 16:58 
Generalwindow stops repainting... Pin
Ramsus3-May-05 10:02
Ramsus3-May-05 10:02 
GeneralRe: window stops repainting... Pin
Ravi Bhavnani3-May-05 11:34
professionalRavi Bhavnani3-May-05 11:34 
Generalhlp me out!! Pin
Member 18801463-May-05 9:40
Member 18801463-May-05 9:40 
GeneralRe: hlp me out!! Pin
Maximilien3-May-05 9:44
Maximilien3-May-05 9:44 
GeneralRe: hlp me out!! Pin
David Crow3-May-05 10:45
David Crow3-May-05 10:45 
GeneralRe: hlp me out!! Pin
Member 18801463-May-05 20:44
Member 18801463-May-05 20:44 
GeneralRe: hlp me out!! Pin
David Crow4-May-05 2:21
David Crow4-May-05 2:21 
GeneralConverting char to char* Pin
talkster53-May-05 9:10
talkster53-May-05 9:10 

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.