hi all, i stumped at subclassing editbox.

1st, i want to avoid IDC_IBEAM to appear when mouseover. i got the result by prevent WM_SETCURSOR, and it work. but not good enough, because i had come across to situation where the mouse move fast from IDC_SIZE form, and its not changed to ARROW coz i simply prevent set_cursor. i had tried to using GCL_HCURSOR with setwindowlong, but dont work. i use it like this:


invoke SetWindowLong,hEdit1,GCL_HCURSOR,IDC_ARROW


2nd, i want to hide the caret. i do a trick in editproc like this:


.elseif uMsg == WM_LBUTTONUP
invoke SendMessage, hEdit1,WM_KILLFOCUS,0,0
jmp @F
.elseif uMsg == WM_LBUTTONDOWN
invoke SendMessage, hEdit1,WM_SETFOCUS,0,0
.endif
@@:

it work, but still not good. i know that by doing this code, i prevent user to input char. but yet i want the editbox is read only. is there anyway to set something in editbox "properties" to hide the caret?

3rd. i manage the read only by filter WM_CHAR, its ok as far as user not using right-click popup menu. so, if user using it, it'll messed up. so, i forced to set read only style. but the problem with setting this style is the background color was change to gray. i dont want this happen. does anyone know how to keep the bkgcolor or how to change it?

just another question: is it possible to make hyperlink in edit box?

i attach the prog.

thanks
Posted on 2003-01-16 20:34:29 by dion
The best way to change the edit control's cursor is to make a superclass of the EDIT class and change the hCurosr to whatever u want

For hiding the caret look into the HideCaret api

To keep the background color white, dont specifiy the ES_READONLY style, instead trap WM_KEYDOWN, WM_KEYUP, WM_CHAR, WM_CUT, WM_PASTE, and WM_CLEAR

For hyperlinks check out this thread
http://www.asmcommunity.net/board/index.php?topic=3723&highlight=hyperlink
Posted on 2003-01-17 14:49:49 by BubbaFate
woaa... thanks BubbaFate. sorry lazy again, gosh... would you tell me what the diff between subclass and superclassing?

sorry, no need again, i'll find myself ;)
Posted on 2003-01-17 20:47:02 by dion