我们将创建一个静态控件.在它上面我们将要画图块. 【程序编程相关:widget size的问题】
we will now create a static control which we will draw the tiles on. 【推荐阅读:mono上的Hello World】
we make a new procedure called initcontrols that will initialize all the controls on the main window. 【扩展信息:Lisp 的计算整数指数的程序】
6.1 - creating the control创建控件我们创建一个将初始化所有主窗口上的控件的名为“initcontrols”的过程.
.data classstatic db "static",0.data? hstatic dd ?.code;================================================================================; init controls;================================================================================initcontrols proc hwnd:dword; create static window for mosaic: invoke createwindowex, ws_ex_clientedge, addr classstatic, null,\ ws_visible + ws_child + ss_ownerdraw ,\ 15, 55, 220, 220,\ hwnd, cid_static, hinstance, null mov hstatic, eaxretinitcontrols endp at the start of the file, where the prototypes are, add a prototype for this procedure: 在文件的开头,那儿是函数原型.加入这个过程的原型: initcontrols proto stdcall :dword and in the mosaic.inc file: 把这个加入mosaic.inc文件: cid_static equ 601 the initcontrols procedure takes one parameter, hwnd which is the window handle of the main window. the createwindowex function creates a static control with the following styles: ... 下一页