• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetBorderSize函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetBorderSize函数的典型用法代码示例。如果您正苦于以下问题:C++ GetBorderSize函数的具体用法?C++ GetBorderSize怎么用?C++ GetBorderSize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetBorderSize函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: GetBorderSize

int wxSplitWindow::AdjustSashPosition(int sashPos) const {
    wxWindow *win;

    win = m_windowOne;
    if (win) {

        // the window shouldn't be smaller than its own minimal size nor
        // smaller than the minimual pane size specified for this splitwindow
        int minSize = m_splitMode == wxSPLIT_VERTICAL? win->GetMinWidth(): win->GetMinHeight();

        if (minSize == -1 || m_minimumPaneSize > minSize) minSize = m_minimumPaneSize;
        minSize += GetBorderSize();

        if (sashPos > 0 && sashPos < minSize) sashPos = minSize;
    }

    win = m_windowTwo;
    if (win) {

        int minSize = m_splitMode == wxSPLIT_VERTICAL? win->GetMinWidth(): win->GetMinHeight();

        if (minSize == -1 || m_minimumPaneSize > minSize) minSize = m_minimumPaneSize;
        minSize += GetBorderSize();

        int maxSize = GetWindowSize() - minSize - GetSashSize();
        if (sashPos < GetWindowSize() && sashPos > maxSize) sashPos = maxSize;
    }

    return sashPos;
}
开发者ID:stahta01,项目名称:wxCode_components,代码行数:30,代码来源:splitwindow.cpp


示例2: if

	void CComboBoxUI::PaintStatusImage(HDC hDC)
	{
		if (m_sArrowImage.IsEmpty())
			CComboUI::PaintStatusImage(hDC);
		else
		{
			// get index
			if( IsFocused() ) m_uButtonState |= UISTATE_FOCUSED;
			else m_uButtonState &= ~ UISTATE_FOCUSED;
			if( !IsEnabled() ) m_uButtonState |= UISTATE_DISABLED;
			else m_uButtonState &= ~ UISTATE_DISABLED;

			int nIndex = 0;
			if ((m_uButtonState & UISTATE_DISABLED) != 0)
				nIndex = 4;
			else if ((m_uButtonState & UISTATE_PUSHED) != 0)
				nIndex = 2;
			else if ((m_uButtonState & UISTATE_HOT) != 0)
				nIndex = 1;
			else if ((m_uButtonState & UISTATE_FOCUSED) != 0)
				nIndex = 3;

			// make modify string
			CDuiString sModify = m_sArrowImage;

			int nPos1 = sModify.Find(_T("source"));
			int nPos2 = sModify.Find(_T("'"), nPos1 + 7);
			if (nPos2 == -1) return; //first
			int nPos3 = sModify.Find(_T("'"), nPos2 + 1);
			if (nPos3 == -1) return; //second

			CDuiRect rcBmpPart;
			LPTSTR lpszValue = NULL;
			rcBmpPart.left = _tcstol(sModify.GetData() + nPos2 + 1, &lpszValue, 10);  ASSERT(lpszValue);    
			rcBmpPart.top = _tcstol(lpszValue + 1, &lpszValue, 10);    ASSERT(lpszValue);    
			rcBmpPart.right = _tcstol(lpszValue + 1, &lpszValue, 10);  ASSERT(lpszValue);    
			rcBmpPart.bottom = _tcstol(lpszValue + 1, &lpszValue, 10); ASSERT(lpszValue); 

			m_nArrowWidth = rcBmpPart.GetWidth() / 5;
			rcBmpPart.left += nIndex * m_nArrowWidth;
			rcBmpPart.right = rcBmpPart.left + m_nArrowWidth;

			CDuiRect rcDest(0, 0, m_rcItem.right - m_rcItem.left, m_rcItem.bottom - m_rcItem.top);
			rcDest.Deflate(GetBorderSize(), GetBorderSize());
			rcDest.left = rcDest.right - m_nArrowWidth;

			CDuiString sSource = sModify.Mid(nPos1, nPos3 + 1 - nPos1);
			CDuiString sReplace;
			sReplace.SmallFormat(_T("source='%d,%d,%d,%d' dest='%d,%d,%d,%d'"),
				rcBmpPart.left, rcBmpPart.top, rcBmpPart.right, rcBmpPart.bottom,
				rcDest.left, rcDest.top, rcDest.right, rcDest.bottom);

			sModify.Replace(sSource, sReplace);

			// draw image
			if (!DrawImage(hDC, m_sArrowImage, sModify))
				m_sNormalImage.Empty();
		}
	}
