func main() { w32.CoInitialize() defer w32.CoUninitialize() app := new(DemoApp) defer app.Dispose() app.Initialize() app.RunMessageLoop() }
func ShowBrowseFolderDlg(parent Controller, title string) (folder string, accepted bool) { var bi w32.BROWSEINFO bi.Owner = parent.Handle() bi.Title = syscall.StringToUTF16Ptr(title) bi.Flags = w32.BIF_RETURNONLYFSDIRS | w32.BIF_NEWDIALOGSTYLE w32.CoInitialize() ret := w32.SHBrowseForFolder(&bi) w32.CoUninitialize() folder = w32.SHGetPathFromIDList(ret) accepted = folder != "" return }