本文整理汇总了C++中CFX_RectF::TopLeft方法的典型用法代码示例。如果您正苦于以下问题:C++ CFX_RectF::TopLeft方法的具体用法?C++ CFX_RectF::TopLeft怎么用?C++ CFX_RectF::TopLeft使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFX_RectF
的用法示例。
在下文中一共展示了CFX_RectF::TopLeft方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddRectangle
void CFDE_Path::AddRectangle(const CFX_RectF& rect) {
MoveTo(rect.TopLeft());
LineTo(rect.TopRight());
LineTo(rect.BottomRight());
LineTo(rect.BottomLeft());
CloseFigure();
}
示例2: OnProcessMessage
void CFWL_ComboList::OnProcessMessage(CFWL_Message* pMessage) {
if (!pMessage)
return;
CFWL_Message::Type type = pMessage->GetType();
bool backDefault = true;
if (type == CFWL_Message::Type::SetFocus ||
type == CFWL_Message::Type::KillFocus) {
OnDropListFocusChanged(pMessage, type == CFWL_Message::Type::SetFocus);
} else if (type == CFWL_Message::Type::Mouse) {
CFWL_MessageMouse* pMsg = static_cast<CFWL_MessageMouse*>(pMessage);
CFWL_ScrollBar* vertSB = GetVertScrollBar();
if (IsShowScrollBar(true) && vertSB) {
CFX_RectF rect = vertSB->GetWidgetRect();
if (rect.Contains(pMsg->m_pos)) {
pMsg->m_pos -= rect.TopLeft();
vertSB->GetDelegate()->OnProcessMessage(pMsg);
return;
}
}
switch (pMsg->m_dwCmd) {
case FWL_MouseCommand::Move: {
backDefault = false;
OnDropListMouseMove(pMsg);
break;
}
case FWL_MouseCommand::LeftButtonDown: {
backDefault = false;
OnDropListLButtonDown(pMsg);
break;
}
case FWL_MouseCommand::LeftButtonUp: {
backDefault = false;
OnDropListLButtonUp(pMsg);
break;
}
default:
break;
}
} else if (type == CFWL_Message::Type::Key) {
backDefault = !OnDropListKey(static_cast<CFWL_MessageKey*>(pMessage));
}
if (backDefault)
CFWL_ListBox::OnProcessMessage(pMessage);
}