开发者ID:Crawping,项目名称:IocpServerClient_Side,代码行数:59,代码来源:UIComboBox.cpp


示例3: GetBorderSize

void IFWL_Widget::GetEdgeRect(CFX_RectF& rtEdge) {
  rtEdge = m_pProperties->m_rtWidget;
  rtEdge.left = rtEdge.top = 0;
  if (HasBorder()) {
    FX_FLOAT fCX = GetBorderSize();
    FX_FLOAT fCY = GetBorderSize(false);
    rtEdge.Deflate(fCX, fCY);
  }
}
开发者ID:documentcloud,项目名称:pdfium,代码行数:9,代码来源:ifwl_widget.cpp


示例4: HandleButtonEvent

/** Process a button event. */
void HandleButtonEvent(const XButtonEvent *event)
{

   ClientNode *np;
   int north, south, east, west;

   np = FindClientByParent(event->window);
   if(np) {
      if(event->type == ButtonPress) {
         FocusClient(np);
         RaiseClient(np);
      }
      DispatchBorderButtonEvent(event, np);
   } else if(event->window == rootWindow && event->type == ButtonPress) {
      if(!ShowRootMenu(event->button, event->x, event->y, 0)) {
         if(event->button == Button4) {
            LeftDesktop();
         } else if(event->button == Button5) {
            RightDesktop();
         }
      }
   } else {
      const unsigned int mask = event->state & ~lockMask;
      np = FindClientByWindow(event->window);
      if(np) {
         switch(event->button) {
         case Button1:
         case Button2:
            FocusClient(np);
            RaiseClient(np);
            if(mask == Mod1Mask) {
               GetBorderSize(&np->state, &north, &south, &east, &west);
               MoveClient(np, event->x + west, event->y + north);
            }
            break;
         case Button3:
            if(mask == Mod1Mask) {
               GetBorderSize(&np->state, &north, &south, &east, &west);
               ResizeClient(np, BA_RESIZE | BA_RESIZE_E | BA_RESIZE_S,
                            event->x + west, event->y + north);
            } else {
               FocusClient(np);
               RaiseClient(np);
            }
            break;
         default:
            break;
         }
         JXAllowEvents(display, ReplayPointer, eventTime);
      }

   }

}
开发者ID:pecarter-work,项目名称:jwm,代码行数:55,代码来源:event.c


示例5: ConstrainPosition

/** Constrain the position of a client. */
void ConstrainPosition(ClientNode *np)
{

   BoundingBox box;
   int north, south, east, west;

   /* Get the bounds for placement. */
   box.x = 0;
   box.y = 0;
   box.width = rootWidth;
   box.height = rootHeight;
   SubtractTrayBounds(GetTrays(), &box, np->state.layer);
   SubtractStrutBounds(&box, np);

   /* Fix the position. */
   GetBorderSize(&np->state, &north, &south, &east, &west);
   if(np->x + np->width + east + west > box.x + box.width) {
      np->x = box.x + box.width - np->width - east;
   }
   if(np->y + np->height + north + south > box.y + box.height) {
      np->y = box.y + box.height - np->height - south;
   }
   if(np->x < box.x + west) {
      np->x = box.x + west;
   }
   if(np->y < box.y + north) {
      np->y = box.y + north;
   }

}
开发者ID:KarlGodt,项目名称:jwm,代码行数:31,代码来源:place.c


示例6: GetBorderSize

void cdxCDynamicWnd::DoOnGetMinMaxInfo(MINMAXINFO FAR* lpMMI)
{
	if(IsWindow() && !IsDisabled())
	{
		CSize	szDelta	=	GetBorderSize();

		lpMMI->ptMinTrackSize.x	=	m_szMin.cx + szDelta.cx;
		lpMMI->ptMinTrackSize.y	=	m_szMin.cy + szDelta.cy;

		if(m_Freedom & fdHoriz)
		{
			if(m_szMax.cx > 0)
				lpMMI->ptMaxTrackSize.x	=	m_szMax.cx + szDelta.cx;
		}
		else
			lpMMI->ptMaxTrackSize.x	=	lpMMI->ptMinTrackSize.x;

		if(m_Freedom & fdVert)
		{
			if(m_szMax.cy > 0)
				lpMMI->ptMaxTrackSize.y	=	m_szMax.cy + szDelta.cy;
		}
		else
			lpMMI->ptMaxTrackSize.y	=	lpMMI->ptMinTrackSize.y;
	}
}
开发者ID:Luomu,项目名称:workspacewhiz,代码行数:26,代码来源:cdxCDynamicWnd.cpp


