-
Notifications
You must be signed in to change notification settings - Fork 2
/
multiple_document_interface.go
37 lines (32 loc) · 1.39 KB
/
multiple_document_interface.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package winapi
import (
"unsafe"
)
// https://msdn.microsoft.com/en-us/library/ms644923.aspx
func CreateMDIWindow(lpClassName string, lpWindowName string, dwStyle uintptr, X int32, Y int32, nWidth uintptr, nHeight uintptr, hWndParent uintptr, hInstance uintptr, lParam uintptr) (uintptr, error) {
_lpClassName, err := stringToUintptr(lpClassName)
if err != nil {
return 0, err
}
_lpWindowName, err := stringToUintptr(lpWindowName)
if err != nil {
return 0, err
}
r1, _, err := procCreateMDIWindow.Call(_lpClassName, _lpWindowName, dwStyle, int32ToUintptr(X), int32ToUintptr(Y), nWidth, nHeight, hWndParent, hInstance, lParam)
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644924.aspx
func DefFrameProc(hWnd uintptr, hWndMDIClient uintptr, uMsg uintptr, wParam uintptr, lParam uintptr) (uintptr, error) {
r1, _, err := procDefFrameProc.Call(hWnd, hWndMDIClient, uMsg, wParam, lParam)
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644925.aspx
func DefMDIChildProc(hWnd uintptr, uMsg uintptr, wParam uintptr, lParam uintptr) (uintptr, error) {
r1, _, err := procDefMDIChildProc.Call(hWnd, uMsg, wParam, lParam)
return r1, err
}
// https://msdn.microsoft.com/en-us/library/ms644926.aspx
func TranslateMDISysAccel(hWndClient uintptr, lpMsg *MSG) (uintptr, error) {
r1, _, err := procTranslateMDISysAccel.Call(hWndClient, uintptr(unsafe.Pointer(lpMsg)))
return r1, err
}