RE: Problem #3, Eu2.4 gui 4.00
- Posted by Al Getz <Xaxo at aol.com> May 09, 2003
- 364 views
Hello again Euman, Yes, that's what it means to 'process' CTLCOLORSTATIC. The main idea was to bring attention to the differences for the benefit of other Euphoria programmers. It is a little amazing how more code is now required to get the same results. Thanks for the idea to use the base class instead though, i might use that idea. I just quickly threw a few lines of code at it to get the original program (that had already worked fine) working again. Since i wanted to have a way to control the individual edit controls in my apps, here's the way i wrapped it: ----CODE----------------------------------------------------------- --declared in the WndProc file: -- within WndProc(): function WndProc(....) integer cid if uMsg = WM_CTLCOLOREDIT or uMsg = WM_CTLCOLORSTATIC then cid=GetID(lParam) --get id of control if onColorControl[cid]>0 then return call_func(onControlColor[cid],{wParam}) --pass hdc end if end if end function -- in the file that contains the creation of the edit control: global atom EBColor,hEditBrush EBColor=#FFFFFF --choose color here, any color hEditBrush = c_func(xCreateSolidBrush,{EBColor}) --create a brush for use anywhere function onControlColor_Edit1(atom hdc) atom OldColor OldColor=c_func(xSetBkColor,{hdc, EBColor} ) return hEditbrush end function onControlColor[Edit1]=routine_id("onControlColor_Edit1") WinMain() ProgramCleanup() ----CODE_END----------------------------------------------------- Take care for now, Al