本文整理汇总了C++中CWinApp::LoadStandardCursor方法的典型用法代码示例。如果您正苦于以下问题:C++ CWinApp::LoadStandardCursor方法的具体用法?C++ CWinApp::LoadStandardCursor怎么用?C++ CWinApp::LoadStandardCursor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CWinApp
的用法示例。
在下文中一共展示了CWinApp::LoadStandardCursor方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PreCreateWindow
BOOL CRowForm::PreCreateWindow(CREATESTRUCT& cs)
{
// override default window class styles CS_HREDRAW and CS_VREDRAW
// otherwise resizing frame redraws entire view, causing flicker
CWinApp *pApp = AfxGetApp();
cs.lpszClass = AfxRegisterWndClass( // create our own window class
CS_DBLCLKS, // request double-clicks
pApp->LoadStandardCursor(IDC_ARROW), // standard cursor
NULL, // no background brush
pApp->LoadIcon(IDR_MAINFRAME)); // app's icon
return CFormView::PreCreateWindow(cs);
}
示例2: RGB
CDrawingView::CDrawingView()
{
m_nDrawTool = DRAWTOOL_ARROW;
m_crLine = RGB( 0, 0, 0 );
m_crFill = RGB( 255, 255, 255 );
m_pCurShape = NULL;
// Load standard cursors used by the view.
CWinApp *pApp = AfxGetApp();
ASSERT( pApp != NULL );
m_hcurArrow = pApp->LoadStandardCursor( IDC_ARROW );
m_hcurCross = pApp->LoadStandardCursor( IDC_CROSS );
}
示例3: CTreeCtrl
CTreeFileCtrl::CTreeFileCtrl() : CTreeCtrl()
{
m_bShowFiles = TRUE;
m_pilDrag = NULL;
m_hSelItem = NULL;
m_hItemDrag = NULL;
m_hItemDrop = NULL;
m_TimerTicks = 0;
m_bAllowDragDrop = TRUE;
m_bAllowRename = TRUE;
m_bAllowOpen = TRUE;
m_bAllowProperties = TRUE;
m_bAllowDelete = TRUE;
CWinApp* pApp = AfxGetApp();
m_NoDropCopyCursor = pApp->LoadCursor(IDR_TREEFILECTRL_NO_DROPCOPY);
ASSERT(m_NoDropCopyCursor);
m_DropCopyCursor = pApp->LoadCursor(IDR_TREEFILECTRL_DROPCOPY);
ASSERT(m_DropCopyCursor);
m_NoDropMoveCursor = pApp->LoadCursor(IDR_TREEFILECTRL_NO_DROPMOVE);
ASSERT(m_NoDropMoveCursor);
m_DropMoveCursor = pApp->LoadStandardCursor(IDC_ARROW);
ASSERT(m_DropMoveCursor);
}
示例4: Create
BOOL CModelInputDlg::Create(const CModelInputParameterDefVector& variables, const CRect& rectMI, const CString& modelName, CWnd* pParentWnd, bool bForTest)
{
BOOL rep = false;
ResetCtrl();
m_variables = variables;
CRect rectDlg(rectMI);
CAppOption option;
option.SetCurrentProfile(_T("ModelsWindowsPosition"));
CPoint defaultPos = option.GetProfilePoint(modelName, CPoint(430, 0));
option.SetCurrentProfile(_T("WindowsPosition"));
defaultPos += option.GetProfilePoint(_T("ModelInputEditor"), CPoint(30, 30));
rectDlg += defaultPos;
UtilWin::EnsureRectangleOnDisplay(rectDlg);
CWinApp* pApp = AfxGetApp();
CString strWndClass = AfxRegisterWndClass(
0,
pApp->LoadStandardCursor(IDC_ARROW),
(HBRUSH)(COLOR_3DFACE + 1),
pApp->LoadIcon(IDI_HEART));
if (bForTest)
rep = CWnd::CreateEx(WS_EX_CLIENTEDGE, strWndClass, modelName, WS_DLGFRAME | WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_VISIBLE | WS_SYSMENU, rectDlg, pParentWnd, NULL, NULL);
else
rep = CWnd::CreateEx(WS_EX_CLIENTEDGE, strWndClass, modelName, WS_DLGFRAME | WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_VISIBLE, rectDlg, pParentWnd, NULL, NULL);
CFont* pFont = CFont::FromHandle((HFONT)GetStockObject(DEFAULT_GUI_FONT)); // SYSTEM_FONT ANSI_VAR_FONT
for (size_t i = 0; i < m_variables.size(); i++)
{
//create title
CStatic* pStatic = (CStatic*) new CStatic;
CRect rect = m_variables[i].GetItemRect(0);
//rect.top += 3;
//rect.bottom += 3;
pStatic->Create(CString(m_variables[i].m_caption.c_str()), WS_CHILD | WS_VISIBLE | SS_CENTERIMAGE, rect, this, IDC_STATIC);
pStatic->SetFont(pFont);
m_titleCtrlArray.Add(pStatic);
//create control
switch (m_variables[i].GetType())
{
case CModelInputParameterDef::kMVBool:
{
CCFLComboBox* pCombo = (CCFLComboBox*) new CCFLComboBox;
CRect rect = m_variables[i].GetItemRect(1);
rect.bottom += 3 * rect.Height();
pCombo->Create(WS_TABSTOP | WS_BORDER | WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST, rect, this, GetID(i));
pCombo->SetFont(pFont);
CString str;
str.LoadString(IDS_STR_YES);
pCombo->AddString(str);
str.LoadString(IDS_STR_NO);
pCombo->AddString(str);
m_varCtrlArray.Add(pCombo);
break;
}
case CModelInputParameterDef::kMVInt:
{
CIntEdit* pIntEdit = (CIntEdit*) new CIntEdit;
CRect rect = m_variables[i].GetItemRect(1);
pIntEdit->CreateEx(WS_EX_CLIENTEDGE, _T("EDIT"), NULL, WS_TABSTOP | WS_CHILD | WS_VISIBLE | WS_BORDER, rect, this, GetID(i));
pIntEdit->SetFont(pFont);
m_varCtrlArray.Add(pIntEdit);
break;
}
case CModelInputParameterDef::kMVReal:
{
CFloatEdit* pFloatEdit = (CFloatEdit*) new CFloatEdit;
CRect rect = m_variables[i].GetItemRect(1);
pFloatEdit->CreateEx(WS_EX_CLIENTEDGE, _T("EDIT"), NULL, WS_TABSTOP | WS_CHILD | WS_VISIBLE | WS_BORDER, rect, this, GetID(i));
pFloatEdit->SetFont(pFont);
m_varCtrlArray.Add(pFloatEdit);
break;
}
case CModelInputParameterDef::kMVString:
{
CCFLEdit* pEdit = (CCFLEdit*) new CCFLEdit;
//.........这里部分代码省略.........