亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? lion-tutorial04.htm

?? 內(nèi)有一些代碼
?? HTM
?? 第 1 頁 / 共 2 頁
字號:
<html>

<head>
<link rel="stylesheet" href="../../asm.css">

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Iczelion's win32 asm tutorial</title>
</head>

<body bgcolor="#FFFFFF" background="../../images/back01.jpg">
<p align="center">Tutorial 4: Painting with Text</p>
<hr size="1">
In this tutorial, we will learn how to "paint" text in the client area of a window. 
We'll also learn about device context. <br>
You can download the source code <a href="files/tut04.zip">here</a>. 
<h3> Theory:</h3>
Text in Windows is a type of GUI object.&nbsp; Each character is composed of numerous 
pixels (dots) that are lumped together into a distinct pattern. That's why it's 
called "painting" instead of "writing". Normally, you paint text in your own client 
area (actually, you can paint outside client area but that's another story).&nbsp; 
Putting text on screen in Windows is drastically different from DOS. In DOS, you 
can think of the screen in 80x25 dimension. But in Windows, the screen are shared 
by several programs. Some rules must be enforced to avoid programs writing over 
each other's screen. Windows ensures this by limiting painting area of each window 
to its own client area only. The size of client area of a window is also not constant. 
The user can change the size anytime. So you must determine the dimensions of 
your own client area dynamically. <br>
Before you can paint something on the client area, you must ask for permission 
from Windows. That's right, you don't have absolute control of the screen as you 
were in DOS anymore.&nbsp; You must ask Windows for permission to paint your own 
client area. Windows will determine the size of your client area, font, colors 
and other GDI attributes and sends a handle to device context back to your program. 
You can then use the device context as a passport to painting on your client area. 
<br>
What is a device context? It's just a data structure maintained internally by 
Windows. A device context is associated with a particular device, such as a printer 
or video display. For a video display, a device context is usually associated 
with a particular window on the display. <br>
Some of the values in the device context are graphic attributes such as colors, 
font etc. These are default values which you can change at will. They exist to 
help reduce the load from having to specify these attributes in every GDI function 
calls. <br>
You can think of a device context as a default environment prepared for you by 
Windows. You can override some default settings later if you so wish. <br>
When a program need to paint, it must obtain a handle to a device context. Normally, 
there are several ways to accomplish this. 
<ul>
  <b>call BeginPaint in response to WM_PAINT message.</b> <br>
  <b>call GetDC in response to other messages.</b> <br>
  <b>call CreateDC to create your own device context</b> 
</ul>
One thing you must remember, after you're through with the device context handle, 
you must release it during the processing of a single message. Don't obtain the 
handle in response to one message and release it in response to another. <br>
Windows posts WM_PAINT messages to a window to notify that it's now time to repaint 
its client area. Windows does not save the content of client area of a window.&nbsp; 
Instead, when a situation occurs that warrants a repaint of client area (such 
as when a window was covered by another and is just uncovered), Windows puts WM_PAINT 
message in that window's message queue. It's the responsibility of that window 
to repaint its own client area. You must gather all information about how to repaint 
your client area in the WM_PAINT section of your window procedure, so the window 
procudure can repaint the client area when WM_PAINT message arrives. <br>
Another concept you must come to terms with is the invalid rectangle. Windows 
defines an invalid rectangle as the smallest rectangular area in the client area 
that needs to be repainted. When Windows detects an invalid rectangle in the client 
area of a window , it posts WM_PAINT message to that window. In response to WM_PAINT 
message, the window can obtain a paintstruct structure which contains, among others, 
the coordinate of the invalid rectangle. You call BeginPaint in response to WM_PAINT 
message to validate the invalid rectangle. If you don't process WM_PAINT message, 
at the very least you must call DefWindowProc or ValidateRect to validate the 
invalid rectangle else Windows will repeatedly send you WM_PAINT message. <br>
Below are the steps you should perform in response to a WM_PAINT message: 
<ul>
  <b>Get a handle to device context with BeginPaint.</b> <br>
  <b>Paint the client area.</b> <br>
  <b>Release the handle to device context with EndPaint</b> 
</ul>
Note that you don't have to explicitly validate the invalid rectangle. It's automatically 
done by the BeginPaint call. Between BeginPaint-Endpaint pair, you can call any 
GDI functions to paint your client area. Nearly all of them require the handle 
to device context as a parameter. 
<h3> Content:</h3>
We will write a program that displays a text string "Win32 assembly is great and 
easy!" in the center of the client area. <br>
&nbsp; 
<blockquote><b>.386</b> <br>
  <b>.model flat,stdcall</b> <br>
  <b>option casemap:none</b> 
  <p><b>WinMain proto :DWORD,:DWORD,:DWORD,:DWORD</b> 
  <p><b>include \masm32\include\windows.inc</b> <br>
    <b>include \masm32\include\user32.inc</b> <br>
    <b>includelib \masm32\lib\user32.lib</b> <br>
    <b>include \masm32\include\kernel32.inc</b> <br>
    <b>includelib \masm32\lib\kernel32.lib</b> 
  <p><b>.DATA</b> <br>
    <b>ClassName db "SimpleWinClass",0</b> <br>
    <b>AppName&nbsp; db "Our First Window",0</b> <br>
    <b>OurText&nbsp; db "Win32 assembly is great and easy!",0</b> 
  <p><b>.DATA?</b> <br>
    <b>hInstance HINSTANCE ?</b> <br>
    <b>CommandLine LPSTR ?</b> 
  <p><b>.CODE</b> <br>
    <b>start:</b> <br>
    <b>&nbsp;&nbsp;&nbsp; invoke GetModuleHandle, NULL</b> <br>
    <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp;&nbsp; hInstance,eax</b> <br>
    <b>&nbsp;&nbsp;&nbsp; invoke GetCommandLine<br>
    &nbsp;&nbsp;&nbsp;&nbsp;mov CommandLine,eax</b><br>
    <b>&nbsp;&nbsp;&nbsp; invoke WinMain, hInstance,NULL,CommandLine, SW_SHOWDEFAULT</b> 
    <br>
    <b>&nbsp;&nbsp;&nbsp; invoke ExitProcess,eax</b> 
  <p><b>WinMain proc hInst:HINSTANCE, hPrevInst:HINSTANCE, CmdLine:LPSTR, CmdShow:DWORD</b> 
    <br>
    <b>&nbsp;&nbsp;&nbsp; LOCAL wc:WNDCLASSEX</b> <br>
    <b>&nbsp;&nbsp;&nbsp; LOCAL msg:MSG</b> <br>
    <b>&nbsp;&nbsp;&nbsp; LOCAL hwnd:HWND</b> <br>
    <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.cbSize,SIZEOF WNDCLASSEX</b> <br>
    <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.style, CS_HREDRAW or CS_VREDRAW</b> 
    <br>
    <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.lpfnWndProc, OFFSET WndProc</b> <br>
    <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.cbClsExtra,NULL</b> <br>
    <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.cbWndExtra,NULL</b> <br>
    <b>&nbsp;&nbsp;&nbsp; push&nbsp; hInst</b> <br>
    <b>&nbsp;&nbsp;&nbsp; pop&nbsp;&nbsp; wc.hInstance</b> <br>
    <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.hbrBackground,COLOR_WINDOW+1</b> 
    <br>
    <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.lpszMenuName,NULL</b> <br>
    <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.lpszClassName,OFFSET ClassName</b> 
    <br>
    <b>&nbsp;&nbsp;&nbsp; invoke LoadIcon,NULL,IDI_APPLICATION</b> <br>
    <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.hIcon,eax</b> <br>
    <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.hIconSm,eax</b> <br>
    <b>&nbsp;&nbsp;&nbsp; invoke LoadCursor,NULL,IDC_ARROW</b> <br>
    <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.hCursor,eax</b> <br>
    <b>&nbsp;&nbsp;&nbsp; invoke RegisterClassEx, addr wc</b> <br>
    <b>&nbsp;&nbsp;&nbsp; invoke CreateWindowEx,NULL,ADDR ClassName,ADDR AppName,\</b> 
    <br>
    <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,\</b> 
    <br>
    <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,NULL,NULL,\</b> 
    <br>
    <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hInst,NULL</b> 

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美腿丝袜在线亚洲一区| 国产一区二区剧情av在线| 蜜臀精品久久久久久蜜臀| 91在线观看视频| 国产精品国产三级国产专播品爱网| 日韩中文字幕1| 欧美精品一级二级三级| 一区二区三区在线视频播放 | 一区二区三区在线看| 在线观看免费视频综合| 日韩中文字幕亚洲一区二区va在线 | 亚洲线精品一区二区三区八戒| 欧美色图第一页| 免费亚洲电影在线| 国产欧美精品一区| 在线观看不卡一区| 久久国产精品色| 国产精品美女视频| 91精品国产乱| 成人高清视频免费观看| 亚洲午夜久久久久| 国产精品欧美久久久久一区二区 | 欧美性猛交xxxxxxxx| 久久国产人妖系列| 一区二区三区精品| 久久欧美一区二区| 欧美日韩午夜在线视频| 国产成人亚洲综合a∨猫咪| 婷婷国产在线综合| 国产精品初高中害羞小美女文| 欧美精品日韩精品| 91丨porny丨户外露出| 久久精品国产在热久久| 亚洲成人精品影院| 亚洲女女做受ⅹxx高潮| 国产三区在线成人av| 日韩欧美一级二级三级久久久| 波多野结衣视频一区| 国产尤物一区二区| 美美哒免费高清在线观看视频一区二区| 亚洲国产精品精华液ab| 欧美xxxx老人做受| 日韩欧美高清在线| 91精品国产综合久久久久久久久久 | 日韩欧美第一区| 欧美一级生活片| 欧美福利视频导航| 欧美亚洲国产bt| 欧美综合天天夜夜久久| 色噜噜狠狠成人中文综合| 色天天综合色天天久久| 91极品视觉盛宴| 欧美日韩精品一区二区在线播放 | 国产在线视频一区二区三区| 国产成人在线视频播放| 一本色道久久综合亚洲aⅴ蜜桃 | 欧美另类久久久品| 色狠狠桃花综合| 91久久精品一区二区三区| 豆国产96在线|亚洲| 国产成人亚洲综合a∨婷婷图片| 国产iv一区二区三区| 91在线播放网址| 欧美性猛交xxxxxx富婆| 欧洲av一区二区嗯嗯嗯啊| 日韩三级视频在线观看| 国产精品天美传媒沈樵| 一区二区三区中文字幕在线观看| 美腿丝袜亚洲色图| www..com久久爱| 日韩欧美视频在线| 亚洲欧美日韩综合aⅴ视频| 日韩国产欧美在线播放| 国产成人精品影视| 91精品国产综合久久精品性色 | 韩国一区二区在线观看| jlzzjlzz国产精品久久| 欧美区一区二区三区| 精品国产123| 亚洲伊人色欲综合网| 国产精品自在欧美一区| 欧美性色黄大片手机版| 久久久亚洲精华液精华液精华液| 一区二区三区四区国产精品| 国产99精品在线观看| 日韩一卡二卡三卡四卡| 日韩黄色片在线观看| 欧美日韩aaaaa| 亚洲精品少妇30p| 色香蕉成人二区免费| 国产免费观看久久| 狠狠色综合色综合网络| 在线观看日韩一区| 国产一区二区电影| 欧美一级理论性理论a| 中文字幕在线一区| 美女国产一区二区三区| 欧美岛国在线观看| 国产乱淫av一区二区三区| 日韩一区二区三区视频在线观看| 午夜欧美一区二区三区在线播放| 97精品久久久午夜一区二区三区| 国产人成亚洲第一网站在线播放 | 亚洲欧美一区二区不卡| 91麻豆.com| 日韩电影在线一区二区| 欧美一卡二卡三卡四卡| 国产一区啦啦啦在线观看| 国产无人区一区二区三区| 成人美女视频在线看| 中文字幕在线不卡| 欧美日韩一区不卡| 亚洲综合成人在线视频| 精品少妇一区二区三区在线视频| 国产成人一区在线| 亚洲成av人综合在线观看| 欧美一区二视频| 国产精品18久久久久| 亚洲久草在线视频| 久久久久国产一区二区三区四区| 国产精品综合在线视频| 国产精品入口麻豆九色| 欧美一区午夜视频在线观看| 精品亚洲成a人在线观看| 日本一区二区三区在线观看| 欧美日韩国产综合久久 | 成人免费看的视频| 亚洲成人激情av| 亚洲免费高清视频在线| 精品国产污污免费网站入口 | 中文字幕不卡三区| 欧美一级片在线观看| 在线观看精品一区| 99综合影院在线| 精品一区二区三区蜜桃| 亚洲6080在线| 调教+趴+乳夹+国产+精品| 一区在线观看免费| 中文字幕精品在线不卡| 久久在线免费观看| 久久久不卡影院| wwwwxxxxx欧美| 久久精品网站免费观看| 久久综合久久99| 久久蜜桃av一区精品变态类天堂| 日韩欧美国产成人一区二区| 日韩精品一区二| 日韩一区二区三区四区五区六区| 日韩一二在线观看| 日韩欧美国产精品一区| 日韩精品一区二区三区视频在线观看| 欧美一卡在线观看| 欧美大肚乱孕交hd孕妇| 日韩欧美美女一区二区三区| 欧美v日韩v国产v| 国产日韩v精品一区二区| 国产精品热久久久久夜色精品三区 | 日韩经典一区二区| 国产自产视频一区二区三区| 不卡在线观看av| 欧美日韩中字一区| 日韩美女视频在线| 亚洲精品自拍动漫在线| 日本欧美在线观看| 丁香激情综合国产| 欧美日韩国产片| 国产欧美精品一区aⅴ影院| 精品88久久久久88久久久| 国产午夜精品久久| 亚洲在线视频免费观看| 久久福利资源站| 91麻豆6部合集magnet| 欧美日产在线观看| 亚洲欧美日韩中文播放| 国产精品99久久久久久久vr| 在线观看日韩毛片| 欧美经典一区二区| 免费成人深夜小野草| 91丝袜美女网| 国产精品剧情在线亚洲| 蜜臀精品久久久久久蜜臀| 91国产丝袜在线播放| 国产精品天美传媒| 成人免费电影视频| 国产午夜精品一区二区| 精品无人区卡一卡二卡三乱码免费卡| 99re视频精品| 亚洲人成精品久久久久久| 盗摄精品av一区二区三区| 久久九九影视网| av色综合久久天堂av综合| 亚洲国产精品成人综合色在线婷婷 | 欧美性一级生活| 亚洲电影激情视频网站| 在线视频你懂得一区| 亚洲福利一区二区| 欧美日韩高清一区二区三区| 亚洲国产wwwccc36天堂| 911精品国产一区二区在线| 天天免费综合色|