Click here to Skip to main content
15,894,343 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CppUnit creating only one instance of a TestFixture type for a suite Pin
cydd8-Feb-11 23:27
cydd8-Feb-11 23:27 
GeneralRe: CppUnit creating only one instance of a TestFixture type for a suite Pin
Niklas L9-Feb-11 1:35
Niklas L9-Feb-11 1:35 
Questionproblem in line plotting IN VC++ Pin
dalvihrishi8-Feb-11 19:14
dalvihrishi8-Feb-11 19:14 
AnswerRe: problem in line plotting IN VC++ Pin
Cedric Moonen8-Feb-11 20:07
Cedric Moonen8-Feb-11 20:07 
GeneralRe: problem in line plotting IN VC++ Pin
dalvihrishi9-Feb-11 18:07
dalvihrishi9-Feb-11 18:07 
GeneralRe: problem in line plotting IN VC++ Pin
Cedric Moonen9-Feb-11 20:12
Cedric Moonen9-Feb-11 20:12 
QuestionList control in MFC Pin
Nikesh Jagtap8-Feb-11 17:24
Nikesh Jagtap8-Feb-11 17:24 
AnswerRe: List control in MFC Pin
Hans Dietrich8-Feb-11 18:29
mentorHans Dietrich8-Feb-11 18:29 
AnswerRe: List control in MFC Pin
_AnsHUMAN_ 8-Feb-11 18:34
_AnsHUMAN_ 8-Feb-11 18:34 
QuestionLogical Processors Vs Physical Processors Pin
Ahmed Charfeddine8-Feb-11 10:28
Ahmed Charfeddine8-Feb-11 10:28 
AnswerRe: Logical Processors Vs Physical Processors [modified] Pin
Luc Pattyn8-Feb-11 11:04
sitebuilderLuc Pattyn8-Feb-11 11:04 
GeneralRe: Logical Processors Vs Physical Processors Pin
Ahmed Charfeddine8-Feb-11 23:00
Ahmed Charfeddine8-Feb-11 23:00 
AnswerRe: Logical Processors Vs Physical Processors Pin
Luc Pattyn8-Feb-11 23:14
sitebuilderLuc Pattyn8-Feb-11 23:14 
GeneralRe: Logical Processors Vs Physical Processors Pin
Ahmed Charfeddine8-Feb-11 23:27
Ahmed Charfeddine8-Feb-11 23:27 
QuestionSynchronization Pin
Andry_st8-Feb-11 10:17
Andry_st8-Feb-11 10:17 
AnswerRe: Synchronization Pin
Ahmed Charfeddine8-Feb-11 10:29
Ahmed Charfeddine8-Feb-11 10:29 
AnswerRe: Synchronization Pin
Maximilien8-Feb-11 10:30
Maximilien8-Feb-11 10:30 
GeneralRe: Synchronization Pin
Andry_st9-Feb-11 0:39
Andry_st9-Feb-11 0:39 
QuestionShell's context menu items are all gray [modified] Pin
David Crow8-Feb-11 4:33
David Crow8-Feb-11 4:33 
QuestionRe: Shell's context menu items are all gray Pin
Maximilien8-Feb-11 5:06
Maximilien8-Feb-11 5:06 
AnswerRe: Shell's context menu items are all gray Pin
David Crow8-Feb-11 5:11
David Crow8-Feb-11 5:11 
Maximilien wrote:
What do you mean by that ? you load the explorer menu or just make it look like the exporer menu?


Meaning it is one in the same. I go through all of the COM and Shell stuff to create and display the context menu, like:

LPSHELLFOLDER folderParent;
DesktopFolder->BindToObject(pidlParent, 0, IID_IShellFolder, (LPVOID *) &folderParent);
  
LPITEMIDLIST pidlFile;
folderParent->ParseDisplayName(AfxGetMainWnd()->GetSafeHwnd(), 0, (LPWSTR) ((LPCTSTR) strFile), &ulEaten, &pidlFile, 0);
  
LPCONTEXTMENU CM;
folderParent->GetUIObjectOf(AfxGetMainWnd()->GetSafeHwnd(), 1, (LPCITEMIDLIST *) &pidlFile, IID_IContextMenu, 0, (LPVOID *) &CM);
  
HMENU hMenu = CreatePopupMenu();
DWORD dwFlags = CMF_CANRENAME;
CM->QueryContextMenu(hMenu, 0, 1, 0x7fff, dwFlags);
  
int Cmd = TrackPopupMenu(...);


Maximilien wrote:
...or you can use the option TPM_RETURNCMD to have TrackPopupMenu return the item selected item...


All of the menu items are gray, so TrackPopupMenu() is only going to return 0.

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"Man who follows car will be exhausted." - Confucius


GeneralRe: Shell's context menu items are all gray Pin
Maximilien8-Feb-11 6:47
Maximilien8-Feb-11 6:47 
GeneralRe: Shell's context menu items are all gray Pin
David Crow8-Feb-11 6:51
David Crow8-Feb-11 6:51 
QuestionIncremental search method for CEditview or CRicheditView Pin
ganesh.dp8-Feb-11 1:29
ganesh.dp8-Feb-11 1:29 
AnswerRe: Incremental search method for CEditview or CRicheditView Pin
Niklas L8-Feb-11 2:52
Niklas L8-Feb-11 2:52 

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.