示例7: if

	void CComboBoxUI::PaintStatusImage(HDC hDC)
	{
		if (m_sArrowImage.IsEmpty())
			CComboUI::PaintStatusImage(hDC);
		else
		{
			// get index
			if( IsFocused() ) m_uButtonState |= UISTATE_FOCUSED;
			else m_uButtonState &= ~ UISTATE_FOCUSED;
			if( !IsEnabled() ) m_uButtonState |= UISTATE_DISABLED;
			else m_uButtonState &= ~ UISTATE_DISABLED;

			int nIndex = 0;
			if ((m_uButtonState & UISTATE_DISABLED) != 0)
				nIndex = 4;
			else if ((m_uButtonState & UISTATE_PUSHED) != 0)
				nIndex = 2;
			else if ((m_uButtonState & UISTATE_HOT) != 0)
				nIndex = 1;
			else if ((m_uButtonState & UISTATE_FOCUSED) != 0)
				nIndex = 3;

			CDuiRect rcBmpPart(m_sArrowImage.GetSource());

			m_nArrowWidth = rcBmpPart.GetWidth() / 5;
			rcBmpPart.left += nIndex * m_nArrowWidth;
			rcBmpPart.right = rcBmpPart.left + m_nArrowWidth;

			CDuiRect rcDest(0, 0, m_rcItem.right - m_rcItem.left, m_rcItem.bottom - m_rcItem.top);
			rcDest.Deflate(GetBorderSize(), GetBorderSize());
			rcDest.left = rcDest.right - m_nArrowWidth;

			// draw image
			if (!DrawImage(hDC, m_sArrowImage))
				m_sNormalImage.Empty();
			else 
			{
				DrawImage(hDC, m_sArrowImage,rcBmpPart);
				DrawImage(hDC, m_sArrowImage,rcDest);
			}
		}
	}
开发者ID:charliewin,项目名称:uilib-project,代码行数:42,代码来源:UIComboBox.cpp


示例8: GetBorderSize

//*********************************************************************************************************
void CBCGPBaseFilterPopupMenu::RecalcLayout(BOOL bNotify /* = TRUE */)
{
	CBCGPPopupMenu::RecalcLayout(bNotify);

	if (m_wndMenuBar.GetSafeHwnd() != NULL)
	{
		m_wndMenuBar.m_arColumns.RemoveAll();
		m_wndMenuBar.AdjustLayout();
	}

	if (m_wndList.GetSafeHwnd() == NULL)
	{
		return;
	}

	const int nShadowSize = CBCGPToolBar::IsCustomizeMode () ? 0 : m_iShadowSize;
	const int nBorderSize = GetBorderSize();

	CRect rectClient;
	GetClientRect(rectClient);

	rectClient.DeflateRect (nBorderSize, nBorderSize);

	if (GetExStyle() & WS_EX_LAYOUTRTL)
	{
		rectClient.left += nShadowSize;
	}
	else
	{
		rectClient.right -= nShadowSize;
	}
	
	rectClient.top += m_nMenuBarHeight;
	rectClient.bottom -= nShadowSize;

#ifndef _BCGSUITE_
	rectClient.left += m_wndMenuBar.GetGutterWidth();
#endif

	if (!m_rectResize.IsRectEmpty())
	{
		if (m_bIsResizeBarOnTop)
		{
			rectClient.top += m_rectResize.Height();
		}
		else
		{
			rectClient.bottom -= m_rectResize.Height();
		}
	}

	m_wndList.SetWindowPos(NULL, rectClient.left, rectClient.top, rectClient.Width(), rectClient.Height(), SWP_NOZORDER | SWP_NOACTIVATE);
	m_wndList.m_bIsEmptyMenu = GetMenuItemCount() == 0;
}
开发者ID:iclosure,项目名称:jframework,代码行数:55,代码来源:BCGPGridFilterMenu.cpp


示例9: wxMax

