winapi - win32 : display editbox with black color in text area on windows mobile 5 -


i writing simple ui application on windows mobile 5, want display editbox user color in whole edit box not successful approach........ whenever catch window event edit control , call setbkcolor(), display text area given color not entire edit box.

i want given color displayed user when window presented user not when user enters data in edit box.

please let me know solution , again native win32 application code not mfc

regds suhail

setbkcolor sets background colour text. change background of entire control, need process wm_ctlcoloredit message , return brush of choice. can in wndproc this: (assuming hedit handle of edit control)

case wm_ctlcoloredit:   if ((hwnd)lparam == hedit) {     hdc hdc = (hdc)wparam;     setbkmode(hdc, transparent);     return (lresult)getstockobject(black_brush); // or other brush want   }   break; 

by setting background mode transparent, don't need separate setbkcolor call -- text painted transparently on background.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -