Codejock Xtreme Toolkit v9601 太 ft 了

害我白白浪費一個小時,結果竟然是提供的 Source 裏有這種弱智錯誤:

void CXTListBase::SetRowColor(int iRow, COLORREF crText, COLORREF crBack)
{
ROWCOLOR* lpRowClr = Lookup(iRow);
if (lpRowClr)
{
lpRowClr->crText = crText;
lpRowClr->crBack = crBack;
}
else
{
// initialize row color struct.
ROWCOLOR rowclr;
rowclr.iRow   = iRow;
rowclr.crText = crText;
rowclr.crBack = crBack;

m_arRowColor.AddHead(rowclr);
}

m_pListCtrl->RedrawWindow();
}

void CXTListBase::SetRowColor(ROWCOLOR* lpRowColor)
{
SetRowColor(lpRowColor->crText, lpRowColor->crBack, lpRowColor->iRow);
}

—————————————————————————

PS:如果你還使用了 DockPane 的話,它默認的 Template 有問題,無法顯示 Scrollbar:

template<class BASE_CLASS>
class CDockPaneWnd : public BASE_CLASS
{
protected:

virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_CREATE:
{
if (BASE_CLASS::WindowProc(message, wParam, lParam) == -1)
return -1;
SetFont(XTPPaintManager()->GetRegularFont());
return 0;
}

case WM_NCPAINT:
{
CWindowDC dc(this);

CRect rc;
GetWindowRect(&rc);

int cx = rc.Width();
int cy = rc.Height();

const COLORREF clrFrame =  GetXtremeColor(XPCOLOR_3DSHADOW);
dc.Draw3dRect(0, 0, cx, cy, clrFrame, clrFrame);

//return TRUE;
    break;
   }

case WM_NCCALCSIZE:
{
NCCALCSIZE_PARAMS FAR* lpncsp = (NCCALCSIZE_PARAMS FAR*)lParam;

// adjust non-client area for border space
lpncsp->rgrc[0].left   += 1;
lpncsp->rgrc[0].top    += 1;
lpncsp->rgrc[0].right  -= 1;
lpncsp->rgrc[0].bottom -= 1;

//return TRUE;
    break;
}

}

return BASE_CLASS::WindowProc(message, wParam, lParam);
}
};

解決辦法:把其中的Bold部分註釋掉,加入Underline部分即可。

然而這還沒有完…… -___-||| 如果你沒有使用其它同捆控件的 User-defined Backgroud Color 還好,如果不幸用了…… 你會發現 ……

臨時湊合的方法之一就是調整上面 NC-area 的 Resize,但往往結果並不理想,經常造成 NC-area 和 C-area 顧此失彼,尤其是在不同的 Theme 下,需要調節的大小也不同 …… -___-|||

最後,這套咚咚可是要賣到 $595USD 的阿,暈

Advertisements

About AyuanX

Big Brother is watching you! Yes, you!
This entry was posted in 無関別々 and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s