The MASM Forum Archive 2004 to 2012

Specialised Projects => Compiler Based Assembler => Pelle's C compiler and tools => Topic started by: Vortex on September 11, 2010, 10:43:38 AM

Title: SetConsoleIcon example
Post by: Vortex on September 11, 2010, 10:43:38 AM

#include <windows.h>

/* Check BuildLib.lib and kernel32.def to build kernel32v2.lib exporting the SetConsoleIcon function */

BOOL WINAPI SetConsoleIcon(HICON hIcon);

int main( int argc, char **argv )
{
HICON hIcon=LoadIcon(GetModuleHandle(0),MAKEINTRESOURCE(200));

MessageBox(0,"Click the message box to change the console icon","Test",MB_OK);

    SetConsoleIcon(hIcon);

    MessageBox(0,"Console icon changed","Test",MB_OK);

return 0;
}