Last updated:
22. July 2001

User Interface Programming

(Start main menu) Home ­ Articles ­ Book ­ Resources (End main menu)

WaitCurs.cpp: Listing 2


(Start sub-menu)

Java

User Interface Programming Column

Features

Tech Tips

Reviews

Code Archive


Range Slider

Splitter Controls and Dialog Resizing


 

Feedback…

My blog »

(End sub-menu)

//
// WaitCurs.cpp: Implementation
//
 
…
 
#include "WaitCurs.h"
 
WaitCursor::~WaitCursor() // Forces a WM_SETCURSOR mes­sage.
{
    CPoint pt; // Screen coordinates!
 
#ifdef _WIN32
    if ( !::GetCursorPos(&pt) )
        TRACE0( "WaitCursor::~WaitCursor(): GetCursorPos Failed\n" );
    else if ( !::SetCursorPos( pt.x, pt.y ) )
        TRACE2( "WaitCursor::~WaitCursor(): "
                "SetCursorPos(%d,%d) Failed\n", pt.x, pt.y );
#else // Win16
    ::GetCursorPos( &pt );
    ::SetCursorPos( pt.x, pt.y );
#endif
}
 
// end of file

(Start bottom menu)

TopHomeArticlesBookResources
Win­dows De­vel­oper Maga­zineR&D BooksCMP Books
Amazon.comAmazon.co.ukContact Petter Hesselberg

(End bottom menu)

WaitCurs.h

Back to Article