⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chourgls.cpp

📁 英文版的 想要的话可以下载了 为大家服务
💻 CPP
字号:
/*
 * CHOURGLS.CPP
 * Sample Code Class Libraries
 *
 * Implementation of the CHourglass class.
 *
 * Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved
 *
 * Kraig Brockschmidt, Microsoft
 * Internet  :  kraigb@microsoft.com
 * Compuserve:  >INTERNET:kraigb@microsoft.com
 */


#include <windows.h>
#include "classlib.h"


/*
 * CHourglass::CHourglass
 * CHourglass::~CHourglass
 *
 * Constructor Parameters (optional):
 *  hWnd            HWND of a window that wants capture.  Can
 *                  be NULL in which case it is ignored.
 */

CHourglass::CHourglass(void)
    {
    m_hCur=SetCursor(LoadCursor(NULL, IDC_WAIT));
    m_hWndCapture=NULL;
    return;
    }

CHourglass::CHourglass(HWND hWnd)
    {
    m_hCur=SetCursor(LoadCursor(NULL, IDC_WAIT));

    if (NULL!=hWnd)
        {
        m_hWndCapture=hWnd;
        SetCapture(hWnd);
        }

    return;
    }


CHourglass::~CHourglass(void)
    {
    if (NULL!=m_hWndCapture)
        ReleaseCapture();

    SetCursor(m_hCur);
    return;
    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -