Originally posted by: ilan zluf
I like to change the view items look like windows Explore.
The item will be also vertically and not just horizontally.
Reply
Originally posted by: Carlos Pratt
How can I display the Bar in a Dialog??, I used custom controls, bue I still can't get to display the bar on a dialog.
The problems is that I don't know what to put on the create function.
thank you for your time
ReplyOriginally posted by: Shridhar G.
Hi,
For my project, I need to display settings
in Outlook-like folders. Here, folders
wont be having any animated buttons.. instead
i need to put a grid in the that place.
So I removed all AddFolder(...) calls from
sample and added ..
wndBar.AddFolderBar("Settings",&m_wndSettings);
// where m_wndSettings is a grid window.
But, it gives assertion and program aborts.
Please suggest me how it can be achieved.
Thanks,
Shridhar.
shri@india.tek.com
Originally posted by: drWolf
Outbar is cool control but it works only with SDI, I need it in MDI Application so here is solution for this. Maybe it's a little lame but it WORKS!
So let's start:
1. Create new toolbar in resource editor, and edit width of this toolbar. The OutBar will have the same width!
2. Add to CMDIFrameWnd derived class a protected variables : CToolBar m_FakeBar and of coz OutBar : CGfxOutBarCtrl m_OutBar.
3. On the END of CMDIFrameWnd::OnCreate method add this
m_FakeBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_LEFT | CBRS_SIZE_FIXED);
4. Overload method CMDIFrameWnd::OnCreateClient and put there original OutBar init code, and change call of OutBar::Create
m_OutBar.Create(WS_CHILD|WS_VISIBLE, CRect(0,0,0,0),
5. Change the code in method OutBar::Create to
6. Add message handler for WM_SIZE (CMDIFrameWnd::OnSize) put this code there:
CMDIFrameWnd::OnSize(nType, cx, cy);
// below you can change
// and move it
Hi everyone!
code :
m_FakeBar.LoadToolBar(IDR_FAKE_TOOLBAR);
this, NULL, dwFlags);
dwFlags = dwFlag;
return CWnd::CreateEx(WS_EX_STATICEDGE, NULL, NULL, dwStyle|WS_CHILD, rect.left,
rect.top, rect.right, rect.bottom,
pParentWnd->m_hWnd, NULL);
CRect rect, rcToolBar;
m_FakeBar.GetClientRect(&rect);
m_wndToolBar.GetWindowRect(&rcToolBar);
rect.DeflateRect(1,4+rcToolBar.Height(),1,1);
rect.InflateRect(0,0,0, 4+rcToolBar.Height());
m_OutBar.MoveWindow(&rect);
That's it ;) the rest is the same like for SDI App.
by drWolf 1999, any sugestions -> drwolf@friko4.onet.pl
Originally posted by: syed
I have problems downloading the zip file, problem is i can download, but when i try to unzip it winzip reports it has some problems, download again, i tried so many times, still no different result.
can naybody help me!!
Originally posted by: Godefroid
When you split the MainFrame, splitter plane have to contain views that can't supply the MDI interface.
is it true?
Originally posted by: Michael Maas
void CGfxOutBarCtrl::SetSelFolder(const int index)
int oSelFolder = iSelFolder, oindex = index;
CWnd * pc = GetFolderChild();
iSelFolder = index;
GetOwner()->SendMessage(WM_OUTBAR_NOTIFY, NM_FOLDERCHANGE, (LPARAM) iSelFolder);
Invalidate();
void CGfxOutBarCtrl::AnimateFolderScroll(const int iFrom, const int iTo)
CRect rc;
GetClientRect(&rc);
CClientDC dc(this);
if(iTo < iFrom)
int ht = ((iFrom - iTo)) * iFolderHeight;
memDC.SelectObject(oldbmp);
bmp.CreateCompatibleBitmap(&dc, bmprct.Width(), bmprct.Height());
memDC.BitBlt(0,0,bmprct.Width(),bmprct.Height(), &dc, bmprct.left, bmprct.top, SRCCOPY);
memDC.SelectObject(oldbmp);
Invalidate();
BOOL bIsAnimating;
in the "GfxOutBarCtrl.h" file
place the line
bIsAnimating = FALSE;
in the constructor in GfxOutBarCtrl.cpp.
if(bIsAnimating)
The outbar control will now have much better animation.
-- myke
I've gone through this terrific control and replaced the present animation routines.
Now several folders scroll at once, and updates are smoother without jumping. Replace the following routines
(all contained in GfxOutbarCtrl.cpp) with their modified versions:
{
ASSERT(index >= 0 && index < GetFolderCount());
// if (index == iSelFolder) return;
if (pc) pc->ShowWindow(SW_HIDE);
iFirstItem = 0;
iLastSel = -1;
if (oindex != oSelFolder)
{
bIsAnimating = TRUE;
if (dwFlags&fAnimation && lAnimationTickCount >= 0) AnimateFolderScroll(oSelFolder, oindex);
bIsAnimating = FALSE;
}
pc = GetFolderChild();
if (pc)
{
CRect rc;
GetInsideRect(rc);
pc->MoveWindow(rc);
pc->ShowWindow(SW_SHOW);
}
}
{
ASSERT(iFrom >= 0 && iFrom < GetFolderCount());
ASSERT(iTo >= 0 && iTo < GetFolderCount());
CDC memDC;
int i;
CBitmap bmp, *oldbmp;
memDC.CreateCompatibleDC(&dc);
int fh = 20;
{
rc.top = (iTo + 1) * iFolderHeight;
rc.bottom -= (arFolder.GetSize() - (iFrom+1)) * iFolderHeight;
bmp.CreateCompatibleBitmap(&dc, rc.Width(), rc.Height());
oldbmp = (CBitmap *) memDC.SelectObject(&bmp);
memDC.BitBlt(0,0,rc.Width(),rc.Height(), &dc, rc.left, rc.top, SRCCOPY);
for(i=0; i<rc.Height() - ht; i+= fh)
{
dc.BitBlt(rc.left, rc.top+i, rc.Width(), rc.Height()-i, &memDC, 0, 0, SRCCOPY);
if(i>0)
{
InvalidateRect(CRect(rc.left, rc.top+i-fh, rc.right, rc.top+i), FALSE);
SendMessage(WM_PAINT);
}
Sleep(lAnimationTickCount/2);
}
bmp.DeleteObject();
}
else
{
rc.top = (iFrom+1) * iFolderHeight;
rc.bottom -= (arFolder.GetSize() - iTo) * iFolderHeight;
CRect bmprct = rc;
bmprct.top = bmprct.bottom - ((iTo - iFrom - 1) * iFolderHeight);
bmprct.bottom += iFolderHeight;
oldbmp = (CBitmap *) memDC.SelectObject(&bmp);
for(i=0; i<bmprct.top - rc.top; i+= fh)
{
dc.BitBlt(bmprct.left, bmprct.top-i, bmprct.Width(), bmprct.Height(), &memDC, 0, 0, SRCCOPY);
if(i>0)
{
InvalidateRect(CRect(bmprct.left, bmprct.bottom-i, bmprct.right, bmprct.bottom-i+fh), FALSE);
SendMessage(WM_PAINT);
}
Sleep(lAnimationTickCount/2);
}
bmp.DeleteObject();
}
}
Then declare the variable:
And add the following lines to the "void CGfxOutBarCtrl::HighlightFolder" function
(at the very beginning):
return;
Originally posted by: Victor R�der
There's a bug when you click on the DownArrow in an empty
folder. Your application will crash.
Here is the solution for that problem (I hope so...)
Change following lines in GfxOutBarCtrl.cpp
Past line 400 you'll find something like that
if (l < GetItemCount() - 1)
{
if (bDownPressed) pDC->DrawFrameControl(rcDownArrow, ...
else pDC->DrawFrameControl(rcDownArrow, DFC_SCROLL, ...
bDownArrow = true; pDC->ExcludeClipRect(rcDownArrow);
}
Insert another if-statement: new lines are in ""
if (l < GetItemCount() - 1)
{
"if (GetItemCount() > 0)"
"{"
if (bDownPressed) pDC->DrawFrameControl(rcDownArrow, ...
else pDC->DrawFrameControl(rcDownArrow, DFC_SCROLL, ...
bDownArrow = true; pDC->ExcludeClipRect(rcDownArrow);
"}"
}
Now there will be no DownArrow when the folder is empty.
(I've not tested this solution intensivly! Maybe someone else has a better solution!)
Originally posted by: Aykut KILI�
List of bugs I found
1) When I tried to scroll the iconic view with mouse wheel the program crashed.(My mouse has 4 button and 2 wheels.)
2) The old name stays at the background while editing the labels in small icon mode.(I fixed it and added some code to make the editbox window as a overlapped child of main frame to prevent the clipping at right of outbar and to defaultly select the whole text wgich is the most usual case).
3) Removing the actual folder causes Displayal error.But removing inactive bars correctly works So this problem can be solved by activating the next folder (or the previous if the active folder is the last one) and then removing the folder.
4) The label edit boxes aren't multiline. Or maybe the multiline code doesn't work. I couldn't examine it.
5) Item dragging isn't smart. It's possible to drag an item to its own place. And there are some more mistakes that I can't remember.
I will try to correct these bugs and then send it to the site.
The code is very readable but I think can be shortened without reducing the readability. And It's so strange to see bugs at top level while other detailed levels are completely mistakeless.
Thanks very much to the programmer whom I don't know his name for sharing his work with us.
ReplyOriginally posted by: Xavier BENVENISTE
Go to control panel
select display, then the "Plus!" tab
check "Show window contents while dragging"
Now, when resizing the outlookbar it awfully flickers.
Reply