Click here to Skip to main content
15,911,786 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem with WM_LBUTTTONUP Pin
Cedric Moonen10-May-06 3:27
Cedric Moonen10-May-06 3:27 
GeneralRe: Problem with WM_LBUTTTONUP Pin
llp00na10-May-06 3:34
llp00na10-May-06 3:34 
GeneralRe: Problem with WM_LBUTTTONUP Pin
Cedric Moonen10-May-06 3:42
Cedric Moonen10-May-06 3:42 
GeneralRe: Problem with WM_LBUTTTONUP Pin
llp00na10-May-06 3:55
llp00na10-May-06 3:55 
GeneralRe: Problem with WM_LBUTTTONUP Pin
Cedric Moonen10-May-06 4:04
Cedric Moonen10-May-06 4:04 
GeneralRe: Problem with WM_LBUTTTONUP Pin
llp00na10-May-06 4:09
llp00na10-May-06 4:09 
GeneralRe: Problem with WM_LBUTTTONUP Pin
Cedric Moonen10-May-06 4:27
Cedric Moonen10-May-06 4:27 
GeneralRe: Problem with WM_LBUTTTONUP Pin
llp00na10-May-06 23:13
llp00na10-May-06 23:13 
Yep. Yesterday while i was trying to figure out how to use mouse hooks. Someone told me that there is no need to perform hooking at all. Instead he recommended to override the PreTranslateMessage. He proposed the following code:

BOOL CPilotStudyDlg::PreTranslateMessage(MSG* pMsg)
{
	if(WM_LBUTTONDOWN == pMsg->message)
	{
		fprintf(trial, "\nMouse: x = %i, y = %i ", LOWORD(pMsg->lParam), HIWORD(pMsg->lParam));
		fflush(trial);
	}
	return CDialog::PreTranslateMessage(pMsg);
}


It works really fine. However i have a slight problem, in my browser i have an address bar (where user enters url) that placed above the control. Whenever i click on the address bar i receice a *y* value that is bigger than the value of *y* received when clicking on the control (just beneath the address bar).
I dont know why this is happening, *y* values should get bigger as i move from the top towards the bottom but its not the case.

If you have any clue why this might be happening, please share.Sigh | :sigh:
Cheers

llp00na

-- modified at 5:13 Thursday 11th May, 2006
GeneralRe: Problem with WM_LBUTTTONUP Pin
Cedric Moonen10-May-06 23:20
Cedric Moonen10-May-06 23:20 
GeneralRe: Problem with WM_LBUTTTONUP Pin
llp00na11-May-06 0:08
llp00na11-May-06 0:08 
GeneralRe: Problem with WM_LBUTTTONUP Pin
llp00na10-May-06 3:08
llp00na10-May-06 3:08 
GeneralRe: Problem with WM_LBUTTTONUP Pin
Cedric Moonen10-May-06 3:16
Cedric Moonen10-May-06 3:16 
AnswerRe: Problem with WM_LBUTTTONUP Pin
shivditya10-May-06 2:05
shivditya10-May-06 2:05 
GeneralRe: Problem with WM_LBUTTTONUP Pin
llp00na10-May-06 2:24
llp00na10-May-06 2:24 
QuestionChild Window Pin
F.Smadi10-May-06 1:14
F.Smadi10-May-06 1:14 
AnswerRe: Child Window Pin
llp00na10-May-06 1:34
llp00na10-May-06 1:34 
AnswerRe: Child Window Pin
Nishad S10-May-06 1:34
Nishad S10-May-06 1:34 
AnswerRe: Child Window Pin
Nibu babu thomas10-May-06 2:11
Nibu babu thomas10-May-06 2:11 
QuestionMulti Window With OpenGl Pin
F.Smadi10-May-06 1:11
F.Smadi10-May-06 1:11 
QuestionCustom control derived from CDialog Pin
benjymous10-May-06 1:06
benjymous10-May-06 1:06 
AnswerRe: Custom control derived from CDialog Pin
Cedric Moonen10-May-06 1:12
Cedric Moonen10-May-06 1:12 
QuestionRich Editor Pin
tctan10-May-06 0:35
tctan10-May-06 0:35 
AnswerRe: Rich Editor Pin
kakan10-May-06 0:46
professionalkakan10-May-06 0:46 
GeneralRe: Rich Editor Pin
tctan10-May-06 4:01
tctan10-May-06 4:01 
GeneralRe: Rich Editor Pin
kakan11-May-06 20:17
professionalkakan11-May-06 20:17 

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.