News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Recent posts

#31
Assembly discussions / Re: Rich Edit sample
Last post by Vortex - November 28, 2025, 01:23:04 PM
Hi Timo,

Thanks for your version.
#32
Assembly discussions / Re: Rich Edit sample
Last post by TimoVJL - November 28, 2025, 05:18:37 AM
A dialog without any resource section in one source.
Just a one test material for poasm
;.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
#33
Assembly discussions / Re: Rich Edit sample
Last post by Vortex - November 25, 2025, 09:09:05 PM
Binary resource template version, 64-bit.
#34
Work in progress / Re: New resizer discussion
Last post by John Z - November 25, 2025, 05:38:14 PM
Quote from: TimoVJL on November 24, 2025, 02:05:33 PMProves, that generic resizer code might be difficult and needs lot of code.


Indeed it does.  Still working to improve it. Standard controls seem to be handled fairly well now, but still need more testing. Library is about 11k for now.

A simple "custom" control on the window works - just need to create it BEFORE calling Init_resize - that was my mistake it was after and I finally realized it. 

Tested Owner-Draw of a simple text box it worked also!

The attachment is just a demo of the resizer in action.  New code for the library will be posted soon.  Open issues (but not blocks to using) are window glitching a bit if specified "LIMIT_SHRINK = TRUE" but trying to drag smaller for Main Dialog - just does not look nice.  Second, still working on a maintain w/h ratio option, a nice to have IMO.  Otherwise, to me, it is looking close to being completed. 

John Z

Tester and library source code now posted under User Contributions -
https://forum.pellesc.de/index.php?topic=11682.0
#35
User contributions / Github-kuba miniz for Pelles C
Last post by John Z - November 25, 2025, 12:01:37 PM
11/25/2025

This is GitHub-kuba miniz 3.0.2 with minor modifications for Pelles C

Minor changes to compile in Pelles C Version 13 (and probably earlier versions)
All changes annotated with //ZZ

Build Notes:
If file time&date/functions are NOT needed define MINIZ_NO_TIME
If time&date is wanted then the /Go (Define compatibility names) option in Pelles
must be used.

Many build warnings - no errors of course.  Tested zip a file, unzip a file, also
a miniz zipped file was able to be unzipped with Windows itself as well as 7z.
Tested unzip to memory as well.

Did not try using any Pelles C optimizations.  Suggest using
#pragma optimize( none ) in the three source files if using optimizations elsewhere


Also example usages are included from kuba.

John Z
#36
Work in progress / Re: New resizer discussion
Last post by TimoVJL - November 24, 2025, 02:05:33 PM
Proves, that generic resizer code might be difficult and needs lot of code.
#37
General discussions / Re: smorgasbordet.com/pellesc/...
Last post by Cbeginner - November 23, 2025, 10:34:53 PM
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

Yes thank you!
Installed and working now  :D
#38
General discussions / Re: smorgasbordet.com/pellesc/...
Last post by John Z - November 23, 2025, 10:21:13 PM
Should be able to get it from here:


https://web.archive.org/web/20250801041730/smorgasbordet.com/pellesc/ 

Click on Download as usual.

John Z
#39
General discussions / Re: smorgasbordet.com/pellesc/...
Last post by MrBcx - November 23, 2025, 10:09:31 PM
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  :'(


Unfortunately, Moderators do not have enough site permissions to upload a file of that size:

Your file is too large. The maximum attachment size allowed is 1,024 KB.

#40
General discussions / Re: smorgasbordet.com/pellesc/...
Last post by Vortex - November 23, 2025, 06:02:45 PM
Hello,

I can confirm the issue. http://smorgasbordet.com/pellesc/ is not available at the moment.