Hi
Assue that there are some controls on a modal dialog box, and then here is my problem:
How can I get the control ID or handle if I move the mouse over it.
I really can't find the way out , please, I would apprecate that.
Thanks.
Hi
Assue that there are some controls on a modal dialog box, and then here is my problem:
How can I get the control ID or handle if I move the mouse over it.
I really can't find the way out , please, I would apprecate that.
Thanks.
Don't laugh at me,I am just a SuperNewbie.
Process the WM_MOUSEMOVE messages.
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
thanks, but how could the code knows that the mouse is over the control?
Don't laugh at me,I am just a SuperNewbie.
Read this thread to learn about screen and client coordinates and how to work with them.
gg
thanks, but is there any clause like:
I don't know if there is any thing like GetDlgItemID(hwndC MOUSEOVER, 0, 0)Code:case WM_MOUSEMOVE { // my assumption CtrID = GetDlgItemID(hwndC MOUSEOVER, 0, 0) // switch(CtrlID) { } }
Don't laugh at me,I am just a SuperNewbie.
Sorry, I couldn't translate this. Could you run it by me again.thanks, but I don't know if that is precious, is there any other way to do this?
If you follow the 'Windows overview' link at the bottom of
a related function such as GetWindow you will find a list of related functions.
In other words, try browsing the documentation.
Code:case WM_MOUSEMOVE: { POINT pt; pt.x = GET_X_LPARAM(lParam); pt.y = GET_Y_LPARAM(lParam); hwndCtrl = ChildWindowFromPoint(hwnd, pt); idCtrl = GetDlgCtrlID(hwndCtrl); switch(idCtrl) { ... } }
Sorry, that was not "precious" but "precise"
In your sample code: does it mean that only we get the hwndCtrl when mouse moves over that defined pt, right?
Thanks.
Don't laugh at me,I am just a SuperNewbie.
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.