Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #8423
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Karl Wochele <kw@e©os-system.dot.de> |
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Icon draw question |
| Date | Tue, 22 Sep 2015 13:15:48 +0200 |
| Lines | 107 |
| Message-ID | <d6crkbFjarbU1@mid.individual.net> (permalink) |
| References | <d5121a48-5b41-45c0-96e5-0892c946c7db@googlegroups.com> <mtiv7d$hf6$1@speranza.aioe.org> <e69556bc-fd87-4c15-a46d-b0662e4048ef@googlegroups.com> <d65gkuFp69cU1@mid.individual.net> <6fb6b4eb-0d75-489d-8015-cad5be58accd@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-Trace | individual.net yB95yQpyeAAN+b2QjJ4qPwHNOMSE2tPxZ3T+nh+TbpaF8Ne01n |
| Cancel-Lock | sha1:e44ZRo0jpFYvj75XM4HopSiZHDI= |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
| In-Reply-To | <6fb6b4eb-0d75-489d-8015-cad5be58accd@googlegroups.com> |
| Xref | csiph.com comp.lang.clipper.visual-objects:8423 |
Show key headers only | View raw
Hi Fabio,
you might try to use the background of your shellwindow as the
background of your fixedicon, e. g.
class MyFixedIcon inherit FixedIcon
METHOD Expose(oEvent) CLASS MyFixedIcon
SELF:Background := Brush{<Color of the background of your shellwindow>}
SUPER:Expose(oEvent)
RETURN SELF
HTH
Karl
Am 19.09.2015 um 22:57 schrieb Fabio Romling Rotheia:
> Hey Franz and Karl,
>
> You guys are Genius!
> It Works!!
>
> Another question: The icon is not transparent, like when i draw with DrayIconEx. Is there a way to make it transparent?
>
> Thanks a lot!
> Fábio.
>
> Em sábado, 19 de setembro de 2015 13:26:08 UTC-3, Karl-Heinz escreveu:
>> 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
>
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Icon draw question Fabio Romling Rotheia <pinbitmap@gmail.com> - 2015-09-18 18:03 -0700
Re: Icon draw question Franz Rachbauer <office@rachbauer.org> - 2015-09-19 08:26 +0200
Re: Icon draw question Fabio Romling Rotheia <pinbitmap@gmail.com> - 2015-09-19 05:54 -0700
Re: Icon draw question "Karl-Heinz" <invalid@invalid.invalid> - 2015-09-19 18:25 +0200
Re: Icon draw question Fabio Romling Rotheia <pinbitmap@gmail.com> - 2015-09-19 13:57 -0700
Re: Icon draw question Franz Rachbauer <office@rachbauer.org> - 2015-09-22 08:13 +0200
Re: Icon draw question Karl Wochele <kw@e©os-system.dot.de> - 2015-09-22 13:15 +0200
Re: Icon draw question "Karl-Heinz" <invalid@invalid.invalid> - 2015-09-22 21:04 +0200
Re: Icon draw question Fabio Romling Rotheia <pinbitmap@gmail.com> - 2015-09-22 12:57 -0700
Re: Icon draw question Paulo Oliveira <paulo@clipinfor.com> - 2015-10-08 09:45 -0700
Re: Icon draw question Fabio Romling Rotheia <pinbitmap@gmail.com> - 2015-10-12 21:50 -0700
Re: Icon draw question Paulo Oliveira <paulo@clipinfor.com> - 2015-10-19 08:51 -0700
Re: Icon draw question Fabio Romling Rotheia <pinbitmap@gmail.com> - 2015-10-19 16:20 -0700
csiph-web