flat assembler
Message board for the users of flat assembler.
Index
> Windows > windows control class |
Author |
|
bitRAKE 01 Jan 2019, 18:04
Listview
|
|||
01 Jan 2019, 18:04 |
|
DimonSoft 01 Jan 2019, 21:46
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.
|
|||
01 Jan 2019, 21:46 |
|
Ali.Z 02 Jan 2019, 00:06
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 |
|||
02 Jan 2019, 00:06 |
|
ProMiNick 02 Jan 2019, 11:34
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. |
|||
02 Jan 2019, 11:34 |
|
Ali.Z 02 Jan 2019, 13:23
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 |
|||
02 Jan 2019, 13:23 |
|
bitRAKE 02 Jan 2019, 17:06
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/ |
|||
02 Jan 2019, 17:06 |
|
Tomasz Grysztar 02 Jan 2019, 17:47
bitRAKE wrote: Windows is a bad design in many ways. |
|||
02 Jan 2019, 17:47 |
|
ProMiNick 02 Jan 2019, 18:51
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.
|
|||
02 Jan 2019, 18:51 |
|
Tomasz Grysztar 02 Jan 2019, 19:28
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. |
|||
02 Jan 2019, 19:28 |
|
Ali.Z 02 Jan 2019, 21:50
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 |
|||
02 Jan 2019, 21:50 |
|
DimonSoft 03 Jan 2019, 15:37
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. |
|||
03 Jan 2019, 15:37 |
|
Ali.Z 03 Jan 2019, 17:15
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 |
|||
03 Jan 2019, 17:15 |
|
DimonSoft 03 Jan 2019, 21:54
Ali.A wrote:
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. |
|||
03 Jan 2019, 21:54 |
|
bitRAKE 04 Jan 2019, 06:03
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. |
|||
04 Jan 2019, 06:03 |
|
Furs 05 Jan 2019, 17:58
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. |
|||
05 Jan 2019, 17:58 |
|
DimonSoft 06 Jan 2019, 10:09
Furs wrote:
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. |
|||
06 Jan 2019, 10:09 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.