MCPcopy
hub / github.com/lxn/walk / newDialogWithStyle

Function newDialogWithStyle

dialog.go:60–90  ·  view source on GitHub ↗
(owner Form, style uint32)

Source from the content-addressed store, hash-verified

58}
59
60func newDialogWithStyle(owner Form, style uint32) (*Dialog, error) {
61 dlg := &Dialog{
62 FormBase: FormBase{
63 owner: owner,
64 },
65 }
66
67 if err := InitWindow(
68 dlg,
69 owner,
70 dialogWindowClass,
71 win.WS_CAPTION|win.WS_SYSMENU|style,
72 0); err != nil {
73 return nil, err
74 }
75
76 succeeded := false
77 defer func() {
78 if !succeeded {
79 dlg.Dispose()
80 }
81 }()
82
83 dlg.centerInOwnerWhenRun = owner != nil
84
85 dlg.result = DlgCmdNone
86
87 succeeded = true
88
89 return dlg, nil
90}
91
92func (dlg *Dialog) DefaultButton() *PushButton {
93 return dlg.defaultButton

Callers 2

NewDialogFunction · 0.85
NewDialogWithFixedSizeFunction · 0.85

Calls 2

InitWindowFunction · 0.85
DisposeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…