Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - ICON not work
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ICON not work

 Post Reply Post Reply
Author
Message
dixonchu View Drop Down
Newbie
Newbie


Joined: 18 April 2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote dixonchu Quote  Post ReplyReply Direct Link To This Post Topic: ICON not work
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 19 April 2007 at 2:30am
Hello,
 
How you call addicon or loadicon?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
dixonchu View Drop Down
Newbie
Newbie


Joined: 18 April 2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote dixonchu Quote  Post ReplyReply Direct Link To This Post 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
 
 
 
                        
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 19 April 2007 at 4:50am
Hi,
 
imagestate parameter have to be 0.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
dixonchu View Drop Down
Newbie
Newbie


Joined: 18 April 2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote dixonchu Quote  Post ReplyReply Direct Link To This Post Posted: 19 April 2007 at 9:19am
Dear Oleg
 
It's OK now !
 
Thank you very much
 
Best Regards
 
Dixon Chu
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.