Skip to content

Instantly share code, notes, and snippets.

@tuttlem
Created November 26, 2012 12:15
Show Gist options
  • Save tuttlem/4147911 to your computer and use it in GitHub Desktop.
Save tuttlem/4147911 to your computer and use it in GitHub Desktop.
Simple Window - Register Window Class
LOCAL wc :WNDCLASSEX
szText szClassName, "SimpleWindow32"
; fill out the WNDCLASSEX structure here
mov wc.cbSize, sizeof WNDCLASSEX
mov wc.style, CS_HREDRAW or CS_VREDRAW or CS_BYTEALIGNWINDOW
mov wc.lpfnWndProc, offset WndProc
mov wc.cbClsExtra, NULL
mov wc.cbWndExtra, NULL
m2m wc.hInstance, hInst
mov wc.hbrBackground, COLOR_BTNFACE+1
mov wc.lpszMenuName, NULL
mov wc.lpszClassName, offset szClassName
invoke LoadIcon, NULL, IDI_APPLICATION
mov wc.hIcon, eax
invoke LoadCursor, NULL, IDC_ARROW
mov wc.hCursor, eax
mov wc.hIconSm, 0
; register the window class for the application
invoke RegisterClassEx, ADDR wc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment