Esempio n. 1
0
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;
}
Esempio n. 2
0
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;
    }
}
Esempio n. 3
0
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;
}
Esempio n. 4
0
CEGControlBar::~CEGControlBar(void)
{
	if( NULL != m_curHorzDrag )
		DestroyCursor( m_curHorzDrag );
	if( NULL != m_curVertDrag )
		DestroyCursor( m_curVertDrag );
}
Esempio n. 5
0
/*
** 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;
}
Esempio n. 6
0
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 );
}
Esempio n. 7
0
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;
}
Esempio n. 8
0
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;
	}
}
Esempio n. 9
0
void BURGER_API Burger::OSCursorImage::Shutdown(void)
{
	if (m_pCursorImage) {
		DestroyCursor(m_pCursorImage);
		m_pCursorImage = NULL;
	}
}
Esempio n. 10
0
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();
}
//---------------------------------------------------------------------
// 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);
}
Esempio n. 12
0
static Void local doDestroy_Classes() {
   if (Nodes) free(Nodes);
   Nodes = NULL;
   LastNode = 0;
   DestroyCursor(cBrowse.hMoveClassCursor);
   hWndClasses=NULL;
}
Esempio n. 13
0
void CursorImpl::release()
{
    if (m_cursor) {
        DestroyCursor(m_cursor);
        m_cursor = NULL;
    }
}
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;
}
Esempio n. 15
0
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;
}
Esempio n. 16
0
void FreeFinderResources()
{
	DeleteObject(hBitmapDrag1);
	DeleteObject(hBitmapDrag2);

	DestroyCursor(hCursor);
}
Esempio n. 17
0
CHyperLink::~CHyperLink()
{
    m_UnderlineFont.DeleteObject();

    if(m_hLinkCursor)
        DestroyCursor(m_hLinkCursor);
}
Esempio n. 18
0
void
UpdateCursor(void)
{
  xcb_xfixes_get_cursor_image_cookie_t cookie = xcb_xfixes_get_cursor_image(xcwm_context_get_connection(context));
  xcb_xfixes_get_cursor_image_reply_t* reply = xcb_xfixes_get_cursor_image_reply(xcwm_context_get_connection(context), cookie, NULL);

  // DEBUG("Got cursor image, serial %d\n", reply->cursor_serial);

  WMUTIL_CURSOR cursor;
  memset(&cursor, 0, sizeof(cursor));
  cursor.width = reply->width;
  cursor.height = reply->height;
  cursor.xhot = reply->xhot;
  cursor.yhot = reply->yhot;
  cursor.argb = xcb_xfixes_get_cursor_image_cursor_image(reply);

  hCursor = winXCursorToHCURSOR(&cursor);

  // XXX: We should only change the cursor if the cursor is within one of our windows...
  // it's hard to notice this as a problem, as windows don't normally try to change the cursor except in response to something being clicked...
  HCURSOR hPreviousCursor = SetCursor(hCursor);

  // DEBUG("cursor 0x%08x, previous cursor 0x%08x\n", hCursor, hPreviousCursor);

  DestroyCursor(hPreviousCursor);

  free(reply);
}
Esempio n. 19
0
/*****************************************************************************
 * Win32VoutCloseWindow: close the window created by Win32VoutCreateWindow
 *****************************************************************************
 * This function returns all resources allocated by Win32VoutCreateWindow.
 *****************************************************************************/
static void Win32VoutCloseWindow( event_thread_t *p_event )
{
    vout_display_t *vd = p_event->vd;
    msg_Dbg( vd, "Win32VoutCloseWindow" );

    #if defined(MODULE_NAME_IS_direct3d9) || defined(MODULE_NAME_IS_direct3d11)
    DestroyWindow( p_event->hvideownd );
    #endif
    DestroyWindow( p_event->hwnd );
    if( p_event->hfswnd )
        DestroyWindow( p_event->hfswnd );

    #if defined(MODULE_NAME_IS_direct3d9) || defined(MODULE_NAME_IS_direct3d11)
    if( !p_event->use_desktop )
    #endif
        vout_display_DeleteWindow( vd, p_event->parent_window );
    p_event->hwnd = NULL;

    HINSTANCE hInstance = GetModuleHandle(NULL);
    UnregisterClass( p_event->class_video, hInstance );
    UnregisterClass( p_event->class_main, hInstance );

    if( p_event->vlc_icon )
        DestroyIcon( p_event->vlc_icon );

    DestroyCursor( p_event->cursor_empty );

    CloseGestures( p_event->p_gesture);
}
Esempio n. 20
0
void Mouse::DestroyCustomCursor()
{
	if (m_CustomCursor)
	{
		DestroyCursor(m_CustomCursor);
		m_CustomCursor = nullptr;
	}
}
Esempio n. 21
0
static void DestroyCustomCursor()
{
	if (CustomCursor != NULL)
	{
		DestroyCursor(CustomCursor);
		CustomCursor = NULL;
	}
}
Esempio n. 22
0
	Win32_Cursor::~Win32_Cursor()
	{
		if (this->cursor != NULL)
		{
			DestroyCursor(this->cursor);
			this->cursor = NULL;
		}
	}
Esempio n. 23
0
 void CursorImplWin32::destroy()
 {
     if(m_handler)
     {
         DestroyCursor(m_handler);
         m_handler = nullptr;
     }
 }
Esempio n. 24
0
void CMouse::DestroyCustomCursor()
{
	if (m_CustomCursor)
	{
		DestroyCursor(m_CustomCursor);
		m_CustomCursor = NULL;
	}
}
Esempio n. 25
0
NPError
NPP_Destroy(NPP inst, NPSavedData **saved)
{
    pdfmoz_t *moz = inst->pdata;
    int i;

    //MSG("NPP_Destroy");

    inst->pdata = NULL;

    DeleteObject(moz->graybrush);

    DestroyCursor(moz->arrow);
    DestroyCursor(moz->hand);
    DestroyCursor(moz->wait);

    fz_free(moz->dibinf);

    for (i = 0; i < moz->pagecount; i++)
    {
	if (moz->pages[i].obj)
	    fz_dropobj(moz->pages[i].obj);
	if (moz->pages[i].page)
	    pdf_droppage(moz->pages[i].page);
	if (moz->pages[i].image)
	    fz_droppixmap(moz->pages[i].image);
    }

    fz_free(moz->pages);

    if (moz->xref)
    {
	if (moz->xref->store)
	{
	    pdf_dropstore(moz->xref->store);
	    moz->xref->store = nil;
	}

	pdf_closexref(moz->xref);
    }

    fz_free(moz);

    return NPERR_NO_ERROR;
}
Esempio n. 26
0
void QWindowsOleDropSource::clearCursors()
{
    if (!m_cursors.isEmpty()) {
        const ActionCursorMap::const_iterator cend = m_cursors.constEnd();
        for (ActionCursorMap::const_iterator it = m_cursors.constBegin(); it != cend; ++it)
            DestroyCursor(it.value());
        m_cursors.clear();
    }
}
Esempio n. 27
0
rvGEWorkspace::~rvGEWorkspace ( )
{
	// Make sure all the wrappers get cleaned up
	rvGEWindowWrapper::GetWrapper ( mInterface->GetDesktop ( ) )->EnumChildren ( CleanupEnumProc, NULL );

	DestroyCursor ( mHandCursor );

	delete mInterface;
}
QCursorData::~QCursorData()
{
    delete bm;
    delete bmm;
#if !defined(Q_WS_WINCE) || defined(GWES_ICONCURS)
    if (hcurs)
        DestroyCursor(hcurs);
#endif
}
Esempio n. 29
0
///////////////////////////////////////////////////////////////////////////////
// dtor
CXScrollBar::~CXScrollBar()
{
	if (m_hCursor != NULL)
	{
		DestroyCursor(m_hCursor);
	}

	m_hCursor = NULL;
}
Esempio n. 30
0
static VALUE
swincursor_delete(VALUE obj){
	struct SwinCursor *sc;
	Data_Get_Struct(obj, struct SwinCursor, sc);
	SWIN_CURSORALIVECHECK(sc);
	DestroyCursor(sc->hcursor);
	sc->hcursor=0;
	return Qtrue;
}