The MASM Forum

Projects => MASM32 => Topic started by: hutch-- on October 06, 2012, 12:57:19 PM

Title: Interface demo.
Post by: hutch-- on October 06, 2012, 12:57:19 PM
Presentation graphics are something that I have to try and keep my eye in with, this is a test piece with 128 pixel toolbar buttons. Its the type of interface you design for accountants, management and the like who are technical dills in IT terms. They most often have high end computer hardware available, (HDMI resolution on fast graphics cards) so you can happily make executables that are far bigger than will happily run on old hardware.

I definitely own the stop button, the other three are modified samples so they may not be available commercially unless you find the image owner and pay for it.
Title: Re: Interface demo.
Post by: dedndave on October 06, 2012, 10:06:11 PM
wow - i can see those without my glasses   :biggrin:
Title: Re: Interface demo.
Post by: TouEnMasm on October 06, 2012, 10:59:34 PM

How it work ?
Show nothing on XP sp3  except a button on the toolbar desktop.
Title: Re: Interface demo.
Post by: hutch-- on October 07, 2012, 12:03:04 AM
Yves,

Just try out something for me, add the line "invoke CommonControls" at the beginning of the code section after the start label and see if that fixes the display. It works here on my XP SP3 but you language version may respond differently.

It should show a toolbar with 4 x 128 pixel buttons.
Title: Re: Interface demo.
Post by: MichaelW on October 07, 2012, 12:55:17 AM
It didn't show the bar or the buttons under Windows 2000, but it does under Windows XP SP3.

The call to CreateWindowEx that is supposed to create the rebar control is failing with "Cannot find window class". In the comctl32.dll on the XP system I can find the string "ReBarWindow32", but the string is not present in the dll on my Windows 2000 system. I can correct the failure by including all of the classes in the dwSize member of INITCOMMONCONTROLSEX, and I can then see the bar, but only the top 20 or so scan lines of the buttons show. When I click the visible part of the buttons they function as they should.

Title: Re: Interface demo.
Post by: TouEnMasm on October 07, 2012, 01:12:21 AM

Quote
Just try out something for me, add the line "invoke CommonControls"
I will search a little why the toolbar is not shown
Title: Re: Interface demo.
Post by: TouEnMasm on October 07, 2012, 04:30:28 AM

Bad size for the main window
mov Wty, eax  ;7fffffec ?????????????
Title: Re: Interface demo.
Post by: TouEnMasm on October 07, 2012, 04:50:07 AM
del this two lines an all is good:
Quote
    mov Wwd, 600       ;lines 120,121 bigbutn2.asm
    mov Wht, 640
Title: Re: Interface demo.
Post by: hutch-- on October 07, 2012, 06:41:10 PM
Yves,

I confess I don't understand what has happened on your machine, the two lines of code simply over-ride the calculated size to set a fixed window size. If they are deleted the window will size to ratios of the screen size.
Title: Re: Interface demo.
Post by: Vortex on October 07, 2012, 06:52:49 PM
Hi Hutch,

Nice work :t

It works fine on my XP Sp3.
Title: Re: Interface demo.
Post by: TouEnMasm on October 07, 2012, 07:12:53 PM
Quote
Yves,

I confess I don't understand what has happened on your machine, the two lines of code simply over-ride the calculated size to set a fixed window size. If they are deleted the window will size to ratios of the screen size
Simple,I work with a screen of 800 by 600.
You write:
Quote
    mov Wht, 640       
then :
Quote
    mov eax, sHgt             ;for me 600
    sub eax, Wht                ; sub window height from screen height
                                       ;600 - 640 = -40
    shr eax, 1                  ; divide it by 2
    mov Wty, eax                ; copy it to variable


And the size of my window is -40 ,7fffffech   ;WRONGThe two lines need to be deleted.
This two lines give a good result,usable on any screen definition
Quote
    invoke GetPercent,sWid,70
    mov Wwd, eax
    invoke GetPercent,sHgt,70
    mov Wht, eax









Title: Re: Interface demo.
Post by: jj2007 on October 07, 2012, 07:24:00 PM
Works perfect here on XP SP3, Italian version :t

    sar eax, 1                  ; divide it by 2
... an all is good :biggrin:
Title: Re: Interface demo.
Post by: hutch-- on October 07, 2012, 08:25:35 PM
Thanks Yves, it now makes sense. The demo was designed at HDMI resolution and while it will run on smaller, your screen size is probably below the effective threshold.

JJ, gratsie.
Title: Re: Interface demo.
Post by: Bill Cravener on October 07, 2012, 08:30:30 PM
Nice Steve!

Checks out fine on my old Win XP Home SP3 and my Win 7 Premium. :biggrin:
Title: Re: Interface demo.
Post by: Gunther on October 07, 2012, 11:40:48 PM
Steve,

good job. :t  Works fine on my old box XP with SP3 and the new machine with Win7 SP1.

Gunther
Title: Re: Interface demo.
Post by: mineiro on October 08, 2012, 04:44:06 AM
works on xp sp3 pt_br version and wine compatible too
Title: Re: Interface demo.
Post by: FORTRANS on October 09, 2012, 12:24:16 AM
Hi,

   Works on Windows XP.  Looks good.  As Dave says, I
can even see something without my glasses.  Plain gray
window under Windows 2000.  At least Alt-F4 works then.

Regards,

Steve N.