Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Karl-Heinz" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: Icon draw question Date: Sat, 19 Sep 2015 18:25:48 +0200 Lines: 77 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Trace: individual.net 5Ea6+QMx09jjBL0l53k/AgFtrPE1V34hvlq7wR3ea5giPgn14= Cancel-Lock: sha1:vovwhrRvte2Erx/EYS6wkmgTYfQ= In-Reply-To: X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 16.4.3528.331 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331 Xref: csiph.com comp.lang.clipper.visual-objects:8420 Hi Fabio, >> Since i'm using DrawIconEx() to draw the icons on the >> shellwindow and they are not controls, how can i hide and show them? try a FixedIcon Control: 1. Create the control dynamically in your ShellWindow show() - after super:show() e.g. _oFixedIcon := FixedIcon { SELF:handle( 4 ) , 4711 , Point { 20 ,20 }} _oFixedIcon:Size := Dimension { 16 , 16 } _oFixedIcon:SetIcon ( _oRedIcon ) // initial icon _oFixedIcon:Show() 2. _oFixedIcon, _oRedIcon and _oGreenIcon are protect vars of your shell window. protect _oFixedIcon as FixedIcon protect _oRedIcon as Icon protect _oGreenIcon as Icon 3. create the required icons inside the Shellwindow Init() e.g. _oRedIcon := Icon {ResourceID{"icoLEDRed",_GetInst()}, LR_DEFAULTCOLOR , 16,16 } _oGreenIcon := Icon {ResourceID{"icoLEDGreen",_GetInst()}, LR_DEFAULTCOLOR , 16,16 } 4. Inside the MdiClientProc you have always access to the shellwindow object e.g. case uMsg == WM_MOUSEMOVE oShellWin := GetObjectByHandle ( GetParent ( hWnd ) ) Forward the required messages either to your shellwindow or switch the icons within the MdiClientProc. e.g. if ismethod ( oShellWin , #SwitchIcon ) send ( oShellWin , #SwitchIcon , #Green ) // or #RED endif method SwitchIcon ( symIcon ) class YourShellWindow do case case symIcon == #Green _oFixedIcon:SetIcon ( _oGreenIcon ) case symIcon == #Red _oFixedIcon:SetIcon ( _oRedIcon ) endcase In Germany we would say: "i hope you can follow me" ;-) regards Karl-Heinz