Home | About us | Overview | Software - Download | Evaluate | Order | Support | Contact | F.A.Q. | Documentations | Blog | Newsletter
Loading...

Display Icon from a resource

Support for GdImageBox OCX and GdImageBox Pro ActiveX/SDK.

Display Icon from a resource

Postby tomurphy » Mon Dec 08, 2008 2:49 pm

Hi

We are currently evaluating the ImageBox component and would like to know if it is possible to display an Icon which is embedded in the application as a resource? We have got this working for bitmap resources using DispayFromHBitmap but not icons.

Cheers
Tom
--
Triumph Business Systems
www.triumph.com.au
tomurphy
 
Posts: 15
Joined: Mon Dec 08, 2008 9:05 am

Re: Display Icon from a resource

Postby Loïc » Mon Dec 08, 2008 2:56 pm

Hi Tom,

what programming language ?

Best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4226
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Display Icon from a resource

Postby tomurphy » Mon Dec 08, 2008 3:13 pm

Hi Loic

It's Visual Dataflex 14.0 but it uses the windows api to access the images from the resource, i.e. LoadImage and passes IMAGE_ICON. Using DisplayFromHBitmap returns an error 7, ViewerWin32Error, should it work or should I be using another command. I can display the icon when I load it from disk using DisplayFromFile but need to display it from the resource.

Cheers
Tom
--
Triumph Business Systems
www.triumph.com.au
tomurphy
 
Posts: 15
Joined: Mon Dec 08, 2008 9:05 am

Re: Display Icon from a resource

Postby Loïc » Mon Dec 08, 2008 3:25 pm

OK Tom, I understood.

Unfortunately there is no function to display an icon from an icon handle. Maybe you can find a way to convert the hicon to bitmap ?

In GdPicture Pro we have a method called CreateImageFromHICON() which seems to be what you need. For the next release I will add a DisplayImageFromHICON() in the ImageBox control.

Best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4226
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Display Icon from a resource

Postby tomurphy » Mon Dec 08, 2008 3:30 pm

Hi Loic

Thanks for the reply. Do you have any idea when your next release will be?

Cheers
Tom
tomurphy
 
Posts: 15
Joined: Mon Dec 08, 2008 9:05 am

Re: Display Icon from a resource

Postby Loïc » Mon Dec 08, 2008 3:35 pm

Tom, we just released the last edition. I think nexte releases will be available in end of January 2009 now.


Here an exemple using the Win32 api to convert an HICON to an HBITMAP. Maybe you can convert it into your programming language ?

http://www.codeguru.com/forum/archive/i ... 50652.html

Best regards,

Loîc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4226
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Display Icon from a resource

Postby tomurphy » Mon Dec 08, 2008 3:39 pm

Hi Loic

Thank you for your time and effort, i'll check it out.

Cheers
Tom
tomurphy
 
Posts: 15
Joined: Mon Dec 08, 2008 9:05 am

Re: Display Icon from a resource

Postby tomurphy » Wed Dec 10, 2008 9:13 am

Hi Loic

Also can we put ourselves to beta test the next version? How does your beta program normally work?

Cheers
Tom
tomurphy
 
Posts: 15
Joined: Mon Dec 08, 2008 9:05 am

Re: Display Icon from a resource

Postby Loïc » Wed Dec 10, 2008 10:50 am

Hi Tom,

Unfortunately we can't provide beta edition but only with the same architecture that the current edition (same properties, same methods...). This for binary compatibility requirement.

However i have an idea. Could you tell me what is the returned value of the DisplayFromHBitmap() method in your case ?

Best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4226
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Display Icon from a resource

Postby tomurphy » Thu Dec 11, 2008 3:00 am

Hi Loic

When using DisplayFromHBitmap to get the icon resource it returns error 7 - win32.

Cheers
Tom
tomurphy
 
Posts: 15
Joined: Mon Dec 08, 2008 9:05 am

Re: Display Icon from a resource

Postby Loïc » Thu Dec 11, 2008 9:52 pm

HI,

You can try the last release available. I've added HICON support into the DisplayFromHBitmap() method !
For the next major release you will be able to use directly the DisplayFromHICON() method.

Best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4226
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Display Icon from a resource

Postby tomurphy » Fri Dec 12, 2008 11:49 am

Hi Loic

Thanks for that, works perfectly.

Cheers
Tom
tomurphy
 
Posts: 15
Joined: Mon Dec 08, 2008 9:05 am


Return to GdImageBox [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest

cron