please dont rip this site Prev Next

CreateIcon info  Overview  Group

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 bits per pixel in XOR bitmask

    CONST BYTE *lpbANDbits,

// pointer to AND bitmask array

    CONST BYTE *lpbXORbits 

// pointer to XOR bitmask array

   );

Parameters

hInstance
Identifies the instance of the module creating the icon.
nWidth
Specifies the width, in pixels, of the icon.
nHeight
Specifies the height, in pixels, of the icon.
cPlanes
Specifies the number of planes in the XOR bitmask of the icon.
cBitsPixel
Specifies the number of bits per pixel in the XOR bitmask of the icon.
lpbANDbits
Points to an array of bytes that contains the bit values for the AND bitmask of the icon. This bitmask describes a monochrome bitmap.
lpbXORbits
Points 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.

Return Values

If the function succeeds, the return value is the handle to an icon.

If the function fails, the return value is NULL. To get extended error information, call GetLastError.

Remarks

The nWidth and nHeight parameters must specify a width and height supported by the current display driver, because the system cannot create icons of other sizes. To determine the width and height supported by the display driver, use the GetSystemMetrics function, specifying the SM_CXICON or SM_CYICON value.

CreateIcon applies the following truth table to the AND and XOR bitmasks:

AND bitmask

XOR bitmask

Display

0

0

Black

0

1

White

1

0

Screen

1

1

Reverse screen

See Also

GetSystemMetrics 


file: /Techref/os/win/api/win32/func/src/f09_17.htm, 5KB, , updated: 2001/6/24 12:53, local time: 2024/11/23 15:23,
TOP NEW HELP FIND: 
3.144.42.174:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://massmind.org/Techref/os/win/api/win32/func/src/f09_17.htm"> CreateIcon</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .