WinAPI: set fill color of a readonly textbox -


i have program winapi (c++) complete. problem want set fill color of text box , textbox readonly. when set textbox readonly, can't fill white. , when don't, can filled white. how create textbox:

createwindow(l"edit", text, ws_child|ws_visible|ws_border|es_readonly|es_right, left, top, width, height, hwnd, (hmenu)id, hinst, null) 

and code in winproc:

case wm_ctlcoloredit:         settextcolor((hdc)wparam,rgb(0,0,255));         setbkcolor((hdc)wparam,rgb(255,255,255));         setbkmode((hdc)wparam, transparent);     return (lresult)getstockobject(white_brush); 

you'll want use wm_ctlcolorstatic read-only text boxes; see docs wm_ctlcoloredit.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -