本文整理汇总了C++中CWinApp::LoadCursor方法的典型用法代码示例。如果您正苦于以下问题:C++ CWinApp::LoadCursor方法的具体用法?C++ CWinApp::LoadCursor怎么用?C++ CWinApp::LoadCursor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CWinApp
的用法示例。
在下文中一共展示了CWinApp::LoadCursor方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetHandCursor
BOOL CStatusBarACT::SetHandCursor(LPCTSTR lpszCursorID, BOOL bTryDefault/*=TRUE*/)
{
CWinApp* pApp = AfxGetApp();
ASSERT(pApp != NULL);
if (pApp == NULL)
{
return FALSE;
}
SetHandCursor(pApp->LoadCursor(lpszCursorID), bTryDefault);
return (m_hCursorHand != NULL);
}
示例2: 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);
}
示例3: CPropertyPage
CCWBkImgPage::CCWBkImgPage() : CPropertyPage(CCWBkImgPage::IDD)
{
//{{AFX_DATA_INIT(CCWBkImgPage)
m_strImgFilename = _T("");
m_enumMode = -1;
//}}AFX_DATA_INIT
m_pPic = NULL;
m_pBackgroundInfo = NULL;
m_bSettingTransparentColor = false;
m_crTransparent = -1;
CWinApp* pApp = AfxGetApp ();
m_hIconBrowse = pApp->LoadIcon (IDI_ICON_BROWSE);
m_hIconScan = pApp->LoadIcon (IDI_ICON_SCAN);
m_hIconSetTransparent = pApp->LoadIcon (IDI_SETTRANSPARENT);
m_hIconRemoveTransparent = pApp->LoadIcon (IDI_REMOVETRANSPARENT);
m_hPickCursor = pApp->LoadCursor (IDC_CURSOR_PICKER);
}
示例4: SetPaneCursorIndex
// sets the cursor for a pane by the pane's index
BOOL CStatusBarACT::SetPaneCursorIndex(int nIndex, LPCTSTR lpszCursor)
{
// make sure array is big enough
int nMax = GetStatusBarCtrl().GetParts(0, NULL);
if (nIndex >= nMax || nIndex < 0)
{
return FALSE;
}
// get cursor handle and add to array of handles
HCURSOR hCursor = NULL;
if (lpszCursor != NULL)
{
CWinApp* pApp = AfxGetApp();
ASSERT(pApp != NULL);
if (pApp == NULL)
{
return FALSE;
}
hCursor = pApp->LoadCursor(lpszCursor);
}
SetPaneCursorIndex(nIndex, hCursor);
return TRUE;
}