wxSize wxSplitWindow::DoGetBestSize() const {
    // get best sizes of subwindows
    wxSize size1, size2;
    size1.x = 0; size1.y = 0; size2.x = 0; size2.y = 0;
    if (m_windowOne) size1 = m_windowOne->GetEffectiveMinSize();
    if (m_windowTwo) size2 = m_windowTwo->GetEffectiveMinSize();

    // sum them up
    wxSize sizeBest;
    if (m_splitMode == wxSPLIT_VERTICAL) {
        sizeBest.x = wxMax(size1.x, m_minimumPaneSize) + wxMax(size2.x, m_minimumPaneSize);
        sizeBest.y = wxMax(size1.y, size2.y);
        sizeBest.x += GetSashSize();
    }else{ // wxSPLIT_HORIZONTAL
        sizeBest.x = wxMax(size1.x, size2.x);
        sizeBest.y = wxMax(size1.y, m_minimumPaneSize) + wxMax(size2.y, m_minimumPaneSize);
        sizeBest.y += GetSashSize();
    }
    sizeBest.x += 2*GetBorderSize();
    sizeBest.y += 2*GetBorderSize();

    return sizeBest;
}
开发者ID:stahta01,项目名称:wxCode_components,代码行数:23,代码来源:splitwindow.cpp


示例10: GetGravityDelta

/** Determine which way to move the client for the border. */
void GetGravityDelta(const ClientNode *np, int gravity, int *x, int  *y)
{

   int north, south, east, west;
   GetBorderSize(&np->state, &north, &south, &east, &west);
   switch(gravity) {
   case NorthWestGravity:
      *y = -north;
      *x = -west;
      break;
   case NorthGravity:
      *y = -north;
      *x = (west - east) / 2;
      break;
   case NorthEastGravity:
      *y = -north;
      *x = west;
      break;
   case WestGravity:
      *x = -west;
      *y = (north - south) / 2;
      break;
   case CenterGravity:
      *y = (north - south) / 2;
      *x = (west - east) / 2;
      break;
   case EastGravity:
      *x = west;
      *y = (north - south) / 2;
      break;
   case SouthWestGravity:
      *y = south;
      *x = -west;
      break;
   case SouthGravity:
      *x = (west - east) / 2;
      *y = south;
      break;
   case SouthEastGravity:
      *y = south;
      *x = west;
      break;
   default: /* Static */
      *x = 0;
      *y = 0;
      break;
   }

}
开发者ID:KarlGodt,项目名称:jwm,代码行数:50,代码来源:place.c


示例11: GetEdgeWidth

void IFWL_Widget::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) {
  if (!bAutoSize) {
    rect = m_pProperties->m_rtWidget;
    return;
  }

  if (HasEdge()) {
    FX_FLOAT fEdge = GetEdgeWidth();
    rect.Inflate(fEdge, fEdge);
  }
  if (HasBorder()) {
    FX_FLOAT fBorder = GetBorderSize();
    rect.Inflate(fBorder, fBorder);
  }
}
开发者ID:documentcloud,项目名称:pdfium,代码行数:15,代码来源:ifwl_widget.cpp


示例12: ASSERT

bool cdxCDynamicWndEx::StretchWindow(int iAddPcnt)
{
	if(!IsWindow())
	{
		ASSERT(false);
		return false;
	}

	CSize	szDelta	=	GetCurrentClientSize() + GetBorderSize();

	szDelta.cx	=	(szDelta.cx * iAddPcnt) / 100;
	szDelta.cy	=	(szDelta.cy * iAddPcnt) / 100;

	return StretchWindow(szDelta);
}
开发者ID:Luomu,项目名称:workspacewhiz,代码行数:15,代码来源:cdxCDynamicWndEx.cpp


示例13: GetBorderSize

void CBaseContainerNode::DrawGrabIcon()
{
	const float bSize = GetBorderSize();

	surface()->DrawSetColor( Color( 192, 192, 192, 255 ) );
	surface()->DrawSetTexture( m_iGrabIcon );

	Vector2D icooffset( -GRABICO_OFFSET, GRABICO_OFFSET );
	Vector2D gi_max = Vector2D( GetContainerMaxs().x, GetContainerMins().y ) + icooffset;
	Vector2D gi_min = gi_max + Vector2D( -bSize, bSize );

	pNodeView->ToPanelSpace( gi_max );
	pNodeView->ToPanelSpace( gi_min );

	surface()->DrawTexturedRect( gi_min.x, gi_min.y, gi_max.x, gi_max.y );
}
开发者ID:BSVino,项目名称:source-shader-editor,代码行数:16,代码来源:vbasecontainer.cpp


示例14: GetCenter

