News:

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

Main Menu

Recent posts

#22
Beginner questions / Re: Createwindow
Last post by DonnyDave - October 30, 2025, 03:06:04 PM
COMBOBOX, LISTBOX and DROPDOWNLISTBOX as well.
#23
Beginner questions / Re: Createwindow
Last post by TimoVJL - October 30, 2025, 02:32:15 PM
#24
Feature requests / Re: RichEdit 4.1
Last post by TimoVJL - October 30, 2025, 01:16:15 PM
Sure we can.

Also make just a ref
#pragma comment(lib, "msftedit.lib")
int CALLBACK REExtendedRegisterClass(void *p);

FARPROC pDllGetVersion = (FARPROC)REExtendedRegisterClass;

msftedit.def for x86
LIBRARY msftedit.dll
EXPORTS
_IID_IRichEditOle DATA
_IID_IRichEditOleCallback DATA
_IID_ITextServices DATA
_IID_ITextHost DATA
_IID_ITextHost2 DATA
_CreateTextServices@12
_REExtendedRegisterClass@0
_RichEditANSIWndProc@16
_RichEdit10ANSIWndProc@16
_SetCustomTextOutHandlerEx
_DllGetVersion@4
_RichEditWndProc@16
_RichListBoxWndProc@16
_RichComboBoxWndProc@16

msftedit.def for x64
LIBRARY MSFTEDIT.dll
EXPORTS
IID_IRichEditOle DATA
IID_IRichEditOleCallback DATA
IID_ITextServices DATA
IID_ITextHost DATA
IID_ITextHost2 DATA
CreateTextServices
REExtendedRegisterClass
RichEditANSIWndProc
RichEdit10ANSIWndProc
SetCustomTextOutHandlerEx
DllGetVersion
RichEditWndProc
RichListBoxWndProc
RichComboBoxWndProc
#25
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
#26
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.
#27
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");
#28
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
#29
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
#30
Feature requests / Resizer Lib
Last post by John Z - October 28, 2025, 12:41:36 PM
Wondering if there is any interest in furthering the library or is it basically an 'as is' work?

I had opportunity to use it for the first time for the file view in the mdfiles_v2 program.
https://forum.pellesc.de/index.php?topic=11608.msg41540#new

It worked for my simple case (and it is utilized) but a few issues were observed. 
The sources mentioned in the help file don't seem to be included in the distribution anymore. 

If it is in an 'as is' state I wouldn't want to make useless inputs....

John Z