Click here to Skip to main content
15,889,867 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I SubClassed The Edit Box In Window Class #32770 And Want To Change The Cursor But Cannot do

SetCursor LoadCursor(0,IDC_HAND)

What I have tried:

Just Put Api function that mentioned in WM_SETCURSOR
Posted
Comments
Richard MacCutchan 30-Sep-19 11:08am    
I just tried that in an ordinary Window and it works fine. Can you show some more of your code? And please show the actual C code that compiles, what you have above is not real C code.
[no name] 30-Sep-19 11:21am    
yes not c code and except who works with c and c# nobody knows api function
Richard MacCutchan 30-Sep-19 11:28am    
I have no idea what that is supposed to mean. I asked a simple question: please show the actual code that you are using to change the cursor. The statements in your question are not proper C, C++ or C#.
[no name] 30-Sep-19 11:32am    
I Subclassed the Edit Control In #3270 And Draw A button Shaped with DrawFrameControl function at the Right Side Of The Edit Control , when cursor move to that area i want to change cursor in that Rectangle area

i have to mention that In WM_NCHITTEST i Used PtinRect And during Cursor Move To this Rectangle area ( Means Button Shaped : Drawn The right Side Of Edit ) Write "Break" ( Equivalant in vb is " Exit Function " ) , if use break in this window message the Cusror is same as when you are out of control ( Means Arrow
Type ) but if you write code in WM_LBUTTONDOWN It does not work because use "break" in WM_NCHITTEST
[no name] 30-Sep-19 11:35am    
Case WM_SETCURSOR
DIM P AS POINTAPI
GETCURSORPOS P
SCREENTOCLIENT HWND,P
If PtInRect(BUTTONRECT,P.X,P.Y) Then
SetCursor LoadCursorA(0,32519&)
End If


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900