简单的桌面创建
创建app.cb
import lib/windows/CustomWindow
//窗口基类
class App extends CustomWindow
{
//结构函数
function App(config)
{
//创建窗口
var title= config.get("title");
var width = config.get("width");
var height = config.get("height");
var left = config.get("left"); //窗口距离左边距离
var top = config.get("top"); //窗口右边距离
super(title);
//创建窗口函数
createWindow(title,(WS_OVERLAPPEDWINDOW ^ WS_THICKFRAME & ~WS_MAXIMIZEBOX) | WS_CLIPSIBLINGS | WS_POPUP,left,top,width,height,null);
}
//运行窗口
function run()
{
super.run(); //调用基类窗口运行
}
}
function main(parm)
{
var config = {"title":"演示窗口","width":500,"height":300,"left":248,"top":"100","WindowState":"fullscreen","BackgroundColor":"#000"};
var app = new App(config);
app.createButtom("提交",5,185,60,60,7);
app.createStaticText("hello world",10,10,150,20);
app.createEditBox(150,10,100,20);
app.run();
}