⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fntdlg.asm

📁 这是一个数字图像处理的matlab仿真程序
💻 ASM
字号:
; #########################################################################

    .386
    .model flat, stdcall  ; 32 bit memory model
    option casemap :none  ; case sensitive

    include \MASM32\INCLUDE\windows.inc
    include \MASM32\INCLUDE\comdlg32.inc
    include \MASM32\INCLUDE\user32.inc

    .code

; #########################################################################

FontDialog proc hWin:DWORD, lf:DWORD, fStyle:DWORD

  ; ---------------------------------
  ; hWin   = parent handle
  ; lf     = ADDR LOGFONT structure
  ; fstyle = font listing style flags
  ; styles are ORed for required results
  ; Font flags are found in the CHOOSEFONT
  ; reference.
  ;
  ; If eax returns zero, cancel was
  ; pressed. If selection is made,
  ; return in eax is non zero and
  ; LOGFONT structure is filled
  ; with font information.
  ; ---------------------------------

    LOCAL hDC   :DWORD
    LOCAL cf    :CHOOSEFONT

    invoke GetDC,hWin
    push eax
    mov hDC, eax

    mov cf.lStructSize,     sizeof CHOOSEFONT
    push hWin
    pop cf.hWndOwner
    pop eax
    mov cf.hDC,             eax
    push lf
    pop cf.lpLogFont
    mov cf.iPointSize,      0
    push fStyle                 ; font listing style flags
    pop cf.Flags
    mov cf.rgbColors,       0
    mov cf.lCustData,       0
    mov cf.lpfnHook,        0
    mov cf.lpTemplateName,  0
    mov cf.hInstance,       0
    mov cf.lpszStyle,       0
    mov cf.nFontType,       0
    mov cf.Alignment,       0
    mov cf.nSizeMin,        0
    mov cf.nSizeMax,        0

    invoke ChooseFont,ADDR cf
    push eax
    invoke ReleaseDC,hWin,hDC
    pop eax

    ret

FontDialog endp

; #########################################################################

end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -