flat assembler
Message board for the users of flat assembler.

Index > Windows > I need help building user interfaces in assembly language

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
sultan alrefaei



Joined: 13 Sep 2022
Posts: 7
sultan alrefaei 13 Sep 2022, 08:12
Hello, I'm a new member to this forum . First of all, my English is poor, and I apologize if you have difficulty understanding me.

But I am looking for a source or a way to learn how to build interfaces through x86 assembly language by fasm

Preferably suitable for beginners.

In fact, I am a high-level language programmer, and I would like to expand my knowledge further by learning low-level languages ​​and developing software and interfaces with them.

I am happy to get to know this beautiful forum and I really hope to find suitable help for me. I am very passionate about learning more and more, developing my skills more, and pushing my abilities to the limit.

thank you. Very Happy
Post 13 Sep 2022, 08:12
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 18960
Location: In your JS exploiting you and your system
revolution 13 Sep 2022, 11:03
You can download fasmw which has the asm source code for the GUI IDE.
Post 13 Sep 2022, 11:03
View user's profile Send private message Visit poster's website Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1474
Location: Toronto, Canada
AsmGuru62 13 Sep 2022, 14:45
User Interface is a very wide topic.
A simple dialog box with controls is a user interface --- FASM has a set of macro instructions to create dialogs.
A frame window with icons on the left side and a set of tabs on the right is a user interface --- well, you have to code those.
A frame window with a set of splitters, a toolbar, etc. is also user interface (Visual Studio like) --- you have to code those too.
Are you interested in all of those?
Post 13 Sep 2022, 14:45
View user's profile Send private message Send e-mail Reply with quote
macomics



Joined: 26 Jan 2021
Posts: 675
Location: Russia
macomics 13 Sep 2022, 16:45
AsmGuru62 wrote:
A simple dialog box with controls is a user interface

Code:
invoke MessageBoxA, HWND_DESKTOP, "My first user interface", "Hello world!", MB_OK or MB_ICONINFORMATION    
Post 13 Sep 2022, 16:45
View user's profile Send private message Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 587
Location: Ukraine
Overclick 13 Sep 2022, 17:42
High-level language programmer suppose to do the same things via winapi LOL
sultan alrefaei Look at examples in Fasm folder.
Post 13 Sep 2022, 17:42
View user's profile Send private message Visit poster's website Reply with quote
sultan alrefaei



Joined: 13 Sep 2022
Posts: 7
sultan alrefaei 13 Sep 2022, 18:59
Thanks everyone for the reply..

I developed an interface through fasm and I used the correct functions to develop the interface, but there are parameters and things I want to know their meaning and why they are placed, so I decided to learn from scratch more clearly because I did not find a reference explaining all the parameters of the Windows user interface functions.

I hope it is clear, and I want to develop advanced interfaces such as those like Visual Basic.

I have sufficient experience in programming in general, but I want sources to clarify all functions and their parameters

Thanks
Post 13 Sep 2022, 18:59
View user's profile Send private message Reply with quote
sultan alrefaei



Joined: 13 Sep 2022
Posts: 7
sultan alrefaei 13 Sep 2022, 19:06
Overclick wrote:
High-level language programmer suppose to do the same things via winapi LOL
sultan alrefaei Look at examples in Fasm folder.



winapi I did not find everything in it. There are things that I could not find in the basic references, and if they exist, they are not explained enough.
Post 13 Sep 2022, 19:06
View user's profile Send private message Reply with quote
sultan alrefaei



Joined: 13 Sep 2022
Posts: 7
sultan alrefaei 13 Sep 2022, 19:10
AsmGuru62 wrote:
User Interface is a very wide topic.
A simple dialog box with controls is a user interface --- FASM has a set of macro instructions to create dialogs.
A frame window with icons on the left side and a set of tabs on the right is a user interface --- well, you have to code those.
A frame window with a set of splitters, a toolbar, etc. is also user interface (Visual Studio like) --- you have to code those too.
Are you interested in all of those?


Interested in developing interfaces that contain buttons, menus and multiple windows
Post 13 Sep 2022, 19:10
View user's profile Send private message Reply with quote
sultan alrefaei



Joined: 13 Sep 2022
Posts: 7
sultan alrefaei 13 Sep 2022, 19:12
revolution wrote:
You can download fasmw which has the asm source code for the GUI IDE.


The link does not work
Post 13 Sep 2022, 19:12
View user's profile Send private message Reply with quote
sultan alrefaei



Joined: 13 Sep 2022
Posts: 7
sultan alrefaei 13 Sep 2022, 19:16
macomics wrote:
AsmGuru62 wrote:
A simple dialog box with controls is a user interface

Code:
invoke MessageBoxA, HWND_DESKTOP, "My first user interface", "Hello world!", MB_OK or MB_ICONINFORMATION    


Thank you, but that's not what I'm looking for, I want a complete methodology for building advanced interfaces with multiple elements.

Like the ones on Visual Basic.

Thank you again
Post 13 Sep 2022, 19:16
View user's profile Send private message Reply with quote
macomics



