本文整理汇总了C++中RecalLayout函数的典型用法代码示例。如果您正苦于以下问题:C++ RecalLayout函数的具体用法?C++ RecalLayout怎么用?C++ RecalLayout使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RecalLayout函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dc
void CGuiOutLook::OnLButtonUp(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CClientDC dc(this);
//------------------------------
if (m_iDrawFrameUp==TRUE)
{
if (m_rectArrowUp.PtInRect(point))
{
m_Avance+=50;
RecalLayout();
}
else
dc.DrawFrameControl(m_rectArrowUp,DFC_SCROLL,DFCS_SCROLLUP);
}
//-----------------------------
if (m_iDrawFrameDown==TRUE)
{
if (m_rectArrowDown.PtInRect(point))
{
m_Avance-=50;
RecalLayout();
}
else
dc.DrawFrameControl(m_rectArrowDown,DFC_SCROLL,DFCS_SCROLLDOWN);
}
//------------------------------
CWnd::OnLButtonUp(nFlags, point);
}
示例2: GetClientRect
//---------------------------------------------------------------------------
// OnLButtonDown
//---------------------------------------------------------------------------
void CRollupCtrl::OnLButtonDown(UINT nFlags, CPoint point)
{
CRect r; GetClientRect(&r);
if (m_PageHeight>r.Height())
{
//Click on scroll bar client rect
CRect br = CRect(r.right-RC_SCROLLBARWIDTH,r.top, r.right, r.bottom);
if ((nFlags&MK_LBUTTON) && br.PtInRect(point)) {
SetCapture();
int ClientHeight = r.Height()-4;
int SB_Size = ClientHeight-(((m_PageHeight-r.Height())*ClientHeight)/m_PageHeight);
int SB_Pos = -(m_StartYPos*ClientHeight)/m_PageHeight;
//Click inside scrollbar cursor
if ((point.y<(SB_Pos+SB_Size)) && (point.y>SB_Pos)) {
m_SBOffset = SB_Pos-point.y+1;
//Click outside scrollbar cursor (2 cases => above or below cursor)
} else {
int distup = point.y-SB_Pos;
int distdown = (SB_Pos+SB_Size)-point.y;
if (distup<distdown) m_SBOffset = 0; //above
else m_SBOffset = -SB_Size; //below
}
//Calc new m_StartYPos from mouse pos
int TargetPos = point.y + m_SBOffset;
m_StartYPos=-(TargetPos*m_PageHeight)/(ClientHeight);
//Update
RecalLayout();
}
//Click on scroll bar up button
br = CRect(r.right-RC_SCROLLBARWIDTH,r.top, r.right, r.top);
if ((nFlags&MK_LBUTTON) && br.PtInRect(point)) {
m_StartYPos+=32;
RecalLayout();
}
//Click on scroll bar down button
br = CRect(r.right-RC_SCROLLBARWIDTH,r.bottom, r.right, r.bottom);
if ((nFlags&MK_LBUTTON) && br.PtInRect(point)) {
m_StartYPos-=32;
RecalLayout();
}
}
CWnd::OnLButtonDown(nFlags, point);
}
示例3: RecalLayout
void CGuiPanelAccess::OnUp()
{
m_nDif++;
m_PressDown=FALSE;
m_PressUp=TRUE;
RecalLayout();
}
示例4: ASSERT
void CContainer::DeleteTab(int m_numtab)
{
if (m_numtab < m_Numtabs)
{
CTab* ctn=(CTab*) m_pArray[m_numtab];
if (m_alnTab!=ALN_TOP)
ASSERT(ctn->pParent);
if (ctn)
delete ctn;
m_Numtabs--;
m_pArray.RemoveAt(m_numtab,1);
if (m_Numtabs >0)
{
if (m_iSelectTab == m_numtab)
{
m_iSelectTab=m_iSelectTab-1;
if (m_iSelectTab< 0) m_iSelectTab=0;
CTab* ctn =(CTab*) m_pArray[m_iSelectTab];
CWin* pParentNew=ctn->pParent;
ASSERT(pParentNew);
pParentNew->ShowWindow(SW_SHOW);
}
else
{
if (m_iSelectTab > m_numtab)
{
m_iSelectTab--;
}
}
RecalLayout();
}
}
}
示例5: RecalLayout
void CGuiMiniSplitter::OnSize(UINT nType, int cx, int cy)
{
CWnd::OnSize(nType, cx, cy);
RecalLayout();
// TODO: Add your message handler code here
}
示例6: RecalLayout
void CGuiStaticStandar::OnSize(UINT nType, int cx, int cy)
{
CStatic::OnSize(nType, cx, cy);
RecalLayout();
// TODO: Add your message handler code here
}
示例7: RecalLayout
void COutLook::AddItem(UINT Cmd,LPCSTR m_szCaption,int nIndex,LPCSTR m_ToolTip)
{
m_ArrayButtons.SetAtGrow(m_NumBottoms, new CItems
(this,m_imageList.ExtractIcon(nIndex),Cmd, m_szCaption,m_ToolTip,m_TypeOutLook));
m_NumBottoms++;
RecalLayout();
}
示例8: _ExpandPage
void CRollupCtrl::ExpandPage(int idx, BOOL bExpand,BOOL bScroll,BOOL bFromUI)
{
if (!FindPage(idx))
return;
//Expand-collapse
_ExpandPage( FindPage(idx), bExpand,bFromUI);
//Update
RecalLayout();
//Scroll to this page (Automatic page visibility)
if (bExpand && bScroll)
ScrollToPage(idx, FALSE);
if (GetOwner())
{
CRollupCtrlNotify n;
n.hdr.hwndFrom = m_hWnd;
n.hdr.idFrom = GetDlgCtrlID();
n.hdr.code = ROLLUPCTRLN_EXPAND;
n.nPageId = idx;
n.bExpand = bExpand == TRUE;
GetOwner()->SendMessage( WM_NOTIFY,(WPARAM)GetDlgCtrlID(),(LPARAM)&n );
}
}
示例9: _RemovePage
void CRollupCtrl::RemoveAllPages()
{
for (; m_PageList.size();)
_RemovePage( m_PageList[0]->id );
RecalLayout();
}
示例10: if
void CGuiFolder::DeleteFolder(int m_iNumFolder)
{
/* Modified By SunZhenyu 2003/8/22, replace all function lines. */
if (m_iNumFolder >= 0 && m_iNumFolder < m_NumFolders)
{
m_NumFolders--;
CFolderBar * p = (CFolderBar *)m_ArrayFolder.GetAt(m_iNumFolder);
if( p ) delete p;
m_ArrayFolder.RemoveAt(m_iNumFolder);
if (m_iNumFolder == 0 || m_iNumFolder < m_NumFolders)
m_iSelected=m_iNumFolder;
else if(m_iNumFolder > 0)
m_iSelected=m_iNumFolder-1;
RecalLayout();
}
/*
if (m_iNumFolder < m_NumFolders)
{
m_iNumFolder--;
m_ArrayFolder.RemoveAt(m_iNumFolder,m_NumFolders);
if (m_iNumFolder == 0 || m_iNumFolder == m_iNumFolder)
m_iSelected=m_iNumFolder;
else if(m_iNumFolder > 0)
m_iSelected=m_iNumFolder-1;
RecalLayout();
}
*/
}
示例11: RecalLayout
void CGuiTabWnd::OnSize(UINT nType, int cx, int cy)
{
CWnd::OnSize(nType, cx, cy);
if (m_Numtabs > 0)
RecalLayout();
}
示例12: SelectFolder
void CGuiFolder::DeleteFolder(int m_iNumFolder, BOOL bUpdate)
{
if (m_iNumFolder < m_NumFolders)
{
if (bUpdate && m_iNumFolder == m_NumFolders -1)
SelectFolder(0);
if (m_iNumFolder == m_iSelected && m_iNumFolder != 0)
{
SelectFolder(1);
m_iSelected = 1;
}
CFolderBar* pBar = (CFolderBar*)m_ArrayFolder.GetAt(m_iNumFolder);
m_ArrayFolder.RemoveAt(m_iNumFolder,1);
delete pBar;
m_NumFolders--;
if (m_iNumFolder == m_NumFolders)
m_iSelected = m_iNumFolder - 1;
if (m_iNumFolder == 0)
m_iSelected = m_NumFolders - 1;
else if(m_iNumFolder > 0)
m_iSelected = m_iNumFolder - 1;
if (bUpdate)
{
int OldSel = m_iSelected;
RecalLayout();
SelectFolder(0);
SelectFolder(m_NumFolders - 1);
SelectFolder(OldSel);
}
}
}
示例13: RecalLayout
void CGuiEdit::OnSize(UINT nType, int cx, int cy)
{
CEdit::OnSize(nType, cx, cy);
RecalLayout();
// TODO: Add your message handler code here
}
示例14: RecalLayout
//---------------------------------------------------------------------------
// OnMouseWheel
//---------------------------------------------------------------------------
BOOL CRollupCtrl::OnMouseWheel( UINT nFlags, short zDelta, CPoint pt)
{
m_StartYPos+=(zDelta/4);
RecalLayout();
return CWnd::OnMouseWheel(nFlags, zDelta, pt);
}
示例15: ASSERT_VALID
void CGuiTabWnd::DeleteTab(int m_numtab)
{
if (m_numtab < m_Numtabs)
{
CGuiTab* ctn=(CGuiTab*) m_pArray[m_numtab];
CWnd* pParen=ctn->pParent;
if (m_alnTab!=ALN_TOP)
ASSERT_VALID(pParen);
m_Numtabs--;
/* Modified By SunZhenyu 2003/8/22, Add next 1 lines. */
delete ctn;
m_pArray.RemoveAt(m_numtab,1);
if (m_Numtabs >0)
{
if (m_iSelectTab == m_numtab)
{
m_iSelectTab=0;
CGuiTab* ctn =(CGuiTab*) m_pArray[m_iSelectTab];
CWnd* pParentNew=ctn->pParent;
ASSERT_VALID(pParentNew);
pParentNew->ShowWindow(SW_SHOW);
}
RecalLayout();
}
}
}