Pocket PC Addict Forums



» BoxWave
BoxWave Corporation
» More Resources

Welcome to the Pocket PC Addict Forums!

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, download files, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   Pocket PC Addict Forums > General Discussion > Pocket PC Tips

view more in our Photo Gallery...

Pocket PC Tips You know how it works. But do you what to know how to make it better? Check out some hot tips for the Pocket PC here.

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 03-28-2004, 07:18 PM
Brad Isaac's Avatar
Honorary Addict!
Extraordinary Addict!
 
Join Date: Jan 2002
Location: North Carolina
Posts: 5,193
Downloads: 0
Uploads: 0
OpenNETCF: Creating an ICON Object in .NET CF

If you are new to .NET CF programming, most likely one of the issues that will cause you to pull your hair out is dealing with ICONs. :? Why does something so small cause so much trouble? Well, because for each icon you want to display, you gotta make two! One big one for the Program directory and a small one for the start menu/folder. Along with those headaches is attaching the ICON to your program.
But what about documents dependent upon your program? How do you attach an icon associated with the document in your application?
Well, that's what Alex Feinman answers in his latest article over at OpenNETCF Creating Icon object from Win32 icon handle in .NET Compact Framework.
"One of the commonly asked questions related to Compact Framework interoperability with the native OS is how to obtain an Icon object given HICON. For example, you want to display an icon associated with the document in your application. You can retrieve HICON using ExtractIconEx or SHGetFileInfo, but what next? The only Icon constructor implemented in CF takes a stream that is expected to contain an .ico file. This means that we need to rebuild the .ico file from an icon handle."
Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 05:21 PM.




Content Relevant URLs by vBSEO 3.3.0
All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2006 by Pocket PC Addict