📄 win.asm
字号:
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; Programmed by 罗云彬, bigluo@telekbird.com.cn
; Website: http://asm.yeah.net
; LuoYunBin's Win32 ASM page (罗云彬的编程乐园)
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; 公用子程序部分:窗口部分
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
_CenterWindow proto :DWORD ;将窗口移动到屏幕中间
;********************************************************************
; 将窗口移动到屏幕中间
; 参数:窗口句柄
;********************************************************************
_CenterWindow proc hWnd:DWORD
local @stRectDeskTop:RECT,@stRectWin:RECT
local @dwWidth:DWORD,@dwHeight:DWORD
invoke GetWindowRect,hWnd,addr @stRectWin
invoke GetDesktopWindow
mov ebx,eax
invoke GetWindowRect,ebx,addr @stRectDeskTop
mov eax,@stRectWin.bottom
sub eax,@stRectWin.top
mov @dwHeight,eax
mov eax,@stRectWin.right
sub eax,@stRectWin.left
mov @dwWidth,eax
mov ebx,@stRectDeskTop.bottom
sub ebx,@dwHeight
shr ebx,1
mov ecx,@stRectDeskTop.right
sub ecx,@dwWidth
shr ecx,1
invoke MoveWindow,hWnd,ecx,ebx,@dwWidth,@dwHeight,FALSE
ret
_CenterWindow endp
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -