// Toolbar.rc
#include "resource.h"
IDI_MAINICON2 ICON "MainIcon.ico"
// resource.h
#define IDI_MAINICON2 201
// main.cpp
icon_button = CreateWindow(TEXT("button"), TEXT("Button"),
WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON |
BS_ICON | BS_TEXT,
80, 80, 55, 40,
hwnd, (HMENU) 2, NULL, NULL);
// First Declare HICON hIcon1 at top of program and then
// use it to store Loaded icon
hIcon1 = LoadIcon (NULL, IDI_INFORMATION);
SendMessage(icon_button,BM_SETIMAGE,IMAGE_ICON,(LPARAM)hIcon1);
This wont work it sets the icon at the bottom toolbar to the icon but the top little one to the left is not working and it does not show up onto my button
I do know it since i was writing it!!!