1 Star 0 Fork 0

youxiuliang / walk

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
composite.go 894 Bytes
一键复制 编辑 原始数据 按行查看 历史
// Copyright 2010 The Walk Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build windows
package walk
import (
"github.com/lxn/win"
)
const compositeWindowClass = `\o/ Walk_Composite_Class \o/`
func init() {
AppendToWalkInit(func() {
MustRegisterWindowClass(compositeWindowClass)
})
}
type Composite struct {
ContainerBase
}
func NewCompositeWithStyle(parent Window, style uint32) (*Composite, error) {
c := new(Composite)
c.children = newWidgetList(c)
c.SetPersistent(true)
if err := InitWidget(
c,
parent,
compositeWindowClass,
win.WS_CHILD|win.WS_VISIBLE|style,
win.WS_EX_CONTROLPARENT); err != nil {
return nil, err
}
c.SetBackground(NullBrush())
return c, nil
}
func NewComposite(parent Container) (*Composite, error) {
return NewCompositeWithStyle(parent, 0)
}
1
https://gitee.com/showyo/walk.git
git@gitee.com:showyo/walk.git
showyo
walk
walk
2a61ddb5a2b8

搜索帮助