当前位置: 首页>>代码示例>>C++>>正文


C++ DestroyCursor函数代码示例

本文整理汇总了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;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:28,代码来源:main.cpp

示例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;
    }
}
开发者ID:Ablankzin,项目名称:otclient,代码行数:32,代码来源:win32window.cpp

示例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;
}
开发者ID:kmdtukl,项目名称:miranda-ng,代码行数:34,代码来源:msgs.cpp

示例4: DestroyCursor

CEGControlBar::~CEGControlBar(void)
{
	if( NULL != m_curHorzDrag )
		DestroyCursor( m_curHorzDrag );
	if( NULL != m_curVertDrag )
		DestroyCursor( m_curVertDrag );
}
开发者ID:AnthonyNystrom,项目名称:GenXSource,代码行数:7,代码来源:EGCtrlBar.cpp

示例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;
}
开发者ID:Pavuucek,项目名称:PACKwcx,代码行数:61,代码来源:cfg.c

示例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 );
}
开发者ID:AnthonyNystrom,项目名称:GenXSource,代码行数:13,代码来源:EGPaneBar.cpp

示例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;
}
开发者ID:truefriend-cz,项目名称:miranda-ng,代码行数:16,代码来源:msgs.cpp

示例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;
	}
}
开发者ID:jinjoh,项目名称:NOOR,代码行数:27,代码来源:GHOST_WindowWin32.cpp

示例9: DestroyCursor

void BURGER_API Burger::OSCursorImage::Shutdown(void)
{
	if (m_pCursorImage) {
		DestroyCursor(m_pCursorImage);
		m_pCursorImage = NULL;
	}
}
开发者ID:Olde-Skuul,项目名称:burgerlib,代码行数:7,代码来源:broscursorwindows.cpp

示例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();
}
开发者ID:RElesgoe,项目名称:Chkdraft,代码行数:35,代码来源:Chkdraft.cpp

示例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);
}
开发者ID:OS2World,项目名称:WIN16-Worplace-Shell-for-Windows,代码行数:43,代码来源:WPDRIVE.CPP

示例12: doDestroy_Classes

static Void local doDestroy_Classes() {
   if (Nodes) free(Nodes);
   Nodes = NULL;
   LastNode = 0;
   DestroyCursor(cBrowse.hMoveClassCursor);
   hWndClasses=NULL;
}
开发者ID:OS2World,项目名称:DEV-UTIL-HUGS,代码行数:7,代码来源:Winbrows.c

示例13: DestroyCursor

void CursorImpl::release()
{
    if (m_cursor) {
        DestroyCursor(m_cursor);
        m_cursor = NULL;
    }
}
开发者ID:Foaly,项目名称:SFML,代码行数:7,代码来源:CursorImpl.cpp

示例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;
}
开发者ID:HaijinW,项目名称:VirtualDimension,代码行数:30,代码来源:VirtualDimension.cpp

示例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;
}
开发者ID:dantre,项目名称:Small-Projects,代码行数:31,代码来源:main.cpp


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