Click here to Skip to main content
15,922,155 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: OnLButtonDown() question Pin
Antony M Kancidrowski2-Sep-04 1:07
Antony M Kancidrowski2-Sep-04 1:07 
GeneralVideo Editing of .avi & .mpegs files Pin
defused1-Sep-04 17:09
defused1-Sep-04 17:09 
GeneralRe: Video Editing of .avi & .mpegs files Pin
lonely_life1-Sep-04 19:07
lonely_life1-Sep-04 19:07 
GeneralRe: Video Editing of .avi & .mpegs files Pin
defused7-Sep-04 21:16
defused7-Sep-04 21:16 
GeneralVS.NET's installation tools Pin
zecodela1-Sep-04 16:33
zecodela1-Sep-04 16:33 
QuestionHow to be unable to select item(s) in menu when right-clicked Pin
Na_Su1-Sep-04 16:16
Na_Su1-Sep-04 16:16 
AnswerRe: How to be unable to select item(s) in menu when right-clicked Pin
lonely_life1-Sep-04 19:12
lonely_life1-Sep-04 19:12 
AnswerRe: How to be unable to select item(s) in menu when right-clicked Pin
Na_Su1-Sep-04 23:21
Na_Su1-Sep-04 23:21 
>wisecrack:
Thank you for answering.

By the way, after posting message I looked into more information.
And I found that "CMenu:CEnableMenuItem" may be right.
My goal is to develop MFC project of dialog base.
For example, here is a goal that when right-clicked over the icon of text file in Explorer,
the item "cut" is glay.

The below is the method.
I created new MFC project of dialog base.
(The project name is "Click".)
And I added below code of "OnRButtonDown" with Class Wizard into "CClickDlg.cpp" file:
===
void CClickDlg::OnRButtonDown(UINT nFlags, CPoint point)
{
// TODO:
CMenu *hMenu;
CWnd* cwParent = GetParent();
DWORD dwStyle = cwParent->GetStyle();
hMenu = cwParent->GetSystemMenu(FALSE);
hMenu -> EnableMenuItem(ID_EDIT_CUT, MF_GRAYED);
CDialog::OnRButtonDown(nFlags, point);
}
===

And including "afxres.h" in the first of "CClickDlg.cpp" file, I built "Click.exe" file.
With "Click.exe" executing, I executed "explorer.exe" and I clicked right button
over a certain text file.
But the item "cut" wasn't glay.

Which point of my method is wrong?
If there is another good idea or programming flow, please tell me.
GeneralDownload Managers Pin
Archer2821-Sep-04 12:43
Archer2821-Sep-04 12:43 
GeneralRe: Download Managers Pin
Stefan Pedersen1-Sep-04 14:16
Stefan Pedersen1-Sep-04 14:16 
GeneralRe: Download Managers Pin
Michael Dunn1-Sep-04 17:57
sitebuilderMichael Dunn1-Sep-04 17:57 
GeneralRe: Download Managers Pin
James R. Twine2-Sep-04 10:09
James R. Twine2-Sep-04 10:09 
QuestionHow to hide program on execution Pin
Kamis1-Sep-04 11:58
Kamis1-Sep-04 11:58 
AnswerRe: How to hide program on execution Pin
alex.barylski1-Sep-04 14:59
alex.barylski1-Sep-04 14:59 
AnswerRe: How to hide program on execution Pin
lonely_life1-Sep-04 19:01
lonely_life1-Sep-04 19:01 
Questionhow:Name function after API name?? Pin
happycpp1-Sep-04 11:35
happycpp1-Sep-04 11:35 
AnswerRe: how:Name function after API name?? Pin
Christian Graus1-Sep-04 11:56
protectorChristian Graus1-Sep-04 11:56 
GeneralRe: how:Name function after API name?? Pin
happycpp3-Sep-04 6:09
happycpp3-Sep-04 6:09 
GeneralRe: how:Name function after API name?? Pin
Christian Graus5-Sep-04 10:12
protectorChristian Graus5-Sep-04 10:12 
Generalansi c: gets dangerous Pin
kfaday1-Sep-04 10:49
kfaday1-Sep-04 10:49 
GeneralRe: ansi c: gets dangerous Pin
Stefan Pedersen1-Sep-04 14:13
Stefan Pedersen1-Sep-04 14:13 
GeneralRe: ansi c: gets dangerous Pin
Henry miller2-Sep-04 3:47
Henry miller2-Sep-04 3:47 
GeneralRe: ansi c: gets dangerous Pin
kfaday3-Sep-04 16:07
kfaday3-Sep-04 16:07 
GeneralRe: ansi c: gets dangerous Pin
James R. Twine2-Sep-04 10:24
James R. Twine2-Sep-04 10:24 
QuestionHow do I change the Icon. Pin
nigma_x1-Sep-04 10:48
nigma_x1-Sep-04 10:48 

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.