Click here to Skip to main content
16,013,730 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Basic GDI question Pin
Nish Nishant3-Jun-02 23:18
sitebuilderNish Nishant3-Jun-02 23:18 
QuestionHow telling Windows I'm idle in message loop? Pin
2-Jun-02 18:38
suss2-Jun-02 18:38 
AnswerRe: How telling Windows I'm idle in message loop? Pin
Michael Dunn2-Jun-02 18:39
sitebuilderMichael Dunn2-Jun-02 18:39 
GeneralRe: How telling Windows I'm idle in message loop? Pin
2-Jun-02 18:46
suss2-Jun-02 18:46 
GeneralRe: How telling Windows I'm idle in message loop? Pin
Paul M Watt2-Jun-02 19:49
mentorPaul M Watt2-Jun-02 19:49 
GeneralRe: How telling Windows I'm idle in message loop? Pin
3-Jun-02 5:34
suss3-Jun-02 5:34 
AnswerRe: How telling Windows I'm idle in message loop? Pin
Alexandru Savescu2-Jun-02 21:47
Alexandru Savescu2-Jun-02 21:47 
Questionredirecting mouse button ?? Pin
Alek2-Jun-02 18:01
Alek2-Jun-02 18:01 
I used SetWindowsHookEx(WH_MOUSE,....) to get mouse message.
After get mouse message(like WM_RBUTTONUP...)I need to redirect it.
For example, when user clicks right button, I want call 'Run...' dialog.
I know that I need to disable popup menu and then to do what I want it to do.

Below is my code:

HHOOK glhHook = NULL;
HINSTANCE glhInstance = NULL;
glhook = SetWindowsHookEx(WH_MOUSE, MouseProc, glhInstance, 0);
.
.
.
LRESULT WINAPI CALLBACK MouseProc(int nCode, WPARAM wp, LPARAM lp)
{
if(wp == WM_RBUTTONUP)
{
// do something....

((MOUSEHOOKSTRUCT*)lp->hwnd = NULL;
((MOUSEHOOKSTRUCT*)lp->wHitTestCode = NULL;
((MOUSEHOOKSTRUCT*)lp->dwExtraInfo = NULL;
return false;
}
}

but it still show the popup menu and ignore the action I want to do
why???
Is anybody can give me some suggestion?



AnswerRe: redirecting mouse button ?? Pin
Paul M Watt2-Jun-02 18:29
mentorPaul M Watt2-Jun-02 18:29 
Questionwhats this macro do? Pin
2-Jun-02 16:56
suss2-Jun-02 16:56 
AnswerRe: whats this macro do? Pin
Paul M Watt2-Jun-02 17:45
mentorPaul M Watt2-Jun-02 17:45 
GeneralRe: whats this macro do? Pin
2-Jun-02 18:04
suss2-Jun-02 18:04 
Questionhide a button? Pin
2-Jun-02 13:19
suss2-Jun-02 13:19 
AnswerRe: hide a button? Pin
Nish Nishant2-Jun-02 15:01
sitebuilderNish Nishant2-Jun-02 15:01 
AnswerRe: hide a button? Pin
Paul M Watt2-Jun-02 18:00
mentorPaul M Watt2-Jun-02 18:00 
GeneralCan't get rid of error Pin
2-Jun-02 13:17
suss2-Jun-02 13:17 
GeneralRe: Can't get rid of error Pin
Rama Krishna Vavilala2-Jun-02 15:13
Rama Krishna Vavilala2-Jun-02 15:13 
GeneralMessage Closed Pin
2-Jun-02 15:18
User 387462-Jun-02 15:18 
QuestionOnly ".NET". What then? Pin
WREY2-Jun-02 12:11
WREY2-Jun-02 12:11 
AnswerRe: Only ".NET". What then? Pin
Domenic Denicola2-Jun-02 12:52
Domenic Denicola2-Jun-02 12:52 
GeneralRe: Only ".NET". What then? Pin
Ed Gadziemski3-Jun-02 11:40
professionalEd Gadziemski3-Jun-02 11:40 
QuestionHow to get Device Context of Picture Box Pin
Speedy2-Jun-02 11:55
Speedy2-Jun-02 11:55 
AnswerRe: How to get Device Context of Picture Box Pin
moliate2-Jun-02 15:39
moliate2-Jun-02 15:39 
QuestionWhat do i do to not make my app close when one of it's dialogs is closed? Pin
redeemer2-Jun-02 11:01
redeemer2-Jun-02 11:01 
AnswerRe: What do i do to not make my app close when one of it's dialogs is closed? Pin
Joaquín M López Muñoz2-Jun-02 11:21
Joaquín M López Muñoz2-Jun-02 11:21 

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.