func uiinit() error { var errmsg *C.char errcode := C.initWindows(&errmsg) if errcode != 0 || errmsg != nil { return fmt.Errorf("error initializing package ui on Windows: %s: %v", C.GoString(errmsg), syscall.Errno(errcode)) } errmsg = nil errcode = C.initCommonControls(&errmsg) if errcode != 0 || errmsg != nil { return fmt.Errorf("error initializing comctl32.dll: %s: %v", C.GoString(errmsg), syscall.Errno(errcode)) } if err := makemsgwin(); err != nil { return fmt.Errorf("error creating message-only window: %v", err) } if err := makeWindowWindowClass(); err != nil { return fmt.Errorf("error creating Window window class: %v", err) } if err := makeContainerWindowClass(); err != nil { return fmt.Errorf("error creating container window class: %v", err) } if err := makeAreaWindowClass(); err != nil { return fmt.Errorf("error creating Area window class: %v", err) } return nil }
func uiinit() error { var errmsg *C.char errcode := C.initWindows(&errmsg) if errcode != 0 || errmsg != nil { return fmt.Errorf("error initializing package ui on Windows: %s: %v", C.GoString(errmsg), syscall.Errno(errcode)) } errmsg = nil errcode = C.initCommonControls(&errmsg) if errcode != 0 || errmsg != nil { return fmt.Errorf("error initializing comctl32.dll: %s: %v", C.GoString(errmsg), syscall.Errno(errcode)) } if err := makemsgwin(); err != nil { return fmt.Errorf("error creating message-only window: %v", err) } if err := makeWindowWindowClass(); err != nil { return fmt.Errorf("error creating Window window class: %v", err) } if err := makeAreaWindowClass(); err != nil { return fmt.Errorf("error creating Area window class: %v", err) } // this depends on the common controls having been initialized already C.doInitTable() return nil }