sage);
#if defined(MFCXLIB_STATIC)
HINSTANCE hInst = AfxFindResourceHandle(
MAKEINTRESOURCE(AFX_IDC_VSPLITBAR), RT_GROUP_CURSOR);
if (IsHorzDocked())
::SetCursor(::LoadCursor(hInst, MAKEINTRESOURCE(AFX_IDC_VSPLITBAR)));
else
::SetCursor(::LoadCursor(hInst, MAKEINTRESOURCE(AFX_IDC_HSPLITBAR)));
#else
if (IsHorzDocked())
::SetCursor(::LoadCursor(NULL, IDC_SIZENS));
else
::SetCursor(::LoadCursor(NULL, IDC_SIZEWE));
#endif
return TRUE;
}
BOOL CCJControlBar::IsHorzDocked() const
{
return (m_nDockBarID == AFX_IDW_DOCKBAR_TOP ||
m_nDockBarID == AFX_IDW_DOCKBAR_BOTTOM);
}
BOOL CCJControlBar::IsVertDocked() const
{
return (m_nDockBarID == AFX_IDW_DOCKBAR_LEFT ||
m_nDockBarID == AFX_IDW_DOCKBAR_RIGHT);
}
void CCJControlBar::OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp)
{
// Compute the rectangle of the mobile edge
GetWindowRect(m_rectBorder);
m_rectBorder.OffsetRect(-m_rectBorder.left, -m_rectBorder.top);
m_rectBorder.DeflateRect(1,1);
CRect rcWnd = lpncsp->rgrc[0];
DWORD dwBorderStyle = m_dwStyle | CBRS_BORDER_ANY;
switch (m_nDockBarID)
{
case AFX_IDW_DOCKBAR_TOP:
{
dwBorderStyle &= ~CBRS_BORDER_BOTTOM;[b
上一篇:
CJCOMBOBOX.CPP
下一篇:
让我掉下眼泪的