News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

How to use RadASM components ?

Started by Ding, May 18, 2020, 02:43:42 PM

Previous topic - Next topic

Ding

Hello everyone,
If anyone here has a collection of examples on how to use RadASM components it will be awesome.
for the moment I need just three of them:
TreeView, ListView, TabStrip.
This is a simple design of what I want to achieve:
note that each tab will have its own ListView.


Best Regards.

Ding

After searching I did it , now I know how to add Items ...
the only problem is with TreeView , no caption Is shown ?
attached version 0.0.1
TODO :
[-] Error handling while opening files .
[-] Anchor controls .
[-] Each tab has it's own Listview .
[-] Fixing TreeView items.
any suggestions , help is more than welcome .

Mr.Hutch-- : feel free to edit or delete this topic .

Ding.

jj2007

Quote from: Ding on May 18, 2020, 06:58:25 PMMr.Hutch-- : feel free to edit or delete this topic .

Why should he? We are watching with awe... code is always welcome :thumbsup:

hutch--

Hi Ding,

No need to delete the postings as we leave them so others can find the data in a search. Glad you got a result.

Ding

Thank you guys @jj2007 @Hutch--   :thumbsup:

PEParser v0.0.2
added :
  • Error handling
  • Fixing treeview caption (RadASM Can't autocomplete this line : ' pop tvi.item.pszText '  is there any issue with the IDE ? tvi is a local variable : TV_INSERTSTRUCT
    TODO :
    [-] I wanna be able to maximize the main dialog and dock controls ? I read that there is no way to dock controls using WinApi , is that true ?
    [-] the treeview displays the full path of the filename , i need just the exe name for example : Filename.exe , how can I extract it ?

    I believe that this is the best way to learn , by doing and asking !   :azn:

    Best regards ,

    Ding.

mineiro

Quote from: Ding on May 18, 2020, 06:58:25 PM
any suggestions , help is more than welcome .
hello sir Ding;
A member sir fearless of this board was working in some topics about Radasm.
You can find some posts of sir Ketil (Radasm author) in old board. You can also download Radasm source code to read and change to your needs.
I'd rather be this ambulant metamorphosis than to have that old opinion about everything

jj2007

Quote from: Ding on May 18, 2020, 10:13:51 PM
[-] the treeview displays the full path of the filename , i need just the exe name for example : Filename.exe , how can I extract it ?

include \masm32\include\masm32rt.inc

.data
filename db "\masm32\qEditor.exe", 0

.code
start:
  mov esi, offset filename
  add esi, len(esi)
  .Repeat
dec esi
mov al, [esi-1]
  .Until al=="\" || !al
  print "The filename: "
  inkey esi
  exit

end start

hutch--

You can use this procedure from the masm32 library.

NameFromPath proc src:DWORD,dst:DWORD


Ding

Once again , Thank you so much guys for helping me out

@jj2007  great example , this allows to retrieve all kind of files including files with no extension , awesome :thumbsup:

@Hutch-- works like a charm , I'll make sure to read masmlib.chm   :biggrin:

@mineiro Hi , thanks for replying this topic , greeting to Mr.KetilO , I already have RadASM Source It's so important to me , once I fee comfortable using asm I'll try to study the code , for now I want to finish my simple project ' A simple PE Parser ' .

[-] I'll work on the listview today to add some items and extract DOS Header informations .

Best Regards ,

TimoVJL

wjr's PEView is good for PE-files.

BTW:
char *BaseName2(char *pszPath)
{
char *pChar = pszPath;
while (*pszPath++)
if (*pszPath == '/' || *pszPath == '\\' ) {
pChar = pszPath;
pChar++;
}
return pChar;
}

_BaseName2@4:
00000000  8B442404                 mov eax, dword ptr [esp+4h]
00000004  89C2                     mov edx, eax
00000006  EB0D                     jmp L_15
00000008  80382F                   cmp byte ptr [eax], 2Fh
0000000B  7405                     jz L_12
0000000D  80385C                   cmp byte ptr [eax], 5Ch
00000010  7503                     jnz L_15
00000012  8D5001                   lea edx, [eax+1h]
00000015  89C1                     mov ecx, eax
00000017  40                       inc eax
00000018  803900                   cmp byte ptr [ecx], 0h
0000001B  75EB                     jnz L_8
0000001D  89D0                     mov eax, edx
0000001F  C20400                   ret 4h
May the source be with you

Ding

Hi , TimoVJL
the utility (PEview) is not open source ?

TimoVJL

Quote from: Ding on May 26, 2020, 01:11:47 PM
Hi , TimoVJL
the utility (PEview) is not open source ?
No, i think so, it was written in GoASM ?

TLPEView other hand was written in C, so both 32/64-bit versions exist, but also without public source code anymore.
Sourcecode was shared to other programmer, so if i disappear by Covid-19, others can continue  :thumbsup:
May the source be with you