Print Page | Close Window

ICON not work

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=6925
Printed Date: 19 June 2025 at 1:20am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ICON not work
Posted By: dixonchu
Subject: ICON not work
Date Posted: 19 April 2007 at 12:32am
Dear all
 
I'm a firsttime use in here
 
I have a problem in add icon into ImageManagerIcons
 
I'm not use VB , so can't add icon with ImageList
 
the only way is use "addicon" or "loadicon"
 
but  the "ImageManagerIcons.count" value is always return 0, after I did it
do anyone could give me a sample code , to tell me how to do it
 
or add the image from .rc resource file
 
Thanks
 
Best Regards
 
Dixon Chu



Replies:
Posted By: Oleg
Date Posted: 19 April 2007 at 2:30am
Hello,
 
How you call addicon or loadicon?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: dixonchu
Date Posted: 19 April 2007 at 3:19am
Dear Oleg
 
Thanks for your quickly response
 
I use Fivewin ( Clipper ) language.
 
"Codejock.ImageManager.10.4.2" ) , "Codejock.CommandBarsFrame.10.4.2" and
"Codejock.SkinFrameWork.10.4.2"   
 
they are all OK except show Image on control button .
 
The problem is That I can't add the image to Icons
( the count is always return 0 )
 
The following is the code of adding the image into Icons  
 
===============
 oImageMnager := TActiveX():New( oWnd, "Codejock.ImageManager.10.4.2" )        
 cIMG := ActXPdisp( oImageMnager:hActiveX )                                    
 oIMG := TOleAuto():New( cIMG )  // get the object of ImageManager             
 
                                                                               
 nIco := Loadicon(GetResources(),100 ) //  get the handle of icon              
 
 oIMG:Icons:AddIcon(nIco,101,1) 
 
 DestroyIcon(nIco) 
 
                                                                               
 oIMG:Icons:LoadIcon("d:\fwh\samples\wsf.ico",100,1)                           
                                                                               
 oIMG:Icons:LoadBitmap("d:\fwh\bitmaps\hires\back.png",100,1)                  
                                                                               
 oIMG:Icons:LoadIcon("wsf.ico",100,1)                                          
                                                                               
 oIMG:Icons:LoadBitmap("wsf.ico",100,1)                                        
                                                                               
 msginfo(oIMG:Icons:count())                                                    
 
=============================
 
for your reference
 
Regards
 
Dixon Chu
 
 
 
                        


Posted By: Oleg
Date Posted: 19 April 2007 at 4:50am
Hi,
 
imagestate parameter have to be 0.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: dixonchu
Date Posted: 19 April 2007 at 9:19am
Dear Oleg
 
It's OK now !
 
Thank you very much
 
Best Regards
 
Dixon Chu



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net