flat assembler
Message board for the users of flat assembler.

flat assembler > Windows > windows control class

Author
Thread Post new topic Reply to topic
Ali.Z



Joined: 08 Jan 2018
Posts: 204
hey,

i want to make olly-like cpu/disassembly window where you have columns and rows, but im not sure what control class is that?

_________________
Asm For Wise Humans
Post 01 Jan 2019, 16:50
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2732
Location: dank orb
Listview
Post 01 Jan 2019, 18:04
View user's profile Send private message Visit poster's website Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 504
Location: Belarus
Well, it’s better to have a custom control class specifically for your program here, since it is going to be the core UI element. bitRAKE is right that the closest solution is ListView, but it is really difficult to customize its appearance and behaviour (specifically I remember writing a Total Commander-like program and having to implement my own control for panels since ListView didn’t give me a way to change the background color of the item in focus). OllyDbg uses its own custom controls, BTW.
Post 01 Jan 2019, 21:46
View user's profile Send private message Visit poster's website Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 204
damn, i dont know about custom controls ):

i cant even customize listview easily, why win32 gui is so difficult.

(and really wanna make it a real life project, really sad)

_________________
Asm For Wise Humans
Post 02 Jan 2019, 00:06
View user's profile Send private message Reply with quote
ProMiNick



Joined: 24 Mar 2012
Posts: 276
Location: Russian Federation, Sochi
To customize any standard control in most cases needed swithced on OWNER_DRAWN, and overrided procedure of drawing and sizing (HLLs do so). And if for control needed additional data link to it placed to userdata of windowclass or in userdata of windowcontrol.
for a while ago I played with other control (TreeView) - I needed every item to be full feature window that could contain any childs (and that such item realized as dialog resource). I don`t succeed... but I reached how to realize in assembly treeitems with undefault width and custom drawing text or graphic in it, but not drawing child controls(( (code lost or maybe not, but I didn`t found it fornow).

