News:

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

Main Menu

Recent posts

#61
Beginner questions / Createwindow
Last post by DonnyDave - October 30, 2025, 01:14:18 PM
 
 
I'm not understanding how to create a "dropdown listbox" window.
I've searched lots of Microsoft pages, but still can't find the answers.

     hwndStringSize = CreateWindow
        (
          TEXT ("LISTBOX"),
          NULL,
          WS_CHILDWINDOW | WS_VISIBLE,
          x, y,             //  Position
          width, height,    //  width, height,
          hwnd,
          (HMENU)LB_ADDSTRING,
          ghInstance,
          NULL
        );

How do I specify a "dropdown" box ?
How do I setup the initial values ? (say 1,2,3,4, ..etc)
How do I notify the mother window of a mouse click ? ("case LB_ADDSTRING :" not working)
How do I find out what the user selected in the listbox ?

Any help would be much appreciated.

 Dave
#62
Feature requests / Re: RichEdit 4.1
Last post by Vortex - October 30, 2025, 11:43:41 AM
Hi Timo,

We can create an import library for this dll. The Masm64 and Msys2 setups are providing the library.
#63
Feature requests / Re: RichEdit 4.1
Last post by TimoVJL - October 30, 2025, 08:24:08 AM
Meanwhile:
It is possible to add richedit 4.1 to dialog via custom control or add richedit control and change classname to "RichEdit50W"
and LoadLibrary("Msftedit.dll");
#64
Feature requests / RichEdit 4.1
Last post by John Z - October 29, 2025, 02:45:46 PM
Please consider adding Richedit4.1 to the control tool box in a future version release.
It uses the newer RTF DLL Msftedit.dll.

Calling syntax:
    HWND hwndEdit= CreateWindowEx(0, MSFTEDIT_CLASS, TEXT("Type here"),
        ES_MULTILINE | WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP,
        x, y, width, height,
        hwndOwner, NULL, hinst, NULL);

John Z
#65
Assembly discussions / Masking passwords
Last post by Vortex - October 28, 2025, 08:25:32 PM
Here is a dialog box example with an edit control hiding the text in the client area. Exiting the application, a message box displays the text entered to the edit control.

include     HiddenPasswd.inc

IDC_EDIT    equ 4001
PWD_CHAR    equ 43 ; ASCII(*)=42
BUFF_SIZE   equ 64

.data

DlgBox db 'DLGBOX',0
capt   db 'Hidden text',0

.data?

hEdit  dd ?
buffer db BUFF_SIZE dup(?)

.code

start:

    invoke  GetModuleHandle,0
    xor     ecx,ecx
    invoke  DialogBoxParam,eax,\
            ADDR DlgBox,ecx,ADDR DlgProc,ecx
    invoke  ExitProcess,eax

DlgProc PROC hWnd:DWORD,uMsg:DWORD,wParam:DWORD,lParam:DWORD

    .IF uMsg==WM_INITDIALOG

        invoke  GetDlgItem,hWnd,IDC_EDIT
        mov     hEdit,eax
        invoke  SendMessage,eax,EM_SETPASSWORDCHAR,PWD_CHAR,0

    .ELSEIF uMsg==WM_CLOSE

        invoke  GetWindowText,hEdit,ADDR buffer,BUFF_SIZE
        xor     ecx,ecx
        invoke  MessageBox,ecx,ADDR buffer,ADDR capt,ecx
        invoke  EndDialog,hWnd,0

    .ELSE

        xor     eax,eax
        ret

    .ENDIF

    mov     eax,TRUE
    ret

DlgProc ENDP

END start
#66
Tips & tricks / Resource extractors
Last post by Vortex - October 28, 2025, 11:33:44 AM
Resource Hacker

QuoteOverview:

Resource HackerTM is a resource editor for 32bit and 64bit Windows® applications. It's both a resource compiler (for *.rc files), and a decompiler - enabling viewing and editing of resources in executables (*.exe; *.dll; *.scr; etc) and compiled resource libraries (*.res, *.mui). While Resource Hacker is primarily a GUI application, it also provides many options for compiling and decompiling resources from the command-line.
https://www.angusj.com/resourcehacker/

BATHack

QuoteBATHack is a feature rich resource extracter/replacer program capable of extracting or replacing any resource found in either a NE, PE or .FON file. Thats right, extract or replace resources in 16-bit modules or 16-bit font files.

Resources can be exported as either a complied resource (.RES) or as raw data with accompanied resource script file.

http://batsoftware.net/RES2RC/htm/RES2RC.htm
#67
User contributions / Re: Mike Henning's Link2Res
Last post by John Z - October 27, 2025, 09:31:04 PM
Thanks Vortex!

John Z
#68
User contributions / Re: Mike Henning's Link2Res
Last post by Vortex - October 27, 2025, 07:07:50 PM
Hi John,

I attached the zip file, it's OK now.
#69
Feature requests / Re: Old version of Pelles C fo...
Last post by George/Gyorgy - October 27, 2025, 03:14:05 PM
Thank Pelle, the version 7.00 which I downloaded is all what I need.
Best regards,
Gyorgy
#70
User contributions / Re: Mike Henning's Link2Res
Last post by Vortex - October 26, 2025, 08:21:19 PM
The attached zip archive contains Mike Henning's Link2Res tool and a quick example :

Link2Res Rsrc.res DlgBox.exe -verbose