News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Experimental Stuff

Started by Zen, May 10, 2014, 05:26:09 AM

Previous topic - Next topic

Zen

 :biggrin:

dedndave

XXControls was written by Chib777
i think the ones you're looking at were written by Xtreme
i believe they are also in the masm32\examples folder

but - yah - you can do it in MASM, of course


edit - he may have that someplace on codeproject or whatever

dedndave


Zen

#3
 :biggrin:


Gunther

You have to know the facts before you can distort them.

dedndave

that is Bogdan's site, where Ketil O now keeps the Rad stuff
both are forum members
nothing new, there   :biggrin:

Gunther

Dave,

Bogdan's site? I've to check that out, because I had only a look to check the further steps of SolAsm.

Gunther
You have to know the facts before you can distort them.

MichaelW

I could not find any information on the controls but it was easy enough to get the hex edit control going, and the most basic functions seem to work more or less as expected.

;==============================================================================
include \masm32\include\masm32rt.inc
;==============================================================================
IDC_HEXEDIT equ 101
;==============================================================================
  ;----------------------------------------------------------------------
  ; This is a general-purpose control definition macro that adds support
  ; for controls of any type to the MASM32 In-Memory Dialogs. For this
  ; macro the control class is specified as a quoted string, instead of
  ; being hard coded.
  ;----------------------------------------------------------------------
    DlgControl MACRO quoted_caption,quoted_class,dstyle,tx,ty,wd,ht,ctlID
      align_4 edi
      mov DWORD PTR [edi+0],  WS_VISIBLE or WS_CHILD or dstyle
      mov WORD  PTR [edi+8],  tx
      mov WORD  PTR [edi+10], ty
      mov WORD  PTR [edi+12], wd
      mov WORD  PTR [edi+14], ht
      mov WORD  PTR [edi+16], ctlID
      add edi, 18
      ustring quoted_class
      ustring quoted_caption
      ;-------------------------------------------
      ; Advance edi past the creation data array.
      ;-------------------------------------------
      add edi, 2
    ENDM
;==============================================================================
    .data
      hInstance   HMODULE 0
      hwndHexEdit HWND    0
    .code
;==============================================================================
DlgProc proc hwndDlg:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
    LOCAL rc:RECT
    SWITCH uMsg
        CASE WM_INITDIALOG
            invoke GetDlgItem, hwndDlg, IDC_HEXEDIT
            mov hwndHexEdit, eax
        CASE WM_SIZE
            invoke GetClientRect, hwndDlg, ADDR rc
            invoke MoveWindow, hwndHexEdit, 0, 0, rc.right, rc.bottom, TRUE
        CASE WM_COMMAND
            SWITCH wParam
                Case IDCANCEL
                    invoke EndDialog, hwndDlg, NULL
            ENDSW
        CASE WM_CLOSE
            invoke EndDialog, hwndDlg, NULL
    EndSw
    return 0
DlgProc endp
;==============================================================================
start:
;==============================================================================
    invoke LoadLibrary, chr$("RAHexEd.dll")
    invoke GetModuleHandle, NULL
    mov hInstance, eax
    Dialog  "Test", \
            "MS Sans Serif",10, \
            WS_OVERLAPPEDWINDOW or DS_CENTER, \
            1, \
            0,0,300,300, \
            1024
    DlgControl 0,"RAHEXEDIT",0,0,0,0,0,IDC_HEXEDIT
    CallModalDialog hInstance, 0, DlgProc, NULL
    exit
;==============================================================================
end start

;STYLE_NOLINENUMBER = 2
;DlgControl 0,"RAHEXEDIT",2,0,0,0,0,IDC_HEXEDIT




Well Microsoft, here's another nice mess you've gotten us into.

GoneFishing

Quote from: dedndave on May 10, 2014, 06:59:14 AM
here you go
written by Faisur - maybe by KetilO, himself   :P

http://www.oby.ro/rad_asm/projects/projects.html
First, thank you for the link, Dave
It's a real Treasure Island !  :t
I've downloaded hexed.zip which contains RAHexEd.txt file with some useful information in it :
Quote
RAHexEd KetilO (C) 2003 - 2005
So you were right

Zen

#10
 :biggrin:

GoneFishing

ZEN,
above mentioned hexed.zip contains an example  with source code


Zen

#12
 :biggrin: