Loading Icon into Static Control

forum.td.development (2005-2010)
NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Loading Icon into Static Control

Post by NewsgroupServer » 06 Apr 2010, 18:13

 Posted by:  Tina Stewart 

Hi

I'm having issues loading an icon into a static control.
I have tried to load an icon from a resource.
! STM_SETICON = 0x0170
Set hIconCentura = VisPicLoad( PIC_FormatIcon | PIC_LoadSWinRes |
PIC_LoadLargeIcon, 'icoTest','')
Set hIcon = VisPicGetHandle( hIconCentura )
Call SalSendMsg( ccStatic, STM_SETICON, IMAGE_ICON, hIcon )

That did not work.
I have tried to load an icon from a file:

Set hIcon = LoadImageA( 0, 'icoTest.ico', IMAGE_ICON, 32, 32,
LR_LOADFROMFILE|LR_DEFAULTSIZE )
Call SalSendMsg(ccStatic, STM_SETICON, IMAGE_ICON, hIcon )

Any ideas would be greatly appreciated.
T

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Loading Icon into Static Control

Post by NewsgroupServer » 06 Apr 2010, 19:08

 Posted by:  Krzysztof Dorko 

Hi
Did you try this
Call SalSendMsg( ccStatic, STM_SETICON, hIcon,0 )
According to MS lParam is not in use and wParam is a hIcon handle
HTH
Kris

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Loading Icon into Static Control

Post by NewsgroupServer » 07 Apr 2010, 18:25

 Posted by:  Tina Stewart 

Unfortunately, that did not work. I have managed to load an icon now by
using the SalDynamic library.
Call SalDynamicCreatePicture( hWndForm, 5, 5, 50, 50, hIcon,
PIC_FormatIcon )

Return to “td.development”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests