How to get get x position and y position during right click, I used MOUSEX(),MOUSEY() but it doesn't work

X = noe:memo{PROP:Xpos}
Y= noe:memo{PROP:Ypos}
back# = SSCE_CheckCtrlBackgroundMenu(hRED,X,Y,1, COLOR:RED )

Here when I clicked mouse right the cursor moved back to some to other word and showed the word suggestions.
Please solve this issue.

Hello Mohan -

Did you try turning on PROP:Pixels?
e.g.

ExistingPixelSetting BYTE

  CODE

  !Assuming the window is open here
  ExistingPixelSetting = 0{PROP:Pixels}
  0{PROP:Pixels} = TRUE
  X = MouseX()
  Y = MouseY()
  0{PROP:Pixels} = ExistingPixelSetting

Hi @jslarve We should implement while mouse right click event . so, while opening the window even if we get the mouse x and y coordinates its not useful. I want the x and y position of the cursor accurately at right click event for passing as parameter for a dll function.
Please give solution.

Hello Mohan -

You would declare the “ExistingPixelSetting” at the data section of the top of your procedure. Then, when you process the right-click then call the stuff that I posted for the pixel based coordinates.

If what you’re asking is how to translate the X/Y coordinates from those of the Window Client to those of the entire Screen, take a look at the Windows API’s ScreenToClient and ClientToScreen. https://msdn.microsoft.com/en-us/library/windows/desktop/dd183434(v=vs.85).aspx

Best wishes.

Nothing worked using these codes. can you please give me some other ideas to solve?

Perhaps post some more examples of what you have tried?

If you can put together a demo app showing the problem then that might also allow people to assist.

  OF MouseRight
    X= MOUSEX() 
    Y = MOUSEY()
    back# = SSCE_CheckCtrlBackgroundMenu( ?noe:memo{PROP:Handle},CLIP(X),CLIP(Y),1, COLOR:black )

In the above code we are calling third party dll of spell checker where 2nd and 3rd parameter denotes the cursor position of mouseclick. while running the application, the cursor moves back to some other place apart from correct position. This was the issue. I need a solution for how to pass the X and Y coordinates of cursor position while right click and call this spell checker dll correctly. This was my issue.

Sure but how can you know if the issue is the coordinates you are getting (from MouseX/MouseY) or whatever SSCE_CheckCtrlBackgroundMenu is doing with those coordinates?

If it was me I would try to isolate the problem more.