Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Wolfgang Riedmann" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: Icon sizes in VO application Date: Thu, 30 Nov 2017 18:44:08 +0100 Lines: 85 Message-ID: References: <3866a2ed-edb5-4211-af6d-0fb367ad8890@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: individual.net U7xRJWOdWNKdER5eLsK8NAbhBtrsOkyX9oJIPVplla/JPizh4= Cancel-Lock: sha1:eu9SaaRAL+2Boj7Y9B05wOXZ1Xw= User-Agent: XanaNews/1.18.1.6 Xref: csiph.com comp.lang.clipper.visual-objects:11204 Hi Robert, thank you very much! I will try it in the next days and let you know. Wolfgang > The icon class uses LoadImage() to load the image. > > The documentation of the LoadImage() WIn32 api function says about > these sizes that the behavior is dependent on the fuLoad parameter. > VO passes LR_DEFAULTCOLOR (0), which means that LR_DEFAULTSIZE is not > specified. > > The docs say about this flag: > > If this flag is not specified and cxDesired and cyDesired are set to > zero, the function uses the actual resource size. If the resource > contains multiple images, the function uses the size of the first > image. > > Your icon has multiple images, so it uses the size of the first image. > > > Robert > > > Hi Dirk, > > > > > No problem at all to read all the icons of different size out of > > > 1 big ICO-file. > > > > yes, I have found that also. > > > > But Windows should do this itself: if the icon has more sizes in the > > same file, Windows should select the most appriate icon to display. > > I don't know if this a problem specific to VO... > > > > Wolfgang > > > > > > > > > > Suppose, you have a file with 2 icons (16x16 and 32x32). > > > This is the code you need to read these icons: > > > RESOURCE Connect_TwoIcons Icon C:\Temp\Connect.Ico > > > CLASS Connect16_Icon INHERIT Icon > > > METHOD Init() CLASS Connect16_Icon > > > SUPER:Init(ResourceID{"Connect_TwoIcons",_GetInst()},,16,16) > > > RETURN SELF > > > CLASS Connect32_Icon INHERIT Icon > > > METHOD Init() CLASS Connect32_Icon > > > SUPER:Init(ResourceID{"Connect_TwoIcons",_GetInst()},,32,32) > > > RETURN SELF > > > > > > Cheers, Dirk > > > > > > ================================================ > > > > > > Wolfgang Riedmann wrote: > > > > > > > Hi all, > > > > > > > > I have a customer that is very graphics oriented - they even let > > > > design the icons for their applications (ok, they have their own > > > > graphics department). > > > > Unfortunately VO seems to take only the largest icon resolution > > > > from the icon file. Is there anything I can do to change this? > > > > > > > > I have created a sample icon that contains icons in the > > > > resolutions 16x16, 24x24, 32x32, 48x48, 64x64 and 128x128. > > > > Every icon shows its dimension (from 16 to 128), but the icon > > > > that is shown in the taskbar (16x16 pixel) shows "128", so it > > > > is downsized from the 128x128 instead of taking the 16x16 icon > > > > (that would show "16"). > > > > > > > > Has anyone any solution or played with this? > > > > > > > > Wolfgang > > > > > > > > -- --