Joined: 26 Jan 2021
Posts: 675
Location: Russia
macomics 13 Sep 2022, 19:27
Try ResourceView from the MSVS kit. Then it is called from resources very simply (via DialogBoxParam).
Post 13 Sep 2022, 19:27
View user's profile Send private message Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 587
Location: Ukraine
Overclick 13 Sep 2022, 20:09
You need some assembly IDE with Resource editor, RadAsm for example. Or separate editor even Visual. Then you include edited resources by
section '.rsrc' resource from 'yourResouces.res' data readable
Post 13 Sep 2022, 20:09
View user's profile Send private message Visit poster's website Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 1120
Location: Belarus
DimonSoft 13 Sep 2022, 20:23
Guys, since I gave up using dialog boxes long ago due to the quirks with fonts and font-relative sizing, may I ask you how in general do you build dialog-based interfaces with Per-Monitor High DPI support? I mean, it definitely should be possible, but I seem to be too lazy to figure out how to build things up together to ensure it looks properly everywhere. Arbitrary font properties, resizing controls at runtime based on current dialog size, adjusting it to monitor DPI, etc.
Post 13 Sep 2022, 20:23
View user's profile Send private message Visit poster's website Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 587
Location: Ukraine
Overclick 13 Sep 2022, 20:24
Quote:

Guys, since I gave up using dialog boxes long ago due to the quirks with fonts and font-relative sizing, may I ask you how in general do you build dialog-based interfaces with Per-Monitor High DPI support? I mean, it definitely should be possible, but I seem to be too lazy to figure out how to build things up together to ensure it looks properly everywhere. Arbitrary font properties, resizing controls at runtime based on current dialog size, adjusting it to monitor DPI, etc.

D2D1RenderTarget
Post 13 Sep 2022, 20:24
View user's profile Send private message Visit poster's website Reply with quote
sultan alrefaei



Joined: 13 Sep 2022
Posts: 7
sultan alrefaei 13 Sep 2022, 20:50
Overclick wrote:
You need some assembly IDE with Resource editor, RadAsm for example. Or separate editor even Visual. Then you include edited resources by
section '.rsrc' resource from 'yourResouces.res' data readable


The installation link for RadAsm is not working in GitHub
Post 13 Sep 2022, 20:50
View user's profile Send private message Reply with quote
FlierMateI



Joined: 12 Sep 2022
Posts: 6
FlierMateI 14 Sep 2022, 08:13
Is a typical Windows program with dialog box always look like this?

Code:
GetModuleHandle
LoadIcon
LoadCursor
RegisterClass,wc
CreateWindowEx

  msg_loop:
GetMessage
TranslateMessage,msg
DispatchMessage,msg
  jmp     msg_loop
    

(with or without dialog box resources)

I am beginner to Windows dialog box and found myself must get used to the above.
Post 14 Sep 2022, 08:13
View user's profile Send private message Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 587
Location: Ukraine
Overclick 14 Sep 2022, 09:44
Not, Dialog Box no need all of this. Simple DialogBox called by DialogBoxParam needs only few handles, proc name and ID from resources. The rest Windows doing itself, including message loop.
Post 14 Sep 2022, 09:44
View user's profile Send private message Visit poster's website Reply with quote
FlierMateI



Joined: 12 Sep 2022
Posts: 6
FlierMateI 14 Sep 2022, 11:54
Overclick wrote:
Not, Dialog Box no need all of this. Simple DialogBox called by DialogBoxParam needs only few handles, proc name and ID from resources. The rest Windows doing itself, including message loop.


Thanks for the useful information, Overclick.

As a beginner, looks like I don't know how to differentiate a window and a dialog box in low-level programming.
Post 14 Sep 2022, 11:54
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1959
Furs 14 Sep 2022, 12:15
FlierMateI wrote:
Overclick wrote:
Not, Dialog Box no need all of this. Simple DialogBox called by DialogBoxParam needs only few handles, proc name and ID from resources. The rest Windows doing itself, including message loop.


Thanks for the useful information, Overclick.

As a beginner, looks like I don't know how to differentiate a window and a dialog box in low-level programming.
Dialog box is a "high level window". It's not magic. It's a window with its own message loop (same with Message Box).

To be honest most of this thing has nothing to do with asm, it's just the Windows API you need to be familiar with. You can pick any Windows API guides/books to understand it. Obviously it's large and not something you can write in a few sentences.
Post 14 Sep 2022, 12:15
View user's profile Send private message Reply with quote
FlierMateI



Joined: 12 Sep 2022
Posts: 6
FlierMateI 14 Sep 2022, 12:51
Furs wrote:
It's a window with its own message loop (same with Message Box).


That explains a lot about GUI in Windows. I appreciate your informative reply.

Furs wrote:
To be honest most of this thing has nothing to do with asm, it's just the Windows API you need to be familiar with.


Since it is just Windows API, I think it will be faster to write in C++ than in Assembly, also I found most code examples from Microsoft website in Win32 API is C++.
Post 14 Sep 2022, 12:51
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.