Author Topic: Interface demo.  (Read 8993 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 7544
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Interface demo.
« 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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

dedndave

  • Member
  • *****
  • Posts: 8827
  • Still using Abacus 2.0
    • DednDave
Re: Interface demo.
« Reply #1 on: October 06, 2012, 10:06:11 PM »
wow - i can see those without my glasses   :biggrin:

TouEnMasm

  • Member
  • *****
  • Posts: 1345
    • EditMasm
Re: Interface demo.
« Reply #2 on: October 06, 2012, 10:59:34 PM »

How it work ?
Show nothing on XP sp3  except a button on the toolbar desktop.
Fa is a musical note to play with CL

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 7544
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Interface demo.
« Reply #3 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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

MichaelW

  • Global Moderator
  • Member
  • *****
  • Posts: 1209
Re: Interface demo.
« Reply #4 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.

« Last Edit: October 07, 2012, 03:32:56 AM by MichaelW »
Well Microsoft, here’s another nice mess you’ve gotten us into.

TouEnMasm

  • Member
  • *****
  • Posts: 1345
    • EditMasm
Re: Interface demo.
« Reply #5 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
Fa is a musical note to play with CL

TouEnMasm

  • Member
  • *****
  • Posts: 1345
    • EditMasm
Re: Interface demo.
« Reply #6 on: October 07, 2012, 04:30:28 AM »

Bad size for the main window
mov Wty, eax  ;7fffffec ?????????????
Fa is a musical note to play with CL

TouEnMasm

  • Member
  • *****
  • Posts: 1345
    • EditMasm
Re: Interface demo.
« Reply #7 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
« Last Edit: October 07, 2012, 04:28:57 PM by ToutEnMasm »
Fa is a musical note to play with CL

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 7544
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Interface demo.
« Reply #8 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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

Vortex

  • Member
  • *****
  • Posts: 2337
Re: Interface demo.
« Reply #9 on: October 07, 2012, 06:52:49 PM »
Hi Hutch,

Nice work :t

It works fine on my XP Sp3.

TouEnMasm

  • Member
  • *****
  • Posts: 1345
    • EditMasm
Re: Interface demo.
« Reply #10 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









Fa is a musical note to play with CL

jj2007

  • Member
  • *****
  • Posts: 10548
  • Assembler is fun ;-)
    • MasmBasic
Re: Interface demo.
« Reply #11 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:

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 7544
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Interface demo.
« Reply #12 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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

Bill Cravener

  • Guest
Re: Interface demo.
« Reply #13 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:

Gunther

  • Member
  • *****
  • Posts: 3585
  • Forgive your enemies, but never forget their names
Re: Interface demo.
« Reply #14 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
Get your facts first, and then you can distort them.