Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

icon on win32 button

WNDCLASSEX wcex = {}; 
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = hInstance;
wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(EXAMPLE_ICON));
wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
wcex.lpszMenuName = nullptr;
wcex.lpszClassName = "ExampleIconWindowClass";
wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_APPLICATION));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #icon #button
ADD COMMENT
Topic
Name
8+9 =