Click here to Skip to main content
15,891,689 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Advice on where to start Pin
Chris Losinger8-Nov-05 5:59
professionalChris Losinger8-Nov-05 5:59 
GeneralRe: Advice on where to start Pin
cRaCKh0rN8-Nov-05 10:08
cRaCKh0rN8-Nov-05 10:08 
AnswerRe: Advice on where to start Pin
LighthouseJ8-Nov-05 19:43
LighthouseJ8-Nov-05 19:43 
QuestionBeginner Programmer, Got some ideas for me? Pin
Monkey De Lufy: Pirate King8-Nov-05 4:47
Monkey De Lufy: Pirate King8-Nov-05 4:47 
AnswerRe: Beginner Programmer, Got some ideas for me? Pin
David Crow8-Nov-05 4:50
David Crow8-Nov-05 4:50 
QuestionDataGrid Pin
rsw18-Nov-05 4:38
rsw18-Nov-05 4:38 
QuestionCRC-16 Convert to vb.Net Pin
RichardBerry8-Nov-05 4:33
RichardBerry8-Nov-05 4:33 
Questionshowing a bitmap on a CStatic in a toolbar Pin
Mircea Grelus8-Nov-05 4:33
Mircea Grelus8-Nov-05 4:33 
I have an Intenet Explorer toolbar and I want to display a bitmap on it. I used the button separator to make room for the control in the toolbar and I can display text in the CStatic, but when I try to display an image the whole CStatic is painted with a single color. I think it is the first pixel color of the bmp.

I use the following code:
//in the header file:
<br />
CStatic anonTitle;<br />


//in the cpp file
<br />
anonTitle.Create("",WS_CHILD | WS_VISIBLE | SS_BITMAP | SS_CENTERIMAGE, rcTitle,this));<br />
<br />
CBitmap anonPic;<br />
anonPic.LoadBitmap(IDB_BITMAP3);<br />
anonTitle.SetBitmap((HBITMAP)anonPic.m_hObject);<br />
anonPic.Detach();<br />


If I use the code from a MFC application it works. But in the toolbar the whole static is painted with only one color.

I have also tried with :
<br />
anonTitle.Create("",WS_CHILD | WS_VISIBLE | SS_BITMAP | SS_CENTERIMAGE, rcTitle,this));<br />
anonTitle.SetBitmap( ::LoadBitmap(AfxGetResourceHandle(), MAKEINTRESOURCE(IDB_BITMAP3)));<br />


and

<br />
CString str;<br />
str.Format(_T("#%d"), IDB_BITMAP3); <br />
anonTitle.Create(str,WS_CHILD | WS_VISIBLE | SS_BITMAP | SS_CENTERIMAGE, rcTitle,this));<br />


and still same result.

Desperate help needed.Sigh | :sigh:
Best regards,
Mircea

Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
Questionvirtual detstruct question when multi derived Pin
followait8-Nov-05 4:23
followait8-Nov-05 4:23 
AnswerRe: virtual detstruct question when multi derived Pin
toxcct8-Nov-05 4:34
toxcct8-Nov-05 4:34 
QuestionRe: virtual detstruct question when multi derived Pin
Bob Stanneveld8-Nov-05 5:51
Bob Stanneveld8-Nov-05 5:51 
AnswerRe: virtual detstruct question when multi derived Pin
Maximilien8-Nov-05 6:40
Maximilien8-Nov-05 6:40 
GeneralRe: virtual detstruct question when multi derived Pin
Bob Stanneveld8-Nov-05 21:57
Bob Stanneveld8-Nov-05 21:57 
AnswerRe: virtual detstruct question when multi derived Pin
toxcct8-Nov-05 6:58
toxcct8-Nov-05 6:58 
GeneralRe: virtual detstruct question when multi derived Pin
Bob Stanneveld8-Nov-05 21:53
Bob Stanneveld8-Nov-05 21:53 
AnswerRe: virtual detstruct question when multi derived Pin
followait8-Nov-05 15:03
followait8-Nov-05 15:03 
GeneralRe: virtual detstruct question when multi derived Pin
Bob Stanneveld8-Nov-05 21:52
Bob Stanneveld8-Nov-05 21:52 
GeneralRe: virtual detstruct question when multi derived Pin
Blake Miller9-Nov-05 5:43
Blake Miller9-Nov-05 5:43 
QuestionCRC-16 Convert to vb.Net Pin
RichardBerry8-Nov-05 3:55
RichardBerry8-Nov-05 3:55 
Questionclicking the titlebar Pin
bonosa8-Nov-05 3:54
bonosa8-Nov-05 3:54 
AnswerRe: clicking the titlebar Pin
Rage8-Nov-05 4:03
professionalRage8-Nov-05 4:03 
QuestionSetWindowText Problem in Release Version Pin
LittleYellowBird8-Nov-05 3:38
LittleYellowBird8-Nov-05 3:38 
AnswerRe: SetWindowText Problem in Release Version Pin
toxcct8-Nov-05 3:57
toxcct8-Nov-05 3:57 
GeneralRe: SetWindowText Problem in Release Version Pin
LittleYellowBird8-Nov-05 4:29
LittleYellowBird8-Nov-05 4:29 
AnswerRe: SetWindowText Problem in Release Version Pin
Rage8-Nov-05 3:57
professionalRage8-Nov-05 3:57 

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.