The MASM Forum

Projects => ObjAsm => Topic started by: HSE on November 10, 2020, 03:06:23 AM

Title: Tabular Device Interface (TDI)
Post by: HSE on November 10, 2020, 03:06:23 AM
Hi all!!

This is an idea to modify a project that is using MDI, but is a single document.

Then this is a SDI App that allow to maximize child windows. Limits are those of splitters.

Any sugestion is welcome!!
Title: Re: Tabular Device Interface (TDI)
Post by: Biterider on November 10, 2020, 03:28:05 AM
Hi Hector
Compliments, super nice and clean!  :thumbsup:
The interface works really smoothly. I will study the code and get back to you.

Regards, Biterider

Title: Re: Tabular Device Interface (TDI)
Post by: HSE on November 10, 2020, 03:55:08 AM
 :thumbsup:

Solved a little problem resulting from positioning splitter while client maximized, and resizing with a child maximized.

Uptade in first post.
Title: Re: Tabular Device Interface (TDI)
Post by: Biterider on November 10, 2020, 07:17:12 AM
Hi HSE
The program compiles fine for 32 bits with no changes.  :thumbsup:
I get splitter controls a bit wider, but the rest are the same.

I think that for 64 bits, some minor adjustments are required. I'll look into this soon.

Good stuff!  :tongue:

Biterider
Title: Re: Tabular Device Interface (TDI)
Post by: HSE on November 10, 2020, 11:07:07 PM
Thanks  :thumbsup:

Updated files in first post (more clean code and release binary).

Title: Re: Tabular Device Interface (TDI)
Post by: Biterider on November 11, 2020, 07:48:41 AM
Hi HSE
I changed the code only a bit to be x64 compatible too.
Unfortunately I made a mistake somewhere. The title bars don't look like the ones in your code. Maybe you can check that out.
The rest seems to work.  :cool:
Attached the code and the binary file.

Regards, Biterider
Title: Re: Tabular Device Interface (TDI)
Post by: Biterider on November 14, 2020, 05:37:53 PM
Hi HSE
I found the mistake. I did something forbidden in x64. I left some push/pop instructions from 32-bit code unchanged.  :rolleyes:
This is not allowed as it mess up stack references when you don't use rbp to do so.

Attached the corrected TdiChild.inc file. Now everything seems to be fine again.  :cool:

Biterider
Title: Re: Tabular Device Interface (TDI)
Post by: Biterider on November 14, 2020, 06:26:00 PM
Hi HSE
I found a left over from the original code. It is the message 1000.  :icon_idea:
It is triggered by the menu item "Salir" and shows a demo dialog instead of exiting.

It is caused by a double definition. The first is in ListadoC_Shared.inc <IDM_HELLO equ 1000> and the second in the menu resource <MENUITEM "&Salir", 1000>.
FRaCP_App.OnCommand reacts to this message showing DIALOG1.

Regards, Biterider
Title: Re: Tabular Device Interface (TDI)
Post by: HSE on November 15, 2020, 02:32:51 AM
The title bars don't look like the ones in your code. Maybe you can check that out.

Is a system colors problem. In 32bit machine look perfect, but in 64bit with high contrast don't look so good (32 and 64bit buildings exactly the same).

I found a left over from the original code.

 :biggrin: From Demo10 I begin  an application. Later I thinked in a demo. Then erased my menu and other things, and pasted again a menu from a demo. For sure I miss correct demo  :thumbsup:

Some little improvements are on the way. I will add to dual code.

Thanks. HSE
Title: Re: Tabular Device Interface (TDI)
Post by: Biterider on November 15, 2020, 02:49:35 AM
Hi HSE
I'm eager to see your improved code :biggrin:

Biterider
Title: Re: Tabular Device Interface (TDI)
Post by: Biterider on November 15, 2020, 06:55:32 PM
Hi HSE
In my experience, it is always good to check your code with OA_Tools. It is certainly not a perfect tool, but it does point out potential issues that should be investigated.
I want to show you how to use it. It's very simple.  :biggrin:
Some of the results are not errors but are by design, such as unused procedural parameters that must follow an API. Others need to be investigated.

Regards, Biterider
Title: Re: Tabular Device Interface (TDI)
Post by: HSE on November 16, 2020, 06:15:43 AM
 :biggrin:  :thumbsup:

I waked up 5:00 am thinking:
Code: [Select]
mov edi, [xsi].dToolbarHeight
add edi, 6
I'm not preserving edi! But yes, I'm preserving edi.

Title: Re: Tabular Device Interface (TDI)
Post by: HSE on November 17, 2020, 06:18:52 AM
Hi all!

Well, in the end I was not preserving edi in every proc  :biggrin:

Here splitter width is 2, that is a constant in splitter.inc.

Now there is high contrast detection, and different window properties depending on that.

TdiChild can't be embed directly. Now it's needed a derivate that create a window to show (or not in TdiEmpty).

Regards. HSE



Title: Re: Tabular Device Interface (TDI)
Post by: Biterider on November 17, 2020, 07:23:34 AM
Builds on the first try. Perfect  :thumbsup:
Biterider