Hi
Can any help me by a problem with subclass and vk_Back by Wm_Keydown?
.elseif uMsg==WM_KEYDOWN
mov eax,wParam
.if al==VK_BACK
invoke CallWindowProc,EditOldProc,hEdit,uMsg,eax,lParam
.else
invoke CallWindowProc,EditOldProc,hEdit,uMsg,wParam,lParam
ret
.endif
How i can delete a sign from the edit?
Greets,
If by "delete a sign from the edit" you mean delete a character, the normal behavior of the backspace key in an edit control is to delete the character to the left of the caret.
Also, I don't understand what you are trying to do. In your IF block both of the INVOKE statements will pass wParam to the old Edit procedure.
I trying to delte a character by keydown
Thanks
To delete a character you could select the character with an EM_SETSEL message and then delete it with a WM_CLEAR or WM_CUT message. If you are doing this in a subclass procedure, are you trying to restrict the characters that the user can input?
Quoteare you trying to restrict the characters that the user can input?
Yes only numbers
Ok I try your solution
Thanks
To restrict the input to numbers you can include the ES_NUMBER style, but note that this will allow only decimal numbers, no decimal point or hex digits, and that the user can still paste non-digits into the control.
If that is not acceptable, I posted a different solution where you have more control here (http://www.masm32.com/board/index.php?topic=10411.msg76293#msg76293).
Thanks i have solved it