Click here to Skip to main content
15,881,882 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSizing controls Pin
baerten5-Feb-07 1:55
baerten5-Feb-07 1:55 
AnswerRe: Sizing controls Pin
Waldermort5-Feb-07 2:10
Waldermort5-Feb-07 2:10 
GeneralRe: Sizing controls Pin
baerten5-Feb-07 3:10
baerten5-Feb-07 3:10 
GeneralRe: Sizing controls Pin
Waldermort5-Feb-07 3:22
Waldermort5-Feb-07 3:22 
GeneralRe: Sizing controls Pin
baerten5-Feb-07 3:41
baerten5-Feb-07 3:41 
QuestionCToolBar basic questions Pin
PatrykDabrowski5-Feb-07 1:02
PatrykDabrowski5-Feb-07 1:02 
AnswerRe: CToolBar basic questions Pin
Mark Salsbery5-Feb-07 6:54
Mark Salsbery5-Feb-07 6:54 
QuestionRe: CToolBar basic questions Pin
PatrykDabrowski5-Feb-07 12:58
PatrykDabrowski5-Feb-07 12:58 
Thanks for help but it seems not working for me... But first, my second question. I was asking how to disable this square "3d-like" frame around my buttons. Image lists do not solve this problem because they are 32x32 pixel and this box is bigger, about 38x38 pixels.

I have partialy solved this problem by this code:

void CToolBarEx::OnTbnHotItemChange(NMHDR *pNMHDR, LRESULT *pResult)
{
*pResult = (1-m_bHoverMouse); //0=no change;1=no box around buttons
}

and now, when I move the mouse over buttons, this box is not drawn but when I press the button it is still there...How to disable it completly??

To my last question, I have almost copy-pasted Your code to my app but the buttons are still opaque. I have a transparent color RGB(255,0,255) in my bitmap containing 6 buttons (192x32 24bit bitmap). Now the transparent color is not directly drawn but replaced by the plain gray (background) color. That would be fine, but I have a background bitmap?!?

Maybe the way I'm drawing my background bitmap is wrong??? The drawing code is:

BOOL CToolBarEx::OnEraseBkgnd(CDC* pDC)
{
CRect rect;
GetClientRect(&rect); //toolbar rect
CBrush *m_brOld = NULL; //Old brush

m_brOld = pDC->SelectObject(&m_bgBrush); //load my background brush
pDC->FillRect(&rect,&m_bgBrush); //fill the whole toolbar
pDC->SelectObject(m_brOld); //restore original brush

return TRUE;
}

Maybe I should save somehow this brush into the toolbar's DC for proper background drawing when the control draw its buttons?? How to "tell" the control to use bitmap/brush to draw its background??

Thanks againSmile | :) I'm waiting for Your response...
AnswerRe: CToolBar basic questions Pin
Mark Salsbery5-Feb-07 13:37
Mark Salsbery5-Feb-07 13:37 
QuestionXPCOM Creation Pin
johnalek5-Feb-07 0:53
johnalek5-Feb-07 0:53 
AnswerRe: XPCOM Creation Pin
_AnsHUMAN_ 5-Feb-07 1:16
_AnsHUMAN_ 5-Feb-07 1:16 
AnswerRe: XPCOM Creation Pin
Hamid_RT5-Feb-07 7:49
Hamid_RT5-Feb-07 7:49 
AnswerRe: XPCOM Creation Pin
ThatsAlok6-Feb-07 20:11
ThatsAlok6-Feb-07 20:11 
Questionrelated to network module Pin
sudhir.marni5-Feb-07 0:23
sudhir.marni5-Feb-07 0:23 
GeneralRe: related to network module Pin
johnalek5-Feb-07 1:12
johnalek5-Feb-07 1:12 
AnswerRe: related to network module Pin
David Crow5-Feb-07 3:01
David Crow5-Feb-07 3:01 
AnswerRe: related to network module Pin
Hamid_RT5-Feb-07 7:46
Hamid_RT5-Feb-07 7:46 
QuestionON Network module Pin
Member 35534025-Feb-07 0:17
Member 35534025-Feb-07 0:17 
AnswerRe: ON Network module Pin
Waldermort5-Feb-07 2:06
Waldermort5-Feb-07 2:06 
AnswerRe: ON Network module Pin
David Crow5-Feb-07 3:03
David Crow5-Feb-07 3:03 
AnswerRe: ON Network module Pin
Eytukan5-Feb-07 3:15
Eytukan5-Feb-07 3:15 
AnswerRe: ON Network module Pin
Hamid_RT5-Feb-07 7:42
Hamid_RT5-Feb-07 7:42 
QuestionMFC STATUS BAR PROBLEM Pin
T.RATHA KRISHNAN4-Feb-07 23:44
T.RATHA KRISHNAN4-Feb-07 23:44 
AnswerRe: MFC STATUS BAR PROBLEM Pin
kasturi_haribabu5-Feb-07 0:04
kasturi_haribabu5-Feb-07 0:04 
GeneralRe: MFC STATUS BAR PROBLEM Pin
T.RATHA KRISHNAN5-Feb-07 0:20
T.RATHA KRISHNAN5-Feb-07 0:20 

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.