I think examples and tutorials of creating custom controls will be usable for windows fasmers. And library (set of includes) of ready to use custom controls will be usable too. However too complex custom controls (without simler ones) couldn`t take any knowledge about custom controls.
Like not superclassed custom control fedit couldn`t take anything to newbies due it complicity and absence of more simpler forms of custom controls.
(However I more interesting in evolution of linux relative development to escape there than in evolution of windows relative dev.)
windows dosn`t deserves good fasm code like it deserves other OSes, however for windows we have ready to use api & structures and a widest range of examples... It is sad.
Post 02 Jan 2019, 11:34
View user's profile Send private message Send e-mail Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 204
i agree with you ProMiNick,

i found these must be customized in order to use them:
Code:
'msctls_hotkey32'
'msctls_progress32'
'msctls_statusbar32'
'msctls_trackbar32'
'msctls_updown32'
'tooltips_class32'
'SysAnimate32'
'SysHeader32'
'SysListView32'
'SysTreeView32'
'SysTabControl32'
'SysMonthCal32'
'SysDateTimePick32'
'ToolbarWindow32'
'ReBarWindow32'    


while these ones are more easy to use, but you can customize them if you wish:
Code:
'BUTTON'
'EDIT'
'STATIC'
'LISTBOX'
'SCROLLBAR'
'COMBOBOX'    


fasm have custom edit class, which i tried to understand but i failed.

its more simple to use these windows control, custom control are much more complicated.

_________________
Asm For Wise Humans


Last edited by Ali.Z on 02 Jan 2019, 21:37; edited 1 time in total
Post 02 Jan 2019, 13:23
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2732
Location: dank orb
Some work in progress... https://github.com/mrfearless His 32-bit code is more complete, but still not the flexible customization ProMiNick is referring to. Windows is a bad design in many ways.

Have you looked at other options like: Qt?
https://download.qt.io/official_releases/qt/5.6/5.6.3/
Post 02 Jan 2019, 17:06
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7237
Location: Kraków, Poland
bitRAKE wrote:
Windows is a bad design in many ways.
When I was writing my FEDIT control, I had the exact opposite impression. Things like InvalidateRect were really helpful. But I guess that depends on what you're trying to do.
Post 02 Jan 2019, 17:47
View user's profile Send private message Visit poster's website Reply with quote
ProMiNick



Joined: 24 Mar 2012
Posts: 276
Location: Russian Federation, Sochi
Tomasz, may be thou share at some of streamings how to create custom controls on FEDIT as example: from concept & ideas of control to realization, what problems arised in realization, and how they was avoided/solved.
Post 02 Jan 2019, 18:51
View user's profile Send private message Send e-mail Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7237
Location: Kraków, Poland
ProMiNick wrote:
Tomasz, may be thou share at some of streamings how to create custom controls on FEDIT as example: from concept & ideas of control to realization, what problems arised in realization, and how they was avoided/solved.
Yes, that's another good idea to put in my basket.
Post 02 Jan 2019, 19:28
View user's profile Send private message Visit poster's website Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 204
i read little bit from github button code, it requires a lot of work if i want to implement my own version. (although im not interested in buttons)

still im not sure what to go with, either i try hard to create a listview or i go with a simplified huge stupid combobox.

question, is it possible to combobox to have multiline selection?
if so, then great i can temporarily use it until i get some more info about custom controls. (i can get a away around it, even if i didnt create custom controls ... there is always an alternative way)

_________________
Asm For Wise Humans
Post 02 Jan 2019, 21:50
View user's profile Send private message Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 504
Location: Belarus
ProMiNick wrote:
I think examples and tutorials of creating custom controls will be usable for windows fasmers.

In fact, the difference between a custom control and the main window is extremely small. The same WindowProc, the same need to attach data to particular window instances, the same standard messages (like WM_PAINT, etc.), the same things to be aware of (message loop, message queue, auto-generation of certain messages that never get into the queue), the same way to communicate with it by declaring WM_USER+XX messages…

Well, I’m aware that most people seem to use global variables for their main window. Saves some space and writing time but leads to worse architecture. When one starts thinking OOP-style (and WinAPI is OO by its nature), writing custom controls becomes easier than using existing ones.
Post 03 Jan 2019, 15:37
View user's profile Send private message Visit poster's website Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 204
DimonSoft,

yes im thinking the same way too, custom controls and local classes are more flexible.

however windows lacks explanations of technical stuff as well as the basis to start up.

DimonSoft wrote:
When one starts thinking OOP-style (and WinAPI is OO by its nature)

maybe because it was written by C then C++ and later on C#, not sure really.

_________________
Asm For Wise Humans
Post 03 Jan 2019, 17:15
View user's profile Send private message Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 504
Location: Belarus
Ali.A wrote:
DimonSoft wrote:
When one starts thinking OOP-style (and WinAPI is OO by its nature)

maybe because it was written by C then C++ and later on C#, not sure really.

Definitely not C#. In fact, OOP is the coding style one comes to when there are certain types of resources each having its own set of procedures to apply (with sets having intersections).

I’d agree that MSDN is not beginner-friendly though. Although (funny fact) nearly every piece of information needed is actually there, it’s just putting the pieces together that takes a lot of time and requires a lot of experience.
Post 03 Jan 2019, 21:54
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2732
Location: dank orb
Back in the GEM Desktop days things were much simpler. But I can't help thinking MS made some bad choices. Like, how many ways does one need to define a string of text? ...or count the number of characters? All these nuanced corners will keep coders employed for decades. So, I guess it isn't all bad.

The future is the cost of holding on to the past - stolen before we even get there.
Post 04 Jan 2019, 06:03
View user's profile Send private message Visit poster's website Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1403
DimonSoft wrote:
Well, it’s better to have a custom control class specifically for your program here, since it is going to be the core UI element. bitRAKE is right that the closest solution is ListView, but it is really difficult to customize its appearance and behaviour (specifically I remember writing a Total Commander-like program and having to implement my own control for panels since ListView didn’t give me a way to change the background color of the item in focus). OllyDbg uses its own custom controls, BTW.
FYI Total Commander uses an owner-drawn listbox not listview.
Post 05 Jan 2019, 17:58
View user's profile Send private message Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 504
Location: Belarus
Furs wrote:
DimonSoft wrote:
Well, it’s better to have a custom control class specifically for your program here, since it is going to be the core UI element. bitRAKE is right that the closest solution is ListView, but it is really difficult to customize its appearance and behaviour (specifically I remember writing a Total Commander-like program and having to implement my own control for panels since ListView didn’t give me a way to change the background color of the item in focus). OllyDbg uses its own custom controls, BTW.
FYI Total Commander uses an owner-drawn listbox not listview.

Taken from Lazarus Component Library in my 8.52a version. Which almost definitely means it has little to no connection with standard Windows LISTBOX anyway.
Post 06 Jan 2019, 10:09
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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-2019, Tomasz Grysztar.

Powered by rwasa.