Okay, I have been googling and looking on MSDN for this for a couple hours or so, and I will continue to do so until somebody replies. I need some help on a program I am making in my free time.
Can sombody tell me what would be a good way to create my own icon list to use in a toolbar. I have a toolbar, and I don't like the look of the IDB_STD_SMALL_COLOR icon list. I would really like to make my own, and I can make the icons, I just need to know how I can create my own list of icons. But there is a catch, it can't use any resource scripts.
I am not looking for somebody to just hand me a script and say "here you go", I would like either a small tutorial by you, or a link to a tutorial.
I have an idea of how I could do it:
TBBUTTON btn[12];
TBADDBITMAP bmp;
HINSTANCE hInst = GetModuleHandle(NULL);
bmp.hInst = hInst;
//bmp.nID = IDB_STD_LARGE_COLOR; // Can I just not set nID?
SendMessage(toolbar, TB_ADDBITMAP, 0, (LPARAM)&bmp);
ZeroMemory(btn, sizeof(btn));
btn[0].iBitmap = LoadIcon(hInst, "new.ico");
btn[0].fsState = TBSTATE_ENABLED | TBSTATE_WRAP;
btn[0].fsStyle = TBSTYLE_BUTTON;
btn[0].idCommand = CTRL_MENU_FILE_NEW;
// ...
But this doesn't work, because iBitmap is an integer. So there must be some way. I have heard of image lists, and looked them up on MSDN, but I don't understand them. They are just numbers, where do the actual filenames come into play?
Summary: How to set my own icons for a toolbar.