對常用的Windows API 進行封裝。例如 CreateWindow,RegisterClassEx,MessageBox,GetWindowText,以及回調都在 Dangerous Browser 中有具體代碼例子,參照完成下列函數的封裝:
WINDOW 系列函數:
AdjustWindowRect
AdjustWindowRectEx
AllowSetForegroundWindow
AnimateWindow
BeginDeferWindowPos
BringWindowToTop
CascadeWindows
CloseWindow
DeferWindowPos
DestroyWindow
EndDeferWindowPos
FindWindow
FindWindowEx
GetClientRect
GetDesktopWindow
GetForegroundWindow
GetNextWindow
GetParent
GetShellWindow
GetTopWindow
GetWindow
GetWindowModuleFileName
GetWindowPlacement
GetWindowRect
GetWindowTextLength
GetWindowThreadProcessId
InternalGetWindowText
IsChild
IsHungAppWindow
IsWindow
IsWindowUnicode
IsWindowVisible
IsZoomed
LockSetForegroundWindow
MoveWindow
SetForegroundWindow
SetLayeredWindowAttributes
SetParent
SetWindowPlacement
SetWindowPos
SetWindowText
ShowOwnedPopups
ShowWindow
ShowWindowAsync
SwitchToThisWindow
TileWindows
UpdateLayeredWindow
WindowFromPoint
GDI 系列函數
GetDC
ReleaseDC
CreateDC
DeleteDC
CreateFont
CreateFontIndirect
DrawText
GetTextAlign
GetTextColor
SetTextAlign
SetTextColor
TextOut
MoveToEx
LineTo
Chord
Ellipse
FillRect
FrameRect
InvertRect
Polygon
PolyPolygon
Rectangle
RoundRect
RGB
設定常量的值
MN_GETHMENU
WM_GETFONT
WM_GETTEXT
WM_GETTEXTLENGTH
WM_SETFONT
WM_SETICON
WM_SETTEXT
WM_CLOSE
WM_CREATE
WM_DESTROY
WM_MOVE
WM_MOVING
WM_QUIT
WM_SHOWWINDOW
WM_SIZE
WM_SIZING
WM_PAINT
要求,要寫測試程式,每個API至少一個獨立的測試函數進行測試。
聯絡