Click here to Skip to main content
15,910,603 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: C-CPP PreProcessing Pin
Vipin Aravind6-Aug-06 2:21
Vipin Aravind6-Aug-06 2:21 
AnswerRe: C-CPP PreProcessing Pin
Stephen Hewitt6-Aug-06 2:54
Stephen Hewitt6-Aug-06 2:54 
QuestionCMonthCalCtrl Rendering Problem [modified] Pin
JKallen5-Aug-06 13:44
JKallen5-Aug-06 13:44 
AnswerRe: CMonthCalCtrl Rendering Problem Pin
Bram van Kampen5-Aug-06 16:37
Bram van Kampen5-Aug-06 16:37 
QuestionHook procedure ( SetWindowHookEx() ) Pin
Dody_DK5-Aug-06 12:05
Dody_DK5-Aug-06 12:05 
AnswerRe: Hook procedure ( SetWindowHookEx() ) Pin
Ravi Bhavnani5-Aug-06 12:59
professionalRavi Bhavnani5-Aug-06 12:59 
AnswerRe: Hook procedure ( SetWindowHookEx() ) Pin
Hamid_RT6-Aug-06 2:54
Hamid_RT6-Aug-06 2:54 
AnswerRe: Hook procedure ( SetWindowHookEx() ) Pin
Dody_DK6-Aug-06 12:36
Dody_DK6-Aug-06 12:36 
thank you for the usefull links, and this is my first try:

this is my callback function

LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam,  LPARAM lParam)<br />
{<br />
	if (nCode<0)<br />
		return CallNextHookEx(0,nCode,wParam,lParam);<br />
	if (wParam == WM_RBUTTONDOWN)<br />
	{<br />
		MessageBox(GetForegroundWindow(), "Yes", "Works", MB_OK);<br />
	}	<br />
	return CallNextHookEx(0,nCode,wParam,lParam);<br />
}



and in onbutton function I set:
<br />
	HOOKPROC wlm;<br />
	HHOOK check;<br />
	HINSTANCE WLMDLL;<br />
<br />
	WLMDLL = LoadLibrary((LPCTSTR) "MyHook.dll");<br />
	wlm = (HOOKPROC)GetProcAddress(WLMDLL, "MouseProc");<br />
<br />
	check = SetWindowsHookEx(WH_MOUSE,wlm,WLMDLL,0);<br />


as you can see I am trying to do a mouse hook, this try is to get any right click, but later when I get it to work, I want it to be for a defined application that when it gets right click the the popup pops up

can you see what I am doing wrong in my code?

thanks in advance!

|) () |) '/
QuestionClass templates Pin
jon-805-Aug-06 9:27
professionaljon-805-Aug-06 9:27 
AnswerRe: Class templates Pin
Michael Dunn5-Aug-06 11:05
sitebuilderMichael Dunn5-Aug-06 11:05 
GeneralRe: Class templates Pin
Jörgen Sigvardsson5-Aug-06 13:17
Jörgen Sigvardsson5-Aug-06 13:17 
GeneralRe: Class templates Pin
Michael Dunn5-Aug-06 13:36
sitebuilderMichael Dunn5-Aug-06 13:36 
GeneralRe: Class templates Pin
Jörgen Sigvardsson5-Aug-06 13:42
Jörgen Sigvardsson5-Aug-06 13:42 
QuestionRe: Class templates Pin
jon-805-Aug-06 13:41
professionaljon-805-Aug-06 13:41 
AnswerRe: Class templates Pin
Jörgen Sigvardsson5-Aug-06 13:18
Jörgen Sigvardsson5-Aug-06 13:18 
AnswerRe: Class templates Pin
Jörgen Sigvardsson5-Aug-06 13:20
Jörgen Sigvardsson5-Aug-06 13:20 
QuestionRe: Class templates [modified] Pin
jon-805-Aug-06 18:43
professionaljon-805-Aug-06 18:43 
QuestionCreate a CView as a "child window" without any borders etc Pin
Tengil995-Aug-06 7:32
Tengil995-Aug-06 7:32 
AnswerRe: Create a CView as a "child window" without any borders etc Pin
Bram van Kampen5-Aug-06 15:38
Bram van Kampen5-Aug-06 15:38 
QuestionCSplitterWnd error [modified] Pin
Tengil995-Aug-06 6:53
Tengil995-Aug-06 6:53 
AnswerRe: My CSplitterWnd class Pin
Tengil995-Aug-06 6:54
Tengil995-Aug-06 6:54 
AnswerRe: CSplitterWnd error Pin
Bram van Kampen5-Aug-06 15:59
Bram van Kampen5-Aug-06 15:59 
GeneralRe: CSplitterWnd error Pin
Tengil996-Aug-06 1:14
Tengil996-Aug-06 1:14 
Questionfstream object not cleared from memory Pin
jon-805-Aug-06 4:01
professionaljon-805-Aug-06 4:01 
AnswerRe: fstream object not cleared from memory Pin
Gary R. Wheeler5-Aug-06 5:42
Gary R. Wheeler5-Aug-06 5:42 

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.