Home > Software engineering >  About the mouse to click for RGB values
About the mouse to click for RGB values

Time:11-05

The function of this procedure is to detect the left mouse button, when pressed into the program, is access to want to click the RGB values, if click is red, yellow, green will pop up a different Messagebox this program I step look ahead to an operation, but in the if condition each didn't go in, the mouse to click the picture is, indeed, if the RGB values, may I ask which place there will be a problem?

CodePudding user response:

GetCursorPos returns the screen coordinates,
ScreenToClient into the client area coordinatesOr use lParam parameter
XPos=GET_X_LPARAM (lParam);
YPos=GET_Y_LPARAM (lParam);

CodePudding user response:

Thank you thank you, changed the implementation
  • Related