Click here to Skip to main content
15,908,674 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to block ctrl+alt+del in WinNT Pin
Valera24117617-Mar-03 8:46
Valera24117617-Mar-03 8:46 
GeneralRe: How to block ctrl+alt+del in WinNT Pin
Joan M17-Mar-03 9:08
professionalJoan M17-Mar-03 9:08 
GeneralRe: How to block ctrl+alt+del in WinNT Pin
Valera24117617-Mar-03 9:56
Valera24117617-Mar-03 9:56 
GeneralRe: How to block ctrl+alt+del in WinNT Pin
Joan M17-Mar-03 20:52
professionalJoan M17-Mar-03 20:52 
AnswerRe: How to block ctrl+alt+del in WinNT Pin
Dudi Avramov17-Mar-03 0:26
Dudi Avramov17-Mar-03 0:26 
GeneralRe: How to block ctrl+alt+del in WinNT Pin
Valera24117617-Mar-03 8:48
Valera24117617-Mar-03 8:48 
GeneralToolbar.bmp 256 colors not displaying Pin
JoeSox15-Mar-03 9:21
JoeSox15-Mar-03 9:21 
GeneralRe: Toolbar.bmp 256 colors not displaying Pin
MAAK15-Mar-03 10:48
MAAK15-Mar-03 10:48 
As I understand, your problem is that the 256 colors toolbar bitmap is shown using only 16 colors. If that is the problem then this is the solution.

Firstly add your 256 toolbar bitmap as a bitmap resource, let its ID be IDB_MYTOOLBAR.
Then in the CMainFrame class (or the Child Frame class if it's a child's toolbar) declare an image list object, let it be CImageList m_ToolBarImages, after doing that go to the CMainFrame::OnCreate and write this code after the creation of the toolbar.
//Create the image list, setting its image size to that of single toolbar
//button, and setting color depth to 256 colors (8 bits) and enabling mask
m_ToolBarImages.Create(16, 15, ILC_COLOR8 | ILC_MASK, 3, 3);<br>

//create a CBitmap and load the toolbar bitmap in it
CBitmap bmp;
bmp.LoadBitmap(IDB_MYTOOLBAR);<br>

//add this bitmap to the image list, the image list will automatically
//divide it into equal parts according to the sizes set above.
//The other color paramter is the mask color which is going to be transparent.
//RGB(192, 192, 192) is the default back ground colors in toolbars, change it 
//if you are using different one
m_ToolBarImages.Add(&bmp, RGB(192, 192, 192));<br>

//now we set this image list to the toolbar and everything is done
m_wndToolBar.GetToolBarCtrl().SetImageList(&m_ToolBarImages);


This code should set 8bits or even 24bits buttons to the toolbar with no further procedure, hope it could help you.
GeneralRe: Toolbar.bmp 256 colors not displaying Pin
JoeSox15-Mar-03 11:04
JoeSox15-Mar-03 11:04 
GeneralClass string Manipulators Pin
Makover15-Mar-03 9:19
Makover15-Mar-03 9:19 
GeneralRe: Class string Manipulators Pin
Abbas_Riazi16-Mar-03 2:48
professionalAbbas_Riazi16-Mar-03 2:48 
QuestionHow do I set the first 10 BITS of 4 chars string to a letter?? Pin
IrishSonic15-Mar-03 8:48
IrishSonic15-Mar-03 8:48 
AnswerRe: How do I set the first 10 BITS of 4 chars string to a letter?? Pin
Nish Nishant15-Mar-03 9:26
sitebuilderNish Nishant15-Mar-03 9:26 
AnswerRe: How do I set the first 10 BITS of 4 chars string to a letter?? Pin
moliate15-Mar-03 11:09
moliate15-Mar-03 11:09 
AnswerRe: How do I set the first 10 BITS of 4 chars string to a letter?? Pin
Abbas_Riazi16-Mar-03 3:24
professionalAbbas_Riazi16-Mar-03 3:24 
GeneralRe: How do I set the first 10 BITS of 4 chars string to a letter?? Pin
IrishSonic16-Mar-03 5:03
IrishSonic16-Mar-03 5:03 
GeneralRe: How do I set the first 10 BITS of 4 chars string to a letter?? Pin
Abbas_Riazi16-Mar-03 6:53
professionalAbbas_Riazi16-Mar-03 6:53 
AnswerRe: How do I set the first 10 BITS of 4 chars string to a letter?? Pin
Jambolo16-Mar-03 14:27
Jambolo16-Mar-03 14:27 
QuestionApplication Version standard?? Pin
work_to_live15-Mar-03 7:39
work_to_live15-Mar-03 7:39 
AnswerRe: Application Version standard?? Pin
Anders Molin15-Mar-03 7:52
professionalAnders Molin15-Mar-03 7:52 
AnswerRe: Application Version standard?? Pin
Chris Losinger15-Mar-03 8:23
professionalChris Losinger15-Mar-03 8:23 
GeneralRe: Application Version standard?? Pin
r i s h a b h s16-Mar-03 17:42
r i s h a b h s16-Mar-03 17:42 
GeneralRe: Application Version standard?? Pin
work_to_live19-Mar-03 4:56
work_to_live19-Mar-03 4:56 
AnswerRe: Application Version standard?? Pin
moliate15-Mar-03 8:38
moliate15-Mar-03 8:38 
GeneralDirectX Pin
wanju15-Mar-03 7:19
wanju15-Mar-03 7:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.