Vector2D CBaseContainerNode::GetContainerBorderMin( int mode )
{
	Vector2D out;
	Vector2D center = GetCenter();
	center.x = GetBoundsMaxNodeSpace().x;
	const float bSize = GetBorderSize();

	switch ( mode )
	{
	default:
		Assert( 0 );
	case CBORDER_TOP_LEFT:
		out.x = center.x;
		out.y = center.y + m_vecContainerExtents.x - bSize;
		break;
	case CBORDER_TOP:
		out.x = center.x + bSize;
		out.y = center.y + m_vecContainerExtents.x - bSize;
		break;
	case CBORDER_TOP_RIGHT:
		out.x = center.x + m_vecContainerExtents.y - bSize;
		out.y = center.y + m_vecContainerExtents.x - bSize;
		break;
	case CBORDER_RIGHT:
		out.x = center.x + m_vecContainerExtents.y - bSize;
		out.y = center.y + m_vecContainerExtents.z + bSize;
		break;
	case CBORDER_BOTTOM_RIGHT:
		out.x = center.x + m_vecContainerExtents.y - bSize;
		out.y = center.y + m_vecContainerExtents.z;
		break;
	case CBORDER_BOTTOM:
		out.x = center.x + bSize;
		out.y = center.y + m_vecContainerExtents.z;
		break;
	case CBORDER_BOTTOM_LEFT:
		out.x = center.x;
		out.y = center.y + m_vecContainerExtents.z;
		break;
	case CBORDER_LEFT:
		out.x = center.x;
		out.y = center.y + m_vecContainerExtents.z + bSize;
		break;
	}

	return out;
}
开发者ID:BSVino,项目名称:source-shader-editor,代码行数:47,代码来源:vbasecontainer.cpp


示例15: CascadeClient

/** Cascade placement. */
void CascadeClient(const BoundingBox *box, ClientNode *np)
{

   const ScreenType *sp;
   int north, south, east, west;
   int cascadeIndex;
   char overflow;

   GetBorderSize(&np->state, &north, &south, &east, &west);
   sp = GetMouseScreen();
   cascadeIndex = sp->index * settings.desktopCount + currentDesktop;

   /* Set the cascaded location. */
   np->x = box->x + west + cascadeOffsets[cascadeIndex];
   np->y = box->y + north + cascadeOffsets[cascadeIndex];
   cascadeOffsets[cascadeIndex] += settings.borderWidth
                                 + settings.titleHeight;

   /* Check for cascade overflow. */
   overflow = 0;
   if(np->x + np->width - box->x > box->width) {
      overflow = 1;
   } else if(np->y + np->height - box->y > box->height) {
      overflow = 1;
   }

   if(overflow) {
      cascadeOffsets[cascadeIndex] = settings.borderWidth
                                   + settings.titleHeight;
      np->x = box->x + west + cascadeOffsets[cascadeIndex];
      np->y = box->y + north + cascadeOffsets[cascadeIndex];

      /* Check for client overflow and update cascade position. */
      if(np->x + np->width - box->x > box->width) {
         np->x = box->x + west;
      } else if(np->y + np->height - box->y > box->height) {
         np->y = box->y + north;
      } else {
         cascadeOffsets[cascadeIndex] += settings.borderWidth
                                       + settings.titleHeight;
      }
   }

   ConstrainSize(np);
   ConstrainPosition(np);

}
开发者ID:KarlGodt,项目名称:jwm,代码行数:48,代码来源:place.c


示例16: GetBorderSize

    CSize GetBorderSize(HWND hWnd, bool dwmEnabled)
    {
        // Check for Caption
        DWORD dwStyle = ::GetWindowLong(hWnd, GWL_STYLE);
        bool caption = (dwStyle & WS_CAPTION) != 0;
        DWORD dwExStyle = ::GetWindowLong(hWnd, GWL_EXSTYLE);

        // Get BorderMultiplierFactor
        int bmfactor = 0;
        ::SystemParametersInfo(SPI_GETBORDER, 0, &bmfactor, 0);
        int factor = bmfactor - 1;

        CSize border;
        if ((dwExStyle & WS_EX_CLIENTEDGE) != 0)
        {
            // Fixed3D
            border = GetFixedFrameBorderSize() + GetBorder3DSize();
        }
        else if ((dwStyle & WS_THICKFRAME) != 0)
        {
            // Dialog
            if ((dwExStyle & WS_EX_DLGMODALFRAME) != 0)
            {
                // Dialog with WS_EX_DLGMODALFRAME has double border
                int cx = ::GetSystemMetrics(SM_CXDLGFRAME);
                int cy = ::GetSystemMetrics(SM_CYDLGFRAME);
                border.SetSize(cx + cx, cy + cy);
            }
            // Sizable or SizableToolWindow
            else if (IsVista())
                border = GetFrameBorderSize();
            else
                border = GetFixedFrameBorderSize() +
                            (caption ? GetBorderSize() + CSize(factor, factor)
                                : CSize(factor, factor));
        }
        else
        {
            if (dwmEnabled)
                border = GetFrameBorderSize();
            else
                border = GetFixedFrameBorderSize();
        }

        return border;
    }
开发者ID:Crawping,项目名称:MetroWindow,代码行数:46,代码来源:WindowExtenders.cpp


示例17: WriteFrameExtents

/** Set _NET_FRAME_EXTENTS. */
void WriteFrameExtents(Window win, const ClientState *state)
{
   unsigned long values[4];
   int north, south, east, west;

   GetBorderSize(state, &north, &south, &east, &west);

   /* left, right, top, bottom */
   values[0] = west;
   values[1] = east;
   values[2] = north;
   values[3] = south;

   JXChangeProperty(display, win, atoms[ATOM_NET_FRAME_EXTENTS],
                    XA_CARDINAL, 32, PropModeReplace,
                    (unsigned char*)values, 4);

}
开发者ID:Miteam,项目名称:jwm,代码行数:19,代码来源:hint.c


示例18: StopMove

/** Stop move. */
void StopMove(ClientNode *np, int doMove,
              int oldx, int oldy, MaxFlags maxFlags)
{

   int north, south, east, west;

   Assert(np);
   Assert(np->controller);

   (np->controller)(0);

   np->controller = NULL;

   SetDefaultCursor(np->parent);
   UnregisterCallback(SignalMove, NULL);

   if(!doMove) {

      np->x = oldx;
      np->y = oldy;

      /* Restore maximized status. */
      if(maxFlags) {
         MaximizeClient(np, maxFlags);
      }
      return;

   }

   GetBorderSize(&np->state, &north, &south, &east, &west);

   if(np->parent != None) {
      JXMoveWindow(display, np->parent, np->x - west, np->y - north);
   } else {
      JXMoveWindow(display, np->window, np->x - west, np->y - north);
   }
   SendConfigureEvent(np);

   /* Restore maximized status. */
   if(maxFlags) {
      MaximizeClient(np, maxFlags);
   }

}
开发者ID:pecarter-work,项目名称:jwm,代码行数:45,代码来源:move.c


示例19: GetClientRectangle

/** Get a rectangle to represent a client window. */
void GetClientRectangle(const ClientNode *np, RectangleType *r)
{

   int north, south, east, west;

   GetBorderSize(&np->state, &north, &south, &east, &west);

   r->left = np->x - west;
   r->right = np->x + np->width + east;
   r->top = np->y - north;
   if(np->state.status & STAT_SHADED) {
      r->bottom = np->y + south;
   } else {
      r->bottom = np->y + np->height + south;
   }

   r->valid = 1;

}
开发者ID:Nehamkin,项目名称:jwm,代码行数:20,代码来源:move.c


示例20: ResizeMoveCtrl

void ResizeMoveCtrl(HWND hDlg, HWND hCtrl, int dx, int dy, int dw, int dh)
{
	RECT rect;
	POINT point;
	SIZE border;

	GetWindowRect(hCtrl, &rect);
	point.x = right_to_left_mode?rect.right:rect.left;
	point.y = rect.top;
	ScreenToClient(hDlg, &point);
	GetClientRect(hCtrl, &rect);

	// If the control has any borders (dialog, edit box), take them into account
	border = GetBorderSize(hCtrl);
	MoveWindow(hCtrl, point.x + (int)(fScale*(float)dx), point.y + (int)(fScale*(float)dy),
		(rect.right - rect.left) + (int)(fScale*(float)dw + border.cx),
		(rect.bottom - rect.top) + (int)(fScale*(float)dh + border.cy), TRUE);
	InvalidateRect(hCtrl, NULL, TRUE);
}
开发者ID:DesignD,项目名称:rufus,代码行数:19,代码来源:stdlg.c



注:本文中的GetBorderSize函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetBossSaveData函数代码示例发布时间:2022-05-30
下一篇:
C++ GetBorder函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap