?
Solved

Extracting Windows Icon Image

Posted on 2003-02-25
5
Medium Priority
?
151 Views
Last Modified: 2010-04-04
Hello Experts,
I have a function in C++ which gets the window ICON.
that is using WM_GETICON and CopyImage.
But copy Image returns handle. If I need to get that bitmap Image of the Icon, How do I go about it ?
(to save in a .ico file)

Pls help
Thanks in advance


Anjali
0
Comment
Question by:anjalidevi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 21

Accepted Solution

by:
ziolko earned 100 total points
ID: 8016218
var icon: TIcon;


icon:=TIcon.Create;
icon.Handle:=youriconhadle
icon.SavetoFile(filename)
icon.Free;


ziolko.
0
 
LVL 1

Assisted Solution

by:krukmat
krukmat earned 100 total points
ID: 8017182
Did you try with API call: BitBlt? You can specify the source handle(Icon Handle), and destination handle(aBitmap handle). You must use the ROP option SRCCOPY.
After using it the only thing u sholud do is TBitmap method SaveToFile(...)
For more info about BitBlt, read Win32 SDK Help.
0
 

Expert Comment

by:CleanupPing
ID: 9317074
anjalidevi:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 10

Expert Comment

by:kacor
ID: 9956889
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
       to split points between ziolko and krukmat
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Some days and here is the Christmas Time. I wish good luck and good health for you all and for your loved ones

kacor
EE Cleanup Volunteer
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month9 days, 3 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question