Solved

How I can create Icon in Windows 2000?

Posted on 2001-07-08
5
140 Views
Last Modified: 2010-04-06
Hi,

How I can create an transparent icon in Windows 2000 without using graphics unit?

In other word, I'd like to create transparent icon by using WinApi command only.

btw, I use Delphi 5 Std.

Thank you for your help
0
Comment
Question by:linux2000
5 Comments
 
LVL 2

Expert Comment

by:joepezt
ID: 6263620
are you talking about buttons with icons in them?. or icons which can be double clicked in windows?

if you use flatbuttons, i guess  you can try

speedbutton1.Glyph.TransparentColor := clWhite;
0
 
LVL 1

Expert Comment

by:alx512
ID: 6263933
The CreateIcon function creates an icon that has the specified size, colors, and bit patterns.

HICON CreateIcon(
  HINSTANCE hInstance,    // handle to application instance
  int nWidth,             // icon width
  int nHeight,            // icon height
  BYTE cPlanes,           // number of planes in XOR bitmask
  BYTE cBitsPixel,        // number of BPP in XOR bitmask
  CONST BYTE *lpbANDbits, // AND bitmask
  CONST BYTE *lpbXORbits  // XOR bitmask
);
Parameters
hInstance [in] Handle to the instance of the module creating the icon.
nWidth [in] Specifies the width, in pixels, of the icon.
nHeight[in] Specifies the height, in pixels, of the icon.
cPlanes[in] Specifies the number of planes in the XOR bitmask of the icon.
cBitsPixel [in] Specifies the number of bits-per-pixel in the XOR bitmask of the icon.
lpbANDbits [in] Pointer to an array of bytes that contains the bit values for the AND bitmask of the icon. This bitmask describes a monochrome bitmap.
lpbXORbits [in] Pointer to an array of bytes that contains the bit values for the XOR bitmask of the icon. This bitmask describes a monochrome or device-dependent color bitmap.
0
 

Author Comment

by:linux2000
ID: 6264545
Do you know how I can create a transparent icon in Win2000 by using CreateIconIndirect command?

Thank you for your help

 
0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 8702591
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 that this question is:

To be PAQ/Refund

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Thank you,
Russell

EE Cleanup Volunteer
0
 

Accepted Solution

by:
PashaMod earned 0 total points
ID: 8818559
Per recommendation,

PashaMod
Community Support Moderator @Experts Exchange
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

773 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