tittle of san quentin quailtoms kids outlet burberry sale picayune shavergenuine burberry uk exaltationtoms shoes outlet toms sale cheap come awaytoms shoes cheap vestalherve leger outlet hawk
ReplyOriginally posted by: jiulun
This can be solved by using toolbar's CustomDraw in the postpaint stage.
Add the prototype in OOExToolBar.hpp like this
and add the message map here
void COOExToolBar::OnCustomDraw(NMHDR *pNMHDR, LRESULT *pResult)
CDC* pDC = CDC::FromHandle(lpNMCD->hdc);
switch (lpNMCD->dwDrawStage)
case CDDS_POSTPAINT:
void COOExToolBar::EraseSeparators(CDC* pDC)
int nButtons = bar.GetButtonCount();
CRect rcPrevItem;
rcPrevItem += CPoint(rcPrevItem.Width(), 0);
// The buttonface color maybe different in different style
Where function EraseSeparators is one added to the class.
The separator is somehow associated with the previous button.
If you set dropdown type for one button, which is wider than the normal one.
So the separators will come when the toolbar in vertical position.
Separators are redrawn with the buttonface color, so they will disappear.
//}}AFX_MSG
afx_msg void OnCustomDraw(NMHDR *pNMHDR, LRESULT *pResult);
DECLARE_MESSAGE_MAP()
//}}AFX_MSG_MAP
ON_NOTIFY_REFLECT(NM_CUSTOMDRAW, OnCustomDraw)
END_MESSAGE_MAP()
{
// Only do this if the style is flat. In other style, there is no separator.
if ((::GetWindowLong(m_hWnd, GWL_STYLE) & TBSTYLE_FLAT) == TBSTYLE_FLAT)
{
LPNMCUSTOMDRAW lpNMCD = (LPNMCUSTOMDRAW)pNMHDR;
{
case CDDS_PREPAINT:
// requst the postpaint message
*pResult = CDRF_NOTIFYPOSTPAINT;
break;
// If the toolbar is in vertical position, erase the separator
if(m_dwStyle & CBRS_ORIENT_VERT)
EraseSeparators(pDC);
break;
}
}
}
{
CToolBarCtrl& bar = GetToolBarCtrl();
for (int i = 0; i < nButtons; i++)
{
TBBUTTON tbb;
GetButton(i, &tbb);
if (tbb.fsStyle & TBSTYLE_SEP && i>0)
{
//???
TBBUTTON prevButton;
GetButton(i - 1, &prevButton);
if (prevButton.fsStyle & TBSTYLE_SEP)
{
continue;
}
CRect rcItem;
bar.GetItemRect( i, rcItem );
bar.GetItemRect( i - 1, rcPrevItem);
rcPrevItem.right = rcPrevItem.left + rcItem.Width();
rcItem = rcPrevItem;
// comctl32.dll version >= 4.71, clrBtnFace can be got of the NMTBCUSTOMDRAW passed by customdraw
CBrush br(::GetSysColor(COLOR_BTNFACE));
CBrush* pOldBrush = pDC->SelectObject(&br);
const CRect& rc=rcItem;
pDC->PatBlt(rc.left, rc.top, rc.Width(), rc.Height(), PATCOPY);
pDC->SelectObject(pOldBrush);
br.DeleteObject();
}
}
}
Originally posted by: Frog
if you dock the toolbar vertical, the horizonal separators are still there. Do you know a way to remove them (in vertical mode).
Cheers
Hi,
Originally posted by: Simon
When changing some window's appearance (e.g. changing the the windows scheme) the toolbar icons (after refreshing its parent) are shown with text (although SetTextMode(false) was called on creation).
Have any solution ?
THANKS! (really cool toolbar)
Originally posted by: Pat Laplante
No.
I haven't touch a window machine in ages. I've done mostly MacIntosh work in the past 2 years (porting windows application to the mac osx and os9).
So I don't even remember how the toolbar is working! I did that under VC5 at the time with an old version of CommCtrl.dll.
You could fix it and post your fix to the site!
Pat
Originally posted by: Ray Ku
Your toolbar is really nice although there are some bugs. Do you have any upgrade? Can I implement your codes and toolbar bitmaps into my project?
Thank you?
Ray Ku
Reply
Originally posted by: pinktown
The code have bugs,where have upgrade code?
ReplyOriginally posted by: Joel
Changed this:
ModifyStyle( 0, TBSTYLE_FLAT);
to this:
ModifyStyle( 0, TBSTYLE_FLAT | TBSTYLE_LIST );
to enable the text to be to the right instead of the bottom.
Also made a couple of minor modifications to size the button correctly when the text is there.
However, after a couple of clicks back a forth from text to none I fail to get the OnSetText message to the MainFrame so the recalcsize never gets called.
Wierd, have any hints?
ReplyOriginally posted by: Georg Schreiber
in OOExToolBar.cpp there is a bug-fix in the method CCoolCmdUI::Enable which causes the toolbar to flicker on machindes with COMCTL32 V5.81 installed.
the flickering is caused by a bug-fix for a bug thats no longer existing in V5.81 of COMCTL32.
remove the following line to avoid this problem:
...
if ( !bOn )
{
...
// nNewStyle &= ~TBBS_PRESSED; <== remove this one
}
...
Reply
Originally posted by: Madhu
hello sir,
i could not download your demo project.i tried it many times.But all the time i failed.would you please send it to me?i have mentioned my mail id.
thanks
-madhu