Clipping cursor still active after stopping debugger :-O

I have written code in Visual Studio 2005 to show list box as a pop-up window.

On Clicking the main window, I show/hide the window accordingly.

Yea the program working as I expected without having any problems.

When I had some issues, i decided to debug the program.

On showing the Listbox( cursor will be clipped ), I stopped debugging using Shift+F5.

The thing is, the Cursor Clipping was still there. After closing some opened windows from Visual Studio IDE and Switching to other windows resolved issue. but it was hectic for  minute.

I’m sure the process was not at all active. because it’s a very small application which exit on Shift+F5 press

 

// Code to clip the cursor on showing/hdie the window

void CListBoxEx::OnShowWindow(BOOL bShow, UINT nStatus)
{
    CListBox::OnShowWindow(bShow, nStatus);

    if( SW_SHOWNORMAL == bShow ) // Clip the cursor if window showing
    {
        CRect rect;
        GetWindowRect(rect);
        ClipCursor( rect );
    }
    else if( SW_HIDE == bShow ) // remove clipping on hiding
    {
        ClipCursor(NULL);
    }
}

View CommentsClipping cursor still active after stopping debugger :-O

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

blog comments powered by Disqus