HICON CreateIcon(hInstance,nWidth,nHeight,nPlanes,nBitsPixel,lpANDbits,lpXORbits)
This function creates an icon that has specified width, height, colors, and bit patterns.
| Parameter | Type/Description | |
| hInstance | HANDLE Identifies an instance of the module creating the icon. | |
| nWidth | int Specifies the width in pixels of the icon. | |
| nHeight | int Specifies the height in pixels of the icon. | |
| nPlanes | BYTE Specifies the number of planes in the XOR mask of the icon. | |
| nBitsPixel | BYTE Specifies the number of bits per pixel in the XOR mask of the icon. | |
| Parameter | Type/Description | |
| lpANDbits | LPSTR Points to an array of bytes that contains the bit values for the AND mask of the icon. This array must specify a monochrome mask. | |
| lpXORbits | LPSTR Points to an array of bytes that contains the bit values for the XOR mask of the icon. This can be the bits of a monochrome or device-dependent color bitmap. |
The return value identifies an icon if the function is successful. Otherwise, it is NULL.