本文整理匯總了C++中DestroyCursor函數的典型用法代碼示例。如果您正苦於以下問題:C++ DestroyCursor函數的具體用法?C++ DestroyCursor怎麽用?C++ DestroyCursor使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了DestroyCursor函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: __declspec
extern "C" int __declspec(dllexport) Unload(void)
{
#ifdef _DEBUG
UnInitDebug();
#endif
WindowList_Destroy(YAMNVar.MessageWnds);
WindowList_Destroy(YAMNVar.NewMailAccountWnd);
DestroyCursor(hCurSplitNS);
DestroyCursor(hCurSplitWE);
CloseHandle(NoWriterEV);
CloseHandle(WriteToFileEV);
CloseHandle(ExitEV);
DeleteCriticalSection(&AccountStatusCS);
DeleteCriticalSection(&FileWritingCS);
DeleteCriticalSection(&PluginRegCS);
UnhookEvents();
DestroyServiceFunctions();
UnloadPlugins();
delete [] CodePageNamesSupp;
return 0;
}
示例2: SetCursor
void WIN32Window::terminate()
{
SetCursor(NULL);
if(m_defaultCursor) {
DestroyCursor(m_defaultCursor);
m_defaultCursor = NULL;
}
for(HCURSOR& cursor : m_cursors)
DestroyCursor(cursor);
m_cursors.clear();
internalDestroyGLContext();
if(m_deviceContext) {
if(!ReleaseDC(m_window, m_deviceContext))
g_logger.error("Release device context failed.");
m_deviceContext = NULL;
}
if(m_window) {
if(!DestroyWindow(m_window))
g_logger.error("ERROR: Destroy window failed.");
m_window = NULL;
}
if(m_instance) {
if(!UnregisterClassA(g_app.getCompactName().c_str(), m_instance))
g_logger.error("UnregisterClassA failed");
m_instance = NULL;
}
}
示例3: SplitmsgShutdown
int SplitmsgShutdown(void)
{
WindowList_Destroy(M.m_hMessageWindowList);
WindowList_Destroy(PluginConfig.hUserPrefsWindowList);
DestroyCursor(PluginConfig.hCurSplitNS);
DestroyCursor(PluginConfig.hCurHyperlinkHand);
DestroyCursor(PluginConfig.hCurSplitWE);
FreeLibrary(GetModuleHandleA("Msftedit.dll"));
if (g_hIconDLL) {
FreeLibrary(g_hIconDLL);
g_hIconDLL = NULL;
}
ImageList_RemoveAll(PluginConfig.g_hImageList);
ImageList_Destroy(PluginConfig.g_hImageList);
delete Win7Taskbar;
DestroyMenu(PluginConfig.g_hMenuContext);
if (PluginConfig.g_hMenuContainer)
DestroyMenu(PluginConfig.g_hMenuContainer);
UnloadIcons();
FreeTabConfig();
if (Utils::rtf_ctable)
mir_free(Utils::rtf_ctable);
UnloadTSButtonModule();
return 0;
}
示例4: DestroyCursor
CEGControlBar::~CEGControlBar(void)
{
if( NULL != m_curHorzDrag )
DestroyCursor( m_curHorzDrag );
if( NULL != m_curVertDrag )
DestroyCursor( m_curVertDrag );
}
示例5: AboutProc
/*
** About Dialog with one Command Button (Unload dialog on press)
** Center on Init rel. to main Window!
*/
BOOL CALLBACK AboutProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_INITDIALOG:
CenterDialog(hWndDlg, GetParent(hWndDlg));
hCursor=LoadCursor(NULL, IDC_HAND); // Windows 98/Me, Windows 2000/XP: Hand
if(!hCursor)
hCursor=LoadCursor(hInstance, MAKEINTRESOURCE(IDC_MY_HAND));
//SetClassLong(GetDlgItem(hWndDlg, IDC_STATIC_MAIL), GCL_HCURSOR, (LPARAM)hCursor);
//SetClassLong(GetDlgItem(hWndDlg, IDC_STATIC_URL), GCL_HCURSOR, (LPARAM)hCursor);
return TRUE;
case WM_CTLCOLORSTATIC:
switch(GetDlgCtrlID((HWND)lParam))
{
case IDC_STATIC_MAIL:
case IDC_STATIC_URL:
SetBkMode((HDC)wParam, TRANSPARENT);
SetTextColor((HDC)wParam, RGB(0x00, 0x00, 0xFF));
return (BOOL)GetStockObject(NULL_BRUSH);
case IDC_STATIC_DO:
SetBkMode((HDC)wParam,TRANSPARENT);
SetTextColor((HDC)wParam, RGB(0x00, 0xA0, 0x00));
return (BOOL)GetStockObject(NULL_BRUSH);
}
break;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDOK:
DestroyCursor(hCursor);
EndDialog(hWndDlg, 1);
return TRUE;
case IDC_STATIC_URL:
if(HIWORD(wParam)==STN_CLICKED)
{
ShellExecute(GetParent(hWndDlg), "open", "http://darkone.yo.lv", 0, 0, SW_SHOW);
return TRUE;
}
break;
case IDC_STATIC_MAIL:
if(HIWORD(wParam)==STN_CLICKED)
{
ShellExecute(GetParent(hWndDlg), "open", "mailto:[email protected]?subject=PACK WinCmd Plugin", 0, 0, SW_SHOW);
return TRUE;
}
break;
// case IDC_CHK_LCASE: FIXME
}
break;
case WM_CLOSE:
DestroyCursor(hCursor);
EndDialog(hWndDlg, 0);
return FALSE;
}
return FALSE;
}
示例6: DestroyCursor
CEGPaneBar::~CEGPaneBar(void)
{
if( NULL != m_curHorzDrag )
DestroyCursor( m_curHorzDrag );
if( NULL != m_curVertDrag )
DestroyCursor( m_curVertDrag );
if( NULL != m_pszCaption )
free( m_pszCaption );
if( NULL != m_fntCaption )
DeleteObject( m_fntCaption );
if( NULL != m_fntXButton )
DeleteObject( m_fntXButton );
}
示例7: SplitmsgShutdown
int SplitmsgShutdown(void)
{
DestroyCursor(hCurSplitNS);
DestroyCursor(hCurHyperlinkHand);
DestroyCursor(hCurSplitWE);
DestroyHookableEvent(hHookWinEvt);
DestroyHookableEvent(hHookWinPopup);
DestroyHookableEvent(hHookWinWrite);
FreeMsgLogIcons();
FreeLibrary(GetModuleHandleA("Msftedit"));
RichUtil_Unload();
msgQueue_destroy();
return 0;
}
示例8: fpWTClose
GHOST_WindowWin32::~GHOST_WindowWin32()
{
if (m_wintab) {
GHOST_WIN32_WTClose fpWTClose = ( GHOST_WIN32_WTClose ) ::GetProcAddress( m_wintab, "WTClose" );
if (fpWTClose) {
if (m_tablet)
fpWTClose(m_tablet);
if (m_tabletData)
delete m_tabletData;
m_tabletData = NULL;
}
}
if (m_customCursor) {
DestroyCursor(m_customCursor);
m_customCursor = NULL;
}
setDrawingContextType(GHOST_kDrawingContextTypeNone);
if (m_hDC) {
::ReleaseDC(m_hWnd, m_hDC);
m_hDC = 0;
}
if (m_hWnd) {
::DestroyWindow(m_hWnd);
m_hWnd = 0;
}
}
示例9: DestroyCursor
void BURGER_API Burger::OSCursorImage::Shutdown(void)
{
if (m_pCursorImage) {
DestroyCursor(m_pCursorImage);
m_pCursorImage = NULL;
}
}
示例10: MAKEINTRESOURCE
bool Chkdraft::CreateThis()
{
if ( !ClassWindow::WindowClassIsRegistered("wcChkdraft") )
{
DWORD classStyle = 0;
HICON hIcon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_PROGRAM_ICON), IMAGE_ICON, 32, 32, 0);
HICON hIconSmall = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_PROGRAM_ICON), IMAGE_ICON, 16, 16, 0);
HCURSOR hCursor = LoadCursor(NULL, IDC_ARROW);
HBRUSH hBackground = (HBRUSH)(COLOR_APPWORKSPACE+1);
LPCTSTR menu = MAKEINTRESOURCE(IDR_MAIN_MENU);
LPCTSTR wcName = "wcChkdraft";
if ( !ClassWindow::RegisterWindowClass(classStyle, hIcon, hCursor, hBackground, menu, wcName, hIconSmall, false) )
{
DestroyIcon(hIcon);
DestroyCursor(hCursor);
DestroyIcon(hIconSmall);
}
}
std::string sWindowName(std::string("Chkdraft ") + GetFullVersionString());
static char cWindowName[200] = {};
strncpy(cWindowName, sWindowName.c_str(), sWindowName.size());
DWORD exStyle = 0;
LPCSTR windowName = cWindowName;
DWORD style = WS_OVERLAPPEDWINDOW|WS_CLIPCHILDREN;
int windowX = CW_USEDEFAULT,
windowY = CW_USEDEFAULT,
windowWidth = CW_USEDEFAULT,
windowHeight = CW_USEDEFAULT;
HMENU id = NULL;
return ClassWindow::CreateClassWindow(exStyle, windowName, style, windowX, windowY, windowWidth, windowHeight, NULL, id) &&
Chkdraft::CreateSubWindows();
}
示例11: switch
//---------------------------------------------------------------------
// DropTarget():
// This function is called when this container object is acting as
// a drop target for a Drag & Drop operation. The first paremeter
// "pwpobjDropSource" is the object in that is being "dropped" into
// this container.
// The second parameter, "nFunction", is the function code for the
// Drag & Drop operation the user chose to do (move, copy, etc..).
//---------------------------------------------------------------------
BOOL WPDIRECTORY::DropTarget(WPOBJECT *pwpobjDropSource,int nFunction)
{
HCURSOR hcurOriginal;
// Check if object class accepts object "pwpobjDropSource" being dropped on it.
if (TestDropTarget(pwpobjDropSource,nFunction)==TRUE)
{
// Depending on which drop operation is being performed...
switch (nFunction)
{
case DROP_MOVE:
case DROP_COPY:
// Load custom "wait" cursor (i.e. clock) and set current cursor to it.
hcurOriginal = SetCursor(LoadCursor(g_wpEnvironment.hInst,MAKEINTRESOURCE(IDC_WAITCURSOR)));
// Copy actual file(s) represented in object to this directory.
if (pwpobjDropSource->CopyObjectToFileSystem(GetPath())==TRUE)
{
// Update directory folder contents.
LoadDirectoryFiles();
// Arrange loaded icons.
ArrangeIcons();
}
// Check if original cursor was not the same as our "wait" cursor...
if (hcurOriginal!=GetCursor())
// Restore original cursor and destroy custom wait cursor.
DestroyCursor(SetCursor(hcurOriginal));
// Return result.
return (TRUE);
}
}
// Failed dropping source object into this directory object.
return (FALSE);
}
示例12: doDestroy_Classes
static Void local doDestroy_Classes() {
if (Nodes) free(Nodes);
Nodes = NULL;
LastNode = 0;
DestroyCursor(cBrowse.hMoveClassCursor);
hWndClasses=NULL;
}
示例13: DestroyCursor
void CursorImpl::release()
{
if (m_cursor) {
DestroyCursor(m_cursor);
m_cursor = NULL;
}
}
示例14: ReleaseCapture
LRESULT VirtualDimension::OnLeftButtonUp(HWND /*hWnd*/, UINT /*message*/, WPARAM /*wParam*/, LPARAM lParam)
{
POINT pt;
//If not dragging a window, nothing to do
if (m_draggedWindow == NULL)
return 0;
//Release capture
ReleaseCapture();
//Free the cursor
DestroyCursor(m_dragCursor);
pt.x = GET_X_LPARAM(lParam);
pt.y = GET_Y_LPARAM(lParam);
//Find out the target desktop
Desktop * desk = deskMan->GetDesktopFromPoint(pt.x, pt.y);
if (m_draggedWindow->IsOnDesk(desk))
return 0; //window already on the target desk
//Move the window to this desktop
m_draggedWindow->MoveToDesktop(desk);
//Refresh the window
Refresh();
return 0;
}
示例15: main
int main() {
hMutex = CreateMutex( NULL, FALSE, LPCWSTR( "MyMutex"));
if (GetLastError() == ERROR_ALREADY_EXISTS || GetLastError() == ERROR_ACCESS_DENIED)
return 1 ;
programHandle = GetModuleHandle(NULL);
firstCursor = CopyCursor(LoadCursor(NULL, IDC_IBEAM));
hookHandle = SetWindowsHookEx(WH_KEYBOARD_LL, LowLevelKeyboardHook, programHandle, 0);
timerHandle = SetTimer(NULL, timerHandle, 200, UpdateCursor);
HCURSOR cursorHandle = LoadCursor(programHandle, MAKEINTRESOURCE(1033));
SetSystemCursor(cursorHandle, OCR_IBEAM);
MSG message;
while ( GetMessage(&message, 0, 0, 0))
{
TranslateMessage(&message);
DispatchMessage(&message);
}
SetSystemCursor(firstCursor, OCR_IBEAM);
DestroyCursor(firstCursor);
UnhookWindowsHookEx(hookHandle);
ReleaseMutex(hMutex);
return 0;
}