Hi I created an Edit box, with multiple line and color , does anybody know why when I press"Backspace" the cursor just moves back instead of deleting ...
Also How to delete the whole screen like in Console app I need to be able to delete all the text with a button or hotkey
relative to the fact that backspace just moves backwords you must remind that you used TRANSPARENT as BkMode. You should use opaque and EM_SETCHARFORMAT for the colors. To delete the whole text send a WM_SETTEXT with a null string usually works.
Hope it was helpful
correction.... you dont really need to use bkmode in edit controils ...
invoke SetWindowLong,hwnD,GWL_WNDPROC,addr NewEditProc
Thank you , I will try this tonight .... :U
Quote from: xandaz on July 24, 2011, 04:06:53 PM
relative to the fact that backspace just moves backwords you must remind that you used TRANSPARENT as BkMode. You should use opaque and EM_SETCHARFORMAT for the colors. To delete the whole text send a WM_SETTEXT with a null string usually works.
Hope it was helpful
What this did for me was to have only 1 line that is the background color and the text color that I want ?
Quote from: bomz on July 24, 2011, 04:10:25 PM
invoke SetWindowLong,hwnD,GWL_WNDPROC,addr NewEditProc
This crashes my app :(
Do you know why it crashed your app? Did you lookup SetWindowLong and see what the WNDPROC flag makes it return?
You are telling Windows to use NewEditProc as the new callback for that control - did you create that proc the same way other window msg handler callbacks are created?
2 - bomz left out one important thing - SetWindowLong returns the address of the original proc for that control that you MUST save, and in the new proc you MUST use that address with CallDefProc (something like that) for ALL messages not handled...