|
 |
|
|
The application I've been developing changes the name of it's tab quite often. The problem occurs when the length of the string is quite different so changing is from “1” to “1234567890” the text remains centred as though it was displaying “1” so part of the text is hidden.
I’ve tried various things to get it to sort itself out, and the solution I came up with (not particularly elegant though) is to change the size of the “tab window” and then change it back again.
So in the function:
void COXTabWorkspace::UpdateContents(BOOL bAddNewWindows/*=FALSE*/) { …
// update text if necessary if(m_arrTab[nFoundItem].sText!=sWindowText){ m_arrTab[nFoundItem].sText=sWindowText; TC_ITEM tci; tci.mask=TCIF_TEXT; tci.pszText=(LPTSTR)(LPCTSTR)sWindowText; SetItem(nFoundItem,&tci);
// INSERTED CODE BEGINS CRect cRect; GetClientRect(&cRect); SetWindowPos(NULL,0,0,cRect.Width(),cRect.Height()+2,SWP_NOZORDER); SetWindowPos(NULL,0,0,cRect.Width(),cRect.Height(),SWP_NOZORDER); // INSERTED CODE ENDS
bRecalc=TRUE; } }
Other than that works brilliantly, thank you very much!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I removed TCS_SCROLLOPPOSITE from the tab style, so all tabs are on the bottom line. However, now there is a problem redrawing tabs while MDI client windows are added. It shows when you add enough clients to fill two or more lines, and then if you add another window so that tabs are compressed on single line. The row of tabs that gets compressed is not properly updated, 1-2 pixel rows on top of each tab on the line still show old icon and tab divider. When full application window is redrawn, the tab control looks like it should be.
This problem doesn't seem to show at all if TCS_SCROLLOPPOSITE is used.
I'm using Windows 2000 but I remember same problems from NT 4.0 times. Is this Windows problem or COXTabWorkspace problem?
Other than that, the stuff is great!
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
Hi I am having VC workspace like instant bar,that bar contains tree,how to add open documents as childs of this tree.? -Mahatma
|
| Sign In·View Thread·PermaLink | 1.50/5 (2 votes) |
|
|
|
 |
|
|
I have seen ur article is Very Good.I have some problem. Problem: It is MDI Application.if i select New , I want open two views ie means here I was consider two view one Document.But Application having no of views.I am using splitter wnd.Now I want implement tab from one splittWnd to another.How to implement?
dadsadasd
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi,
I was wondering if anyone here knew how to switch which of the tabs is being shown. I tried sending a WM_MDIACTIVATE message to activate the child window that I want but this didn't seem to work. I also tried the SetCurSel() function using the index of the tab but this didn't work either. As I understand it, this only changes the tab, not the view. But I am not sure.
Any help would be appreciated.
speakeasy
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
When I "Upgrade" the project to XP "LOOK" using manifest file/rsrc it happen that the main freame client area around the m_MTIClientWnd is not getting updated during execution. When I move the mainframe with the mouse, that area reamain un-updated and memorize the background.
The whole procedure og upgrade to XP look described in: http://www.codeguru.com/controls/xpstyle.html
Is the problem with OXTabClientWnd class?
Amit Gefen. Project Lead - Software Engineer Tel Aviv, Israel.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Yes, it is a problem with this particular class since it was written long before Windows XP. I suggest you give the Ultimate ToolBox a try, it does not have this problem.
Ivor S. Sargoytchev Dundas Software
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Is it possible to you to fix this BUG in this particualr class?
Amit Gefen. Project Lead - Software Engineer Tel Aviv, Israel.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
You can just change the tab offset in OXTabClientWnd.h to 0 Change: #define ID_TABOFFSET 5 To: #define ID_TABOFFSET 0
Have fun! s0ck
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
Hi,
While scanning through your code I happen to hit upon this line
Line 158 : OXTabClientWnd.cpp void COXTabWorkspace::OnNcPaint() { ...
if( ( rectClient.top < rectClient.bottom ) && ( rectClient.top < rectClient.bottom ) dc.ExcludeClipRect( rectClient );
... } Do you see the repetition?
Is the second clause suppose to be
( rectClient.left < rectClient.right )
Perhaps you want to tell us what really the comparsion is?

Darkgan76
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
This is not a bug - it's an unnecessary if statement which will always pass. I think the intent was to make sure that rectClient has valid coordinates, but there is no need to check for that, since GetClientRect() always returns a valid rectangle or null rectangle. In either case it is okay to pass it to ExcludeClipRect().
Ivor S. Sargoytchev Dundas Software
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
When does it flicker exactly - please be more specific. Also you can send me your project and I'll take a look.
Ivor S. Sargoytchev Dundas Software
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
Thanks to your project...
I use mulity view, one view is 3dview whis is derived opengl, and another is 2dview.
when I change opeglgl view, A few second(4-5 second) is required......
It is a project bug ? or MFC bug ?....
......
|
| Sign In·View Thread·PermaLink | 2.33/5 (2 votes) |
|
|
|
 |
|
|
 |
|
|
I love the control so far, but am needing to make some changes.
If I have abc.txt open and edit it, then reopen abc.txt, the current window gets overwritten with the original file from disk. Where would be the appropriate place to change the behaviour to always a new window, changing the name to be abc[2].txt, etc.. for subsequent openings of the same file.
I'm looking at adding it to AddTabItem.
BW The only people for me are the mad ones, the ones who are mad to talk, mad to live, mad to be saved, desirous of everything at the same time, the ones who never yawn or say a commonplace thing, but burn, burn, burn like fabulous yellow roman candles exploding. - Jack Kerouac
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
I've got a FilePath and want to call OnOpenDocument() from CMainFrame::SomeFunction()
Eventually opening up a new Tab with that files info. Like double clicking on the Class View in VC++.
In CMainFrame::SomeFunction() I have:
m_MTIClientWnd.GetTabCtrl()->PostMessage(WM_MDICREATE);
I thought of using AddTabitem, but it's protected.
Still, real green with the MFC, so please tell if I'm even heading in the right direction with that. Any thoughts??
BW {insert witty/thought-provoking saying here}
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Can I make COXTabClientWnd to subclass CMDIChildWnd?
My requirement is like this: I need three Tab views, each containing Views based on doc-view architecture as tabs. Is it possible to achieve this with COXTabClientWnd?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi,
I am not sure I fully understand what you are looking for, can you please provide me with more information? It would be ideal if you had a screen shot of what you are looking for.
Peter Zajac Dundas Technical Support
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
In other words, I need multiple tab views (in place of the one you subclass for the MDIFrameWnd) each hosting views in their tabs.
I am not sure how I can post screenshot here. I will try to depict the scenario:
--------------------------- |.................|................| ] |.................|................| ] |.................|................| ] |------------|------------| ] |T1|T2|T3|...|T1|T2|T3|..| ]==> 2 Tab views ===================== |..................................| |..................................| ==> FormView ---------------------------
In each of the two tabviews, three tabs T1, T2 and T3 are created which contain views based on Doc-view architecture.
I hope this is clear.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Yes, thank you for the additional information.
I believe that this article on our support site will provide you with tips on how to do what you are looking for.
Peter Zajac Dundas Technical Support
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
 |