Download Pelles C here: http://www.smorgasbordet.com/pellesc/
;.model flat,fastcall
INCLUDELIB kernel32.lib
INCLUDELIB user32.lib
WM_DESTROY equ 2
WM_CLOSE equ 10h
WM_INITDIALOG equ 110h
GetModuleHandleW PROTO :QWORD
ExitProcess PROTO :QWORD
DialogBoxIndirectParamW PROTO :QWORD,:QWORD,:QWORD,:QWORD,:QWORD
EndDialog PROTO :QWORD,:QWORD
PostQuitMessage PROTO :QWORD
MessageBoxW PROTO :QWORD,:QWORD,:QWORD,:QWORD
;----------------------
DlgProc PROTO :QWORD,:DWORD,:QWORD,:QWORD
WMInitdialog PROTO :QWORD
WMDestroy PROTO
WMClose PROTO :QWORD
ifdef __POASM__
.drectve segment
db '/subsystem:windows '
.drectve ends
endif
.data
;align 4
DlgBox dw 1 ; dlgVer
dw 0FFFF ; signature
dd 0 ; helpID
dd 0 ; exStyle
dd 10CA0800h ; style
dw 0 ; cDlgItems
dw 0 ; x
dw 0 ; y
dw 200 ; cx
dw 100 ; cy
dw 0 ; empty menu
dw 0 ; empty windowClass
;dw "Test",0 ; title POAsm
dw 'T','e','s','t',0 ; title
;sMsg dw "OK to close",0
sMsg dw 'O','K',' ','t','o',' ','c','l','o','s','e',0
.code
; parameters RCX, RDX, R8 and R9
start PROC PARMAREA=5*sizeof QWORD
INVOKE GetModuleHandleW,0
mov rcx,rax
INVOKE DialogBoxIndirectParamW,rcx,ADDR DlgBox,0,ADDR DlgProc,0
INVOKE ExitProcess, rax
start ENDP
DlgProc PROC hWnd:QWORD,uMsg:DWORD,wParam:QWORD,lParam:QWORD PARMAREA=4*sizeof QWORD
;mov hWnd, rcx ; ?
mov QWORD PTR [rsp+30h],rcx
;mov uMsg, rdx
mov DWORD PTR [rsp+38h],edx
;mov wParam, r8
mov QWORD PTR [rsp+40h],r8
;mov lParam, r9
mov QWORD PTR [rsp+48h],r9
mov eax,uMsg
.if uMsg==WM_INITDIALOG
INVOKE WMInitdialog, hWnd
.elseif uMsg==WM_CLOSE
INVOKE WMClose, hWnd
.elseif uMsg==WM_DESTROY
INVOKE WMDestroy
.else
@@: xor rax,rax
.endif
ret
DlgProc ENDP
WMInitdialog PROC hWnd:QWORD PARMAREA=4*sizeof QWORD
;mov hWnd,rcx
;mov qword ptr [rsp+30h],rcx
mov rax,1
ret
WMInitdialog ENDP
WMDestroy PROC
INVOKE PostQuitMessage,0
mov rax,1
ret
WMDestroy ENDP
WMClose PROC hWnd:QWORD PARMAREA=4*sizeof QWORD
;mov hWnd,rcx
mov QWORD PTR [rsp+30h],rcx
INVOKE MessageBoxW,hWnd,ADDR sMsg, 0, 21h
.if rax == 1
;mov rcx,hWnd
mov rcx,QWORD PTR [rsp+30h]
INVOKE EndDialog,rcx,0
.endif
ret
WMClose ENDP
END start
Quote from: TimoVJL on November 24, 2025, 02:05:33 PMProves, that generic resizer code might be difficult and needs lot of code.
Quote from: John Z on November 23, 2025, 10:21:13 PMShould be able to get it from here:
https://web.archive.org/web/20250801041730/smorgasbordet.com/pellesc/
Click on Download as usual.
John Z
Quote from: Cbeginner on November 23, 2025, 05:49:24 PMHopefully the domain get's renewed soon but could a moderator post V13 to the downloads section?
I was about to install on a new PC but I guess not right now![]()
Page created in 0.041 seconds with 15 queries.