// JP opened flex table

Click to See Complete Forum and Search --> : BUG: Fake DevStudio Workspace Windows


Imanol Crespo
April 2nd, 1998, 06:15 AM
I took src from codeguru with resizable docking window by Mark Conway. Decided to add items to the fake DevStudio style Workspace window and notice that, if I expand a branch that contains strings not completely visible (because of the sizable window right margin), then select the string and try to minimize its parent item, the tree disappears.

The same happens when the tree is expanded for the first time.


Does anybody have any solution?


Thanks a lot


Imanol Crespo

LF Leow
April 5th, 1998, 07:30 AM
Encountered similar problem when i first added

the treebar to my application.

The tree disappeared a couple of times but

since then i not encountered any.


Just when i have the a litter bit of time to

checkout this problem, I am not able to

reproduce this "disappearing tree" act.


Leow

kim yoochul
May 1st, 1998, 01:21 PM
for (int i = 0; i if (!m_pTreeCtrl->Create(dwStyle, rect, this, i))

return -1; // failed to create tree control

m_pTreeCtrl->ModifyStyleEx(0, WS_EX_CLIENTEDGE);


for (int i = 0; i if (!m_pTreeCtrl->Create(dwStyle, rect, &m_TabCtrl, i))

return -1; // failed to create tree control

m_pTreeCtrl->ModifyStyleEx(0, WS_EX_CLIENTEDGE);

Bill Fahle
December 9th, 1998, 04:20 PM
I found a general redraw problem with CSizingControlBar redraw, which can be easily reproduced if you select an item in

the tree control, minimize the app, then restore. Only the selected item redraws; not the rest of the tree.


The fix is in OnNcPaint in CSizingControlBar:


GetClientRect(rectClient);

CRect rectWindow;


becomes


GetClientRect(rectClient);

InvalidateRect(rectClient, TRUE);

CRect rectWindow;


If you look at the source to CControlBar::OnNcPaint, you will see that it does something similar to this before doing

the equivalent of what is there. I also found that the erase background stuff didn't work quite right, and so I changed

to whole routine as follows:


#if 0 // waf - left a small part unpainted often.

// get window DC that is clipped to the non-client area

CWindowDC dc(this);

CRect rectClient;

GetClientRect(rectClient);

CRect rectWindow;

GetWindowRect(rectWindow);

ScreenToClient(rectWindow);

rectClient.OffsetRect(-rectWindow.left, -rectWindow.top);

dc.ExcludeClipRect(rectClient);


// draw borders in non-client area

rectWindow.OffsetRect(-rectWindow.left, -rectWindow.top);

DrawBorders(&dc, rectWindow);


// erase parts not drawn

dc.IntersectClipRect(rectWindow);


// erase NC background the hard way

HBRUSH hbr = (HBRUSH)GetClassLong(m_hWnd, GCL_HBRBACKGROUND);

::FillRect(dc.m_hDC, rectWindow, hbr);


// paint the mobile edge

dc.Draw3dRect(m_rectBorder, ::GetSysColor(COLOR_BTNHIGHLIGHT),

::GetSysColor(COLOR_BTNSHADOW));


ReleaseDC(&dc);

#else

CControlBar::EraseNonClient();


// get window DC that is clipped to the non-client area

CWindowDC dc(this);

CRect rectClient;

GetClientRect(rectClient);

InvalidateRect(rectClient, TRUE);

CRect rectWindow;

GetWindowRect(rectWindow);

ScreenToClient(rectWindow);

rectClient.OffsetRect(-rectWindow.left, -rectWindow.top);

dc.ExcludeClipRect(rectClient);


// erase NC background the hard way

HBRUSH hbr = (HBRUSH)GetClassLong(m_hWnd, GCL_HBRBACKGROUND);

::FillRect(dc.m_hDC, rectWindow, hbr);


// draw borders in non-client area

rectWindow.OffsetRect(-rectWindow.left, -rectWindow.top);

DrawBorders(&dc, rectWindow);


// erase parts not drawn

dc.IntersectClipRect(rectWindow);


// erase NC background the hard way

// HBRUSH hbr = (HBRUSH)GetClassLong(m_hWnd, GCL_HBRBACKGROUND);

// ::FillRect(dc.m_hDC, rectWindow, hbr);


// paint the mobile edge

dc.Draw3dRect(m_rectBorder, ::GetSysColor(COLOR_BTNHIGHLIGHT),

::GetSysColor(COLOR_BTNSHADOW));


ReleaseDC(&dc); // called automatically by CWindowDC destructor

#endif

//JP added flex table