This site is no longer active and is available for archival purposes only. Registration and login is disabled.

help me display an icon from a file


help me display an icon from a file

Postby JohnE » Feb 20, 2002 @ 7:28am

JohnE
pm Member
 
Posts: 14
Joined: Feb 18, 2002 @ 4:24pm


Postby Dan East » Feb 20, 2002 @ 2:42pm

Are you trying to get an icon from an external EXE or DLL, or from the EXE you are writing? If you want a handle to an icon in your program's resources, then use LoadIcon or LoadImage. If you want to extact icons directly form other programs, then use ExtractIconEx.

Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby JohnE » Feb 20, 2002 @ 3:38pm

I'm hoping it is possible to load the icons from a myIcon.ico file. I would not like to be limited to a finite # of icons in a DLL or EXE.
JohnE
pm Member
 
Posts: 14
Joined: Feb 18, 2002 @ 4:24pm


Postby Dan East » Feb 20, 2002 @ 3:51pm

User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby JohnE » Feb 20, 2002 @ 8:59pm

JohnE
pm Member
 
Posts: 14
Joined: Feb 18, 2002 @ 4:24pm


Postby Dan East » Feb 20, 2002 @ 10:08pm

User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby JohnE » Feb 21, 2002 @ 12:07am

JohnE
pm Member
 
Posts: 14
Joined: Feb 18, 2002 @ 4:24pm


Postby Dan East » Feb 21, 2002 @ 12:30am

User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby JohnE » Feb 21, 2002 @ 1:16am

JohnE
pm Member
 
Posts: 14
Joined: Feb 18, 2002 @ 4:24pm


Postby Dan East » Feb 21, 2002 @ 3:25am

User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby JohnE » Feb 21, 2002 @ 4:36am

Without any change to the code (besides the path to the file) it extracted a 32x32 icon from a .dll. It appears to have a problem with .ico files.
JohnE
pm Member
 
Posts: 14
Joined: Feb 18, 2002 @ 4:24pm


Postby Dan East » Feb 21, 2002 @ 5:17am

Well, I'm not exactly sure the CE version supports ico files. According to the Windows CE API docs:
"This function retrieves the handle from the specified executable file or dynamic-link library (DLL)."

That differs from the description in MSDN for the regular Windows API. I have never tried extracting from ico files before. Also, if the icon you are trying to extract is 32x32, then pass the pointer to the handle as the 3rd parameter instead of the 4th.

Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby JohnE » Feb 21, 2002 @ 5:33am

I don't know if you are fimiliar with the newly released DoobloDate but the PPC App allows users to create icon files and use them in the product. I wonder how they accomplished this?
JohnE
pm Member
 
Posts: 14
Joined: Feb 18, 2002 @ 4:24pm


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum