预览加载中,请您耐心等待几秒...
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

在线预览结束,喜欢就下载吧,查找使用更方便

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

一、相关结构体与变量窗口管理结构体/*窗口管理结构体共30个字节*/structWM_Obj{GUI_RECTRect;//窗口尺寸(x0,y0,x1,y1)8个字节GUI_RECTInvalidRect;//无效区域(x0,y0,x1,y1)8个字节WM_CALLBACK*cb;//回调函数4个字节WM_HWINhNextLin;//指向链表中得下一个窗口2个字节WM_HWINhParent;//当前窗口得父窗口2个字节WM_HWINhFirstChild;//当前窗口得第一个子窗口2个字节WM_HWINhNext;//下一个兄弟窗口2个字节U16Status;//标志位2个字节};窗口创建得标志#defineWM_CF_HASTRANS(1<<0)/*Hastransparency、Needstobedefinedforwindowswhichdonotfilltheentiresectionoftheir(client)rectangle、*/#defineWM_CF_HIDE(0<<1)/*Hidewindowaftercreation(default!)*/#defineWM_CF_SHOW(1<<1)/*Showwindowaftercreation*/#defineWM_CF_MEMDEV(1<<2)/*Usememorydeviceforredraws*/#defineWM_CF_STAYONTOP(1<<3)/*Stayontop*/#defineWM_CF_DISABLED(1<<4)/*Disabled:DoesnotreceivePID(mouse&touch)input*//*Createonlyflags、、、Notavailableasstatusflags*/#defineWM_CF_ACTIVATE(1<<5)/*Ifautomaticactivationuponcreationofwindowisdesired*/#defineWM_CF_FGND(0<<6)/*Putwindowinforegroundaftercreation(default!)*/#defineWM_CF_BGND(1<<6)/*Putwindowinbackgroundaftercreation*//*Anchorflags*/#defineWM_CF_ANCHOR_RIGHT(1<<7)/*Rightanchor、、、Ifparentisresized,distancetorightwillremainconst(leftisdefault)*/#defineWM_CF_ANCHOR_BOTTOM(1<<8)/*Bottomanchor、、、Ifparentisresized,distancetobottomwillremainconst(topisdefault)*/#defineWM_CF_ANCHOR_LEFT(1<<9)/*Leftanchor、、、Ifparentisresized,distancetoleftwillremainconst(leftisdefault)*/#defineWM_CF_ANCHOR_TOP(1<<10)/*Topanchor、、、Ifparentisresized,distancetotopwillremainconst(topisdefault)*/#defineWM_CF_CONST_OUTLINE(1<<11)/*Constantoutline、Thisisrelevantfortransparentwindowsonly、Ifawindowistransparentanddoesnothaveaconstantoutline,itsbackgroundisinvalidedinsteadofthewindowitself、Thiscausesadd、computationtimewhenredrawing、*/#defineWM_CF_LATE_CLIP(1<<12)#defineWM_CF_MEMDEV_ON_REDRAW(1<<13)#defineWM_CF_RESERVED3(1<<14)#defineWM_CF_RESERVED4(1<<15)WM_CF_SHOW、WM_CF_STAYONTOP、WM_CF_HIDE、WM_CF_ACTIVATE这几个标志就是经常用到得。二、窗口创建得过程分析1、WM_CreateWindowAsChildWM_HWINWM_CreateWindowAsChild(intx0,inty0,intwidth,intheight,WM_HWINhParent,U16Style,WM_CALLBACK*cb,intNumExtraB