change must to upload
1.insert icon
2.int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
m_ImageList.Create(30,24, ILC_COLOR24 | ILC_MASK, 6 , 6);
m_UnableImageList.Create(30,24, ILC_COLOR24 | ILC_MASK, 6, 6);
//Add Bitmap to the tool bar
// m_ImageList.Add(&bm,TOOLBAR_BACKGROUND_COLOR);
int iLoop = 0;
int j =0;
for (iLoop = 0; iLoop < (sizeof(TOOLBAR_ICON_ID) / sizeof(TOOLBAR_ICON_ID[0])); iLoop++)
{
HICON hIcon = NULL;
//hIcon = (HICON)::LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(TOOLBAR_ICON_ID[iLoop]), IMAGE_ICON, 0, 0, 0);
hIcon = (HICON)::LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(TOOLBAR_ICON_ID[iLoop]), IMAGE_ICON, 0, 0, 0);
//hIcon = (HICON)::LoadImage(AfxGetResourceHandle(), 20110, IMAGE_ICON, 0, 0, 0);
if (hIcon)
{
m_ImageList.Add(hIcon);
DeleteObject(hIcon);
j++;
}
}
for (iLoop = 0; iLoop < (sizeof(TOOLBAR_DISICON_ID) / sizeof(TOOLBAR_DISICON_ID[0])); iLoop++)
{
HICON hIcon = NULL;
hIcon = (HICON)::LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(TOOLBAR_DISICON_ID[iLoop]), IMAGE_ICON, 0, 0, 0);
// hIcon = (HICON)::LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(TOOLBAR_DISICON_ID[iLoop+1]), IMAGE_ICON, 0, 0, 0);
if (hIcon)
{
m_UnableImageList.Add(hIcon);
DeleteObject(hIcon);
j++;
}
}
1.insert icon
2.int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
m_ImageList.Create(30,24, ILC_COLOR24 | ILC_MASK, 6 , 6);
m_UnableImageList.Create(30,24, ILC_COLOR24 | ILC_MASK, 6, 6);
//Add Bitmap to the tool bar
// m_ImageList.Add(&bm,TOOLBAR_BACKGROUND_COLOR);
int iLoop = 0;
int j =0;
for (iLoop = 0; iLoop < (sizeof(TOOLBAR_ICON_ID) / sizeof(TOOLBAR_ICON_ID[0])); iLoop++)
{
HICON hIcon = NULL;
//hIcon = (HICON)::LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(TOOLBAR_ICON_ID[iLoop]), IMAGE_ICON, 0, 0, 0);
hIcon = (HICON)::LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(TOOLBAR_ICON_ID[iLoop]), IMAGE_ICON, 0, 0, 0);
//hIcon = (HICON)::LoadImage(AfxGetResourceHandle(), 20110, IMAGE_ICON, 0, 0, 0);
if (hIcon)
{
m_ImageList.Add(hIcon);
DeleteObject(hIcon);
j++;
}
}
for (iLoop = 0; iLoop < (sizeof(TOOLBAR_DISICON_ID) / sizeof(TOOLBAR_DISICON_ID[0])); iLoop++)
{
HICON hIcon = NULL;
hIcon = (HICON)::LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(TOOLBAR_DISICON_ID[iLoop]), IMAGE_ICON, 0, 0, 0);
// hIcon = (HICON)::LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(TOOLBAR_DISICON_ID[iLoop+1]), IMAGE_ICON, 0, 0, 0);
if (hIcon)
{
m_UnableImageList.Add(hIcon);
DeleteObject(hIcon);
j++;
}
}