Windows API
跳至導覽
跳至搜尋
Windows API
- 參照:『維基百科~Windows_API』
- 參照:『維基教科書~Windows_Programming』
版本
- Win16
- Win32
- Win32s
- Win64
- WinCE
技術文件
- previous-versions
- Windows API
- Win32SDK(HLP檔)
相關下載
應用
控制項
設定輸入焦點
- HWND SetCapture(HWND hWnd);(設定滑鼠的輸入焦點)
- HWND SetFocus(HWND hWnd);(設定鍵盤的輸入焦點)
字型與文字
初始化字型
- HFONT CreateFont(int nHeight, int nWidth, int nEscapement, int nOrientation, int fnWeight, DWORD fdwItalic, DWORD fdwUnderline, DWORD fdwStrikeOut, DWORD fdwCharSet, DWORD fdwOutputPrecision, DWORD fdwClipPrecision, DWORD fdwQuality, DWORD fdwPitchAndFamily, LPCTSTR lpszFace);
- HFONT CreateFontIndirect(CONST LOGFONT* lplf);
畫文字
- int DrawText(HDC hDC, LPCTSTR lpString, int nCount, LPRECT lpRect, UINT uFormat);
- int DrawTextEx(HDC hdc, LPTSTR lpchText, int cchText, LPRECT lprc, UINT dwDTFormat, LPDRAWTEXTPARAMS lpDTParams);
- BOOL TextOut(HDC hdc, int nXStart, int nYStart, LPCTSTR lpString, int cbString);
- 抽取字型資料(自己另外寫程式去畫出文字)
鍵盤或滑鼠
模擬鍵盤或滑鼠的輸入
資源
- int LoadStringA(HINSTANCE hInstance, UINT uID, LPSTR lpBuffer, int cchBufferMax);
- HANDLE LoadImageA(HINSTANCE hInst, LPCSTR name, UINT type, int cx, int cy, UINT fuLoad);
- HMENU LoadMenuA(HINSTANCE hInstance, LPCSTR lpMenuName);
- HCURSOR LoadCursorA(HINSTANCE hInstance, LPCSTR lpCursorName);
- HACCEL LoadAcceleratorsA(HINSTANCE hInstance, LPCSTR lpTableName);
發展
Windows API → Windows Runtime(WinRT) → 通用Windows平台(UWP)