Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #8420

Re: Icon draw question

Path csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "Karl-Heinz" <invalid@invalid.invalid>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Icon draw question
Date Sat, 19 Sep 2015 18:25:48 +0200
Lines 77
Message-ID <d65gkuFp69cU1@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>
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 <e69556bc-fd87-4c15-a46d-b0662e4048ef@googlegroups.com>
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

Show key headers only | View raw


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


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