user.odl

来自「The code for this article was written fo」· ODL 代码 · 共 2,094 行 · 第 1/5 页

ODL
2,094
字号
    usesgetlasterror,
    entry("LoadIconA"),
    #else
    entry("LoadIcon"),
    #endif
    helpstring("Load an icon given by ID number from resource and return bitmap handle"),
    ]
    HICON WINAPI LoadIconAsId([in] HINSTANCE hInst, [in] LONG idIcon);

    [
    #ifdef WIN32
    usesgetlasterror,
    entry("LoadIconA"),
    #else
    entry("LoadIcon"),
    #endif
    helpstring("Load an bitmap given by string name from resource and return icon handle"),
    ]
    HICON WINAPI LoadIcon([in] HINSTANCE hInst, [in] LPSTR pszIcon);

    [
    #ifdef WIN32
    usesgetlasterror,
    entry("LoadIconA"),
    #else
    entry("LoadIcon"),
    #endif
    helpstring("Load an icon given by string name from resource and return icon handle"),
    ]
    HICON WINAPI LoadIconAsStr([in] HINSTANCE hInst, [in] LPSTR pszIcon);

    [
    usesgetlasterror,
    entry("DestroyIcon"),
    helpstring("Destroys an icon previously created with CreateIcon or LoadIcon and frees its memory"),
    ]
    BOOL    WINAPI DestroyIcon([in] HICON hicon);

    [
    usesgetlasterror,
    entry("DrawIcon"),
    helpstring("Draws an icon into the given device context at the given coordinates"),
    ]
    BOOL    WINAPI DrawIcon([in] HDC hdc, [in] int x, [in] int y,
                            [in] HICON hicon);

    /*
    HICON   WINAPI CreateIcon([in] HINSTANCE hInst, int, int, BYTE, BYTE, const void FAR*, const void FAR*);
    HICON   WINAPI CopyIcon([in] HINSTANCE hInst, [in] HICON hicon);
    */

    // Image support

    #ifdef WIN32
    [
    usesgetlasterror,
    entry("LoadImageA"),
    helpstring("Loads icon, bitmap, or cursor and returns handle"),
    ]
    HANDLE  WINAPI LoadImage([in] HINSTANCE hinst,
                             [in] LPCSTR lpszName, [in] UINT uType,
                             [in] int cxDesired, [in] int cyDesired,
                             [in] UINT fuLoad);

    [
    usesgetlasterror,
    entry("CopyImage"),
    helpstring("Copies icon, bitmap, or cursor to new image, stretching if necessary"),
    ]
    HICON   WINAPI CopyImage([in] HANDLE hImage, [in] UINT uType,
                             [in] int cxDesired, [in] int cyDesired,
                             [in] UINT fuFlags);

    [
    usesgetlasterror,
    entry("DrawIconEx"),
    helpstring("Draws an icon or cursor with specified raster and stretching as required"),
    ]
    BOOL WINAPI DrawIconEx([in] HDC hdc, [in] int xLeft, [in] int yTop,
                           [in] HICON hIcon,
                           [in] int cxWidth, [in] int cyWidth,
                           [in] UINT istepIfAniCur,
                           [in] HBRUSH hbrFlickerFreeDraw,
                           [in] UINT diFlags);
    #endif // WIN32

    // ****** Message Box support **

    /*
    int     WINAPI MessageBox([in] HWND hwnd, LPCSTR, LPCSTR, UINT);
    void    WINAPI MessageBeep(UINT);
    */

    // ****** Caret support *********

    /*
    void    WINAPI CreateCaret([in] HWND hwnd, [in] HBITMAP hbm, int, int);
    void    WINAPI DestroyCaret(void);

    void    WINAPI SetCaretPos(int, int);
    void    WINAPI GetCaretPos(POINT FAR*);

    void    WINAPI HideCaret([in] HWND hwnd);
    void    WINAPI ShowCaret([in] HWND hwnd);

    UINT    WINAPI GetCaretBlinkTime(void);
    void    WINAPI SetCaretBlinkTime(UINT);
    */

    // ****** MDI Support **********

    /*
    // CreateWindow lpParams structure for creating MDI client
    typedef struct tagCLIENTCREATESTRUCT
    {
        HMENU  hWindowMenu;
        UINT   idFirstChild;
    } CLIENTCREATESTRUCT;
    typedef CLIENTCREATESTRUCT FAR* LPCLIENTCREATESTRUCT;

    // MDI client style bits

    LRESULT WINAPI DefFrameProc([in] HWND hwnd, [in] HWND hwnd, UINT, WPARAM, LPARAM);
    LRESULT WINAPI DefMDIChildProc([in] HWND hwnd, UINT, WPARAM, LPARAM);

    BOOL    WINAPI TranslateMDISysAccel([in] HWND hwnd, MSG FAR*);

    UINT    WINAPI ArrangeIconicWindows([in] HWND hwnd);
    */

    // ****** Dialog and Control Management *****

    /*
    typedef BOOL (CALLBACK* DLGPROC)(HWND, UINT, WPARAM, LPARAM);

    BOOL    WINAPI IsDialogMessage([in] HWND hwnd, MSG FAR*);

    LRESULT WINAPI DefDlgProc([in] HWND hwnd, UINT, WPARAM, LPARAM);

    HWND    WINAPI CreateDialog([in] HINSTANCE hInst, LPCSTR, [in] HWND hwnd, DLGPROC);
    HWND    WINAPI CreateDialogIndirect([in] HINSTANCE hInst, const void FAR*, [in] HWND hwnd, DLGPROC);
    HWND    WINAPI CreateDialogParam([in] HINSTANCE hInst, LPCSTR, [in] HWND hwnd, DLGPROC, LPARAM);
    HWND    WINAPI CreateDialogIndirectParam([in] HINSTANCE hInst, const void FAR*, [in] HWND hwnd, DLGPROC, LPARAM);

    int     WINAPI DialogBox([in] HINSTANCE hInst, LPCSTR, [in] HWND hwnd, DLGPROC);
    int     WINAPI DialogBoxIndirect([in] HINSTANCE hInst, HGLOBAL, [in] HWND hwnd, DLGPROC);
    int     WINAPI DialogBoxParam([in] HINSTANCE hInst, LPCSTR, [in] HWND hwnd, DLGPROC, LPARAM);
    int     WINAPI DialogBoxIndirectParam([in] HINSTANCE hInst, HGLOBAL, [in] HWND hwnd, DLGPROC, LPARAM);

    void    WINAPI EndDialog([in] HWND hwnd, int);

    int     WINAPI GetDlgCtrlID(HWND);
    HWND    WINAPI GetDlgItem(HWND, int);
    LRESULT WINAPI SendDlgItemMessage([in] HWND hwnd, int, UINT, WPARAM, LPARAM);

    void    WINAPI SetDlgItemInt([in] HWND hwnd, int, UINT, BOOL);
    UINT    WINAPI GetDlgItemInt([in] HWND hwnd, int, BOOL FAR* , BOOL);

    void    WINAPI SetDlgItemText([in] HWND hwnd, int, LPCSTR);
    int     WINAPI GetDlgItemText([in] HWND hwnd, int, LPSTR, int);

    void    WINAPI CheckDlgButton([in] HWND hwnd, int, UINT);
    void    WINAPI CheckRadioButton([in] HWND hwnd, int, int, int);
    UINT    WINAPI IsDlgButtonChecked([in] HWND hwnd, int);

    HWND    WINAPI GetNextDlgGroupItem(HWND, HWND, BOOL);
    HWND    WINAPI GetNextDlgTabItem(HWND, HWND, BOOL);

    void    WINAPI MapDialogRect(HWND, RECT FAR*);
    DWORD   WINAPI GetDialogBaseUnits(void);


    */

    // ****** Dialog directory support ******

    /*
    int     WINAPI DlgDirList(HWND, LPSTR, int, int, UINT);
    BOOL    WINAPI DlgDirSelect(HWND, LPSTR, int);

    int     WINAPI DlgDirListComboBox(HWND, LPSTR, int, int, UINT);
    BOOL    WINAPI DlgDirSelectComboBox(HWND, LPSTR, int);

    BOOL    WINAPI DlgDirSelectEx(HWND, LPSTR, int, int);
    BOOL    WINAPI DlgDirSelectComboBoxEx(HWND, LPSTR, int, int);
    */

    // ******* Omit Windows hook support ******

    /*
    DECLARE_HANDLE32(HHOOK);

    typedef LRESULT (CALLBACK* HOOKPROC)(int code, WPARAM wParam, LPARAM lParam);

    HHOOK   WINAPI SetWindowsHook(int, HOOKPROC);
    LRESULT WINAPI DefHookProc(int, WPARAM, LPARAM, HHOOK FAR*);
    BOOL    WINAPI UnhookWindowsHook(int, HOOKPROC);

    HHOOK   WINAPI SetWindowsHookEx(int idHook, HOOKPROC lpfn, [in] HINSTANCE hInst hInstance, HTASK hTask);
    BOOL    WINAPI UnhookWindowsHookEx(HHOOK hHook);
    LRESULT WINAPI CallNextHookEx(HHOOK hHook, int code, WPARAM wParam, LPARAM lParam);
    */

    // ****** Omit Computer-based-training (CBT) support *********

    /*
    // HCBT_CREATEWND parameters pointed to by lParam
    typedef struct tagCBT_CREATEWND
    {
        CREATESTRUCT FAR* lpcs;
        HWND    hwndInsertAfter;
    } CBT_CREATEWND;
    typedef CBT_CREATEWND FAR* LPCBT_CREATEWND;

    // HCBT_ACTIVATE structure pointed to by lParam
    typedef struct tagCBTACTIVATESTRUCT
    {
        BOOL    fMouse;
        HWND    hWndActive;
    } CBTACTIVATESTRUCT;
    */

    // ****** Omit Hardware hook support

    /*
    typedef struct tagHARDWAREHOOKSTRUCT
    {
        HWND    hWnd;
        UINT    wMessage;
        WPARAM  wParam;
        LPARAM  lParam;
    } HARDWAREHOOKSTRUCT;
    */

    // ****** Omit Shell support ********

    // ****** Omit Journalling support **

    /*
    // Journalling message structure
    typedef struct tagEVENTMSG
    {
        UINT    message;
        UINT    paramL;
        UINT    paramH;
        DWORD   time;
    } EVENTMSG;
    typedef EVENTMSG *PEVENTMSG;
    typedef EVENTMSG NEAR* NPEVENTMSG;
    typedef EVENTMSG FAR* LPEVENTMSG;

    BOOL    WINAPI EnableHardwareInput(BOOL);
    */

    // ****** Omit Debugger support *****

    /*
    typedef struct tagDEBUGHOOKINFO
    {
        HMODULE hModuleHook;
        LPARAM  reserved;
        LPARAM  lParam;
        WPARAM  wParam;
        int         code;
    } DEBUGHOOKINFO;
    typedef DEBUGHOOKINFO FAR* LPDEBUGHOOKINFO;

    BOOL WINAPI QuerySendMessage(HANDLE h1, HANDLE h2, HANDLE h3, LPMSG lpmsg);

    BOOL WINAPI LockInput(HANDLE h1, HWND hwndInput, BOOL fLock);

    LONG WINAPI GetSystemDebugState(void);
    */

    // ***** Process support ******
    #ifdef WIN32
    const DWORD IGNORE           = 0;
    const DWORD INFINITE         = 0xFFFFFFFF;

    const DWORD PROCESS_TERMINATE        = 0x0001;
    const DWORD PROCESS_CREATE_THREAD    = 0x0002;
    const DWORD PROCESS_VM_OPERATION     = 0x0008;
    const DWORD PROCESS_VM_READ          = 0x0010;
    const DWORD PROCESS_VM_WRITE         = 0x0020;
    const DWORD PROCESS_DUP_HANDLE       = 0x0040;
    const DWORD PROCESS_CREATE_PROCESS   = 0x0080;
    const DWORD PROCESS_SET_QUOTA        = 0x0100;
    const DWORD PROCESS_SET_INFORMATION  = 0x0200;
    const DWORD PROCESS_QUERY_INFORMATION = 0x0400;
    const DWORD PROCESS_ALL_ACCESS       = 0x001F0FFF;
    #endif

    // ****** Help support *********

    /*
    BOOL WINAPI WinHelp([in] HWND hwnd hwndMain, LPCSTR lpszHelp, UINT usCommand, DWORD ulData);

    typedef struct tagMULTIKEYHELP
    {
        UINT    mkSize;
        BYTE    mkKeylist;
        BYTE    szKeyphrase[1];
    } MULTIKEYHELP;


    typedef struct
    {
        int  wStructSize;
        int  x;
        int  y;
        int  dx;
        int  dy;
        int  wMax;
        char rgchMember[2];
    } HELPWININFO;
    typedef HELPWININFO NEAR* PHELPWININFO;
    typedef HELPWININFO FAR* LPHELPWININFO;
    */

    // ****** Omit Sound support (obsolete) *******

    /*
    int     WINAPI OpenSound(void);
    void    WINAPI CloseSound(void);

    int     WINAPI StartSound(void);
    int     WINAPI StopSound(void);

    int     WINAPI SetVoiceQueueSize(int, int);
    int     WINAPI SetVoiceNote(int, int, int, int);
    int     WINAPI SetVoiceAccent(int, int, int, int, int);
    int     WINAPI SetVoiceEnvelope(int, int, int);
    int     WINAPI SetVoiceSound(int, DWORD, int);

    int     WINAPI SetVoiceThreshold(int, int);
    int FAR* WINAPI GetThresholdEvent(void);
    int     WINAPI GetThresholdStatus(void);

    int     WINAPI SetSoundNoise(int, int);


    int     WINAPI WaitSoundState(int);

    // WaitSoundState() constants
    //define S_QUEUEEMPTY       0
    //define S_THRESHOLD        1
    //define S_ALLTHRESHOLD     2

    int     WINAPI SyncAllVoices(void);
    int     WINAPI CountVoiceNotes(int);

    // Accent Modes
    //define S_NORMAL      0
    //define S_LEGATO      1
    //define S_STACCATO    2

    // SetSoundNoise() Sources
    //define S_PERIOD512   0    // Freq = N/512 high pitch, less coarse hiss
    //define S_PERIOD1024  1    // Freq = N/1024
    //define S_PERIOD2048  2    // Freq = N/2048 low pitch, more coarse hiss
    //define S_PERIODVOICE 3    // Source is frequency from voice channel (3)
    //define S_WHITE512   4     // Freq = N/512 high pitch, less coarse hiss
    //define S_WHITE1024   5    // Freq = N/1024
    //define S_WHITE2048   6    // Freq = N/2048 low pitch, more coarse hiss
    //define S_WHITEVOICE  7    // Source is frequency from voice channel (3)

    // Error return values
    //define S_SERDVNA    (-1)  // Device not available
    //define S_SEROFM     (-2)  // Out of memory
    //define S_SERMACT    (-3)  // Music active
    //define S_SERQFUL    (-4)  // Queue full
    //define S_SERBDNT    (-5)  // Invalid note
    //define S_SERDLN     (-6)  // Invalid note length
    //define S_SERDCC     (-7)  // Invalid note count
    //define S_SERDTP     (-8)  // Invalid tempo
    //define S_SERDVL     (-9)  // Invalid volume
    //define S_SERDMD     (-10) // Invalid mode
    //define S_SERDSH     (-11) // Invalid shape
    //define S_SERDPT     (-12) // Invalid pitch
    //define S_SERDFQ     (-13) // Invalid frequency
    //define S_SERDDR     (-14) // Invalid duration
    //define S_SERDSR     (-15) // Invalid source
    //define S_SERDST     (-16) // Invalid state
    */

    // ****** Comm support *******

    /*
    //define NOPARITY       0
    //define ODDPARITY      1
    //define EVENPARITY     2
    //define MARKPARITY     3
    //define SPACEPARITY        4

    //define ONESTOPBIT     0
    //define ONE5STOPBITS       1
    //define TWOSTOPBITS        2

    // Error Flags
    //define CE_RXOVER          0x0001  // Receive Queue overflow
    //define CE_OVERRUN         0x0002  // Receive Overrun Error
    //define CE_RXPARITY        0x0004  // Receive Parity Error
    //define CE_FRAME           0x0008  // Receive Framing error
    //define CE_BREAK           0x0010  // Break Detected
    //define CE_TXFULL          0x0100  // TX Queue is full
    //define CE_PTO             0x0200  // LPTx Timeout
    //define CE_IOE             0x0400  // LPTx I/O Error
    //define CE_DNS             0x0800  // LPTx Device not selected
    //define CE_OOP             0x1000  // LPTx Out-Of-Paper
    //define CE_MODE            0x8000  // Requested mode unsupported

    //define IE_BADID           (-1)    // Invalid or unsupported id
    //define IE_OPEN            (-2)    // Device Already Open
    //define IE_NOPEN           (-3)    // Device Not Open
    //define IE_MEMORY          (-4)    // Unable to allocate queues
    //define IE_DEFAULT         (-5)    // Error in default parameters
    //define IE_HARDWARE        (-10)   // Hardware Not Present
    //define IE_BYTESIZE        (-11)   // Illegal Byte Size
    //define IE_BAUDRATE        (-12)   // Unsupported BaudRate

⌨️ 快捷键说明

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