当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: 6.0 - The tiles window图块窗口 We
 

 

 ·(译)win32asm实例-4    »显示摘要«
    摘要: 4.0 - creating the main frame创建主框架 now we will create the main frame of our program: 现在我们将创建我们程序的主框架: add two prototypes after the includes: 在include后加入两个原型 winmain proto stdcall :dword, :dw......
 ·(译)win32asm实例-2    »显示摘要«
    摘要: 2.0 - design of the game游戏的设计 before we get started with programming, we will design the game first. 在我们开始编程前,我们先来设计游戏。 2.1 - basic idea基本的想法 the idea is to create a simple shuffle-puzzle. ......


(译)win32asm实例-6
  6.0 - the tiles window图块窗口

我们将创建一个静态控件.在它上面我们将要画图块. 【程序编程相关: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, eax

ret

initcontrols 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:


...   下一页
 ·(译)win32asm实例-0    »显示摘要«
    摘要: 这个教程写得非常好,希望你能喜欢。 -译者 mosaic tutorial拼图游戏教程 introduction介绍 in this lesson you will create a simple mosaic game. you probably know this kind of puzzles. an image or a matrix of numbers have to b......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE