Click here to Skip to main content
15,908,768 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to enumerate processes holding a lock on my file? Pin
Oliver C. Lanz17-Apr-02 3:39
Oliver C. Lanz17-Apr-02 3:39 
AnswerRe: How to enumerate processes holding a lock on my file? Pin
Mike Nordell17-Apr-02 6:09
Mike Nordell17-Apr-02 6:09 
GeneralRe: How to enumerate processes holding a lock on my file? Pin
Oliver C. Lanz17-Apr-02 9:33
Oliver C. Lanz17-Apr-02 9:33 
GeneralRe: How to enumerate processes holding a lock on my file? Pin
Mike Nordell17-Apr-02 10:01
Mike Nordell17-Apr-02 10:01 
GeneralRe: How to enumerate processes holding a lock on my file? Pin
Oliver C. Lanz17-Apr-02 21:15
Oliver C. Lanz17-Apr-02 21:15 
GeneralRe: How to enumerate processes holding a lock on my file? Pin
Mike Nordell17-Apr-02 22:01
Mike Nordell17-Apr-02 22:01 
AnswerRe: How to enumerate processes holding a lock on my file? Pin
Todd Smith18-Apr-02 8:27
Todd Smith18-Apr-02 8:27 
GeneralGetting the menu option from CMenu Pin
Lilian Chan-Grant17-Apr-02 3:28
Lilian Chan-Grant17-Apr-02 3:28 
CRect rect;
int x;
int l;
int y;
BSTR string = NULL;
pPopupMenu.CreatePopupMenu();

GetWindowRect(&rect);
x = rect.right < 0 ? 0 : rect.right;
l = rect.left < 0 ? 0: rect.left;
if ((x-l) > 700)
x = (l+x) / 2;
y = rect.bottom;

CMenu pPopupMenu;
pPopupMenu.CreatePopupMenu();
iStatus = pPopupMenu.AppendMenu(MF_STRING, WM_USER, L"Option1");
iStatus = pPopupMenu.AppendMenu(MF_STRING, WM_USER, L"Option2");
iStatus = pPopupMenu.AppendMenu(MF_STRING, WM_USER, L"Option3");
iStatus = pPopupMenu.AppendMenu(MF_STRING, WM_USER, L"Option4");
iStatus = pPopupMenu.AppendMenu(MF_STRING, WM_USER, L"Option5");
iStatus = pPopupMenu.AppendMenu(MF_STRING, WM_USER, L"Option6");
iStatus = pPopupMenu.TrackPopupMenu(TPM_RIGHTALIGN | TPM_LEFTBUTTON,
x, y, m_hWnd);

iStatus = pPopupMenu.GetMenuString(1, string, MF_BYPOSITION);

Can someone tell me how to get the the position the cursor is on? I need to get which option was chosen.

Forever ignorant,
Lilian
GeneralRe: Getting the menu option from CMenu Pin
Niklas L17-Apr-02 4:17
Niklas L17-Apr-02 4:17 
GeneralRe: Getting the menu option from CMenu Pin
Roger Allen17-Apr-02 5:46
Roger Allen17-Apr-02 5:46 
GeneralRe: Getting the menu option from CMenu Pin
Lilian Chan-Grant17-Apr-02 9:53
Lilian Chan-Grant17-Apr-02 9:53 
GeneralPrinter Forms Pin
Steve Thresher17-Apr-02 2:30
Steve Thresher17-Apr-02 2:30 
Generalproblem with CTreeView Pin
Luis Reina17-Apr-02 1:57
Luis Reina17-Apr-02 1:57 
GeneralRich Edit Control and Release builds Pin
Derek Lakin17-Apr-02 1:53
Derek Lakin17-Apr-02 1:53 
GeneralRe: Rich Edit Control and Release builds Pin
-Dy17-Apr-02 2:52
-Dy17-Apr-02 2:52 
GeneralRe: Rich Edit Control and Release builds Pin
Derek Lakin17-Apr-02 3:34
Derek Lakin17-Apr-02 3:34 
GeneralRe: Rich Edit Control and Release builds Pin
Niklas L17-Apr-02 4:51
Niklas L17-Apr-02 4:51 
GeneralRe: Rich Edit Control and Release builds Pin
16-May-02 5:24
suss16-May-02 5:24 
GeneralUser Breakpoint called from code Pin
XAlien17-Apr-02 0:45
XAlien17-Apr-02 0:45 
GeneralRe: User Breakpoint called from code Pin
Pere LLibre17-Apr-02 4:14
Pere LLibre17-Apr-02 4:14 
GeneralRe: User Breakpoint called from code Pin
XAlien17-Apr-02 4:38
XAlien17-Apr-02 4:38 
GeneralRe: User Breakpoint called from code Pin
Thomas Freudenberg17-Apr-02 5:44
Thomas Freudenberg17-Apr-02 5:44 
QuestionSearch strategy for LoadLibrary...? Pin
Tommy Svensson17-Apr-02 0:40
Tommy Svensson17-Apr-02 0:40 
AnswerRe: Search strategy for LoadLibrary...? Pin
l a u r e n17-Apr-02 1:48
l a u r e n17-Apr-02 1:48 
GeneralRe: Search strategy for LoadLibrary...? Pin
Tommy Svensson17-Apr-02 3:05
Tommy Svensson17-Apr-02 3:05 

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.