News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Fun WITH Masm

Started by jj2007, November 16, 2017, 09:12:26 PM

Previous topic - Next topic

jj2007

include \masm32\include\masm32rt.inc    ; **** purest Masm32 ****
.code
WinMain proc
LOCAL msg:MSG
  include With.mac                      ; just for fun...
  With wc:WNDCLASSEX
        _ cbSize = WNDCLASSEX
        _ style = CS_HREDRAW or CS_VREDRAW or CS_OWNDC
        _ lpfnWndProc = WndProc
        _ hInstance = GetModuleHandle(0)
        _ hIcon = LoadIcon(eax, IDI_APPLICATION)
        _ hIconSm = eax                 ; the rv macro returns results in eax
        _ hCursor = LoadCursor(NULL, IDC_ARROW)         ; get a cursor
        _ hbrBackground = COLOR_BTNFACE+1
        _ lpszClassName = chr$("Masm32GUI")
  EndWith
  invoke RegisterClassEx, addr wc      ; the window class needs to be registered
...

hutch--


Vortex

Hi Jochen,

Nice work :t  The application works fine on XP 64-bit.

jj2007

 :biggrin:

Just a demo to show what a MACRO assembler can do... I am not a fan of Visual Basic, but I always found the With command interesting.

Siekmanski

Creative coders use backward thinking techniques as a strategy.

felipe