How to create nice toolbar in CDialog app
-
Hi:) I want to add a toolbar to my application but when I use 'standard' CToolBar class I can't load my 32x32 24-bit bitmaps into it (Visual Studio 2003 resource editor converts them to some ugly-looking 8-colors bitmaps...) Is it possible to create nice looking toolbars (ie. like those in IE6) with handle for changing its position and locking/unlocking feature just using CToolBar class?? I also want to create my app menu "File Edit ..." on a toolbar like IE6 does. Is it possible using this base MFC control? If not, could someone point me to the article where I could find some more informations? Thanks for any help.
-
Hi:) I want to add a toolbar to my application but when I use 'standard' CToolBar class I can't load my 32x32 24-bit bitmaps into it (Visual Studio 2003 resource editor converts them to some ugly-looking 8-colors bitmaps...) Is it possible to create nice looking toolbars (ie. like those in IE6) with handle for changing its position and locking/unlocking feature just using CToolBar class?? I also want to create my app menu "File Edit ..." on a toolbar like IE6 does. Is it possible using this base MFC control? If not, could someone point me to the article where I could find some more informations? Thanks for any help.
PatrykDabrowski wrote:
(ie. like those in IE6)
Look up CReBar.
Nibu thomas A Developer Programming tips[^] My site[^]
-
Hi:) I want to add a toolbar to my application but when I use 'standard' CToolBar class I can't load my 32x32 24-bit bitmaps into it (Visual Studio 2003 resource editor converts them to some ugly-looking 8-colors bitmaps...) Is it possible to create nice looking toolbars (ie. like those in IE6) with handle for changing its position and locking/unlocking feature just using CToolBar class?? I also want to create my app menu "File Edit ..." on a toolbar like IE6 does. Is it possible using this base MFC control? If not, could someone point me to the article where I could find some more informations? Thanks for any help.
-
Hi:) I want to add a toolbar to my application but when I use 'standard' CToolBar class I can't load my 32x32 24-bit bitmaps into it (Visual Studio 2003 resource editor converts them to some ugly-looking 8-colors bitmaps...) Is it possible to create nice looking toolbars (ie. like those in IE6) with handle for changing its position and locking/unlocking feature just using CToolBar class?? I also want to create my app menu "File Edit ..." on a toolbar like IE6 does. Is it possible using this base MFC control? If not, could someone point me to the article where I could find some more informations? Thanks for any help.
-
Hi:) I want to add a toolbar to my application but when I use 'standard' CToolBar class I can't load my 32x32 24-bit bitmaps into it (Visual Studio 2003 resource editor converts them to some ugly-looking 8-colors bitmaps...) Is it possible to create nice looking toolbars (ie. like those in IE6) with handle for changing its position and locking/unlocking feature just using CToolBar class?? I also want to create my app menu "File Edit ..." on a toolbar like IE6 does. Is it possible using this base MFC control? If not, could someone point me to the article where I could find some more informations? Thanks for any help.
PatrykDabrowski wrote:
I can't load my 32x32 24-bit bitmaps into it (Visual Studio 2003 resource editor converts them to some ugly-looking 8-colors bitmaps...)
When you create the image list for the toolbar control, try building it like this... CBitmap bitmap; bitmap.LoadBitmap(IDB_TOOLBARBITMAP); // (the '2' in the following call is the number of buttons in the bitmap) m_ToolBarImageList.Create(32, 32, ILC_COLOR24|ILC_MASK, 2, 1); // (RGB(0x00,0xFF,0x00) sets the transparent color to bright green) m_ToolBarImageList.Add(&bitmap, RGB(0x00,0xFF,0x00));