Author Topic: Trasparent Clock  (Read 831 times)

PushPop

  • Regular Member
  • *
  • Posts: 19
Trasparent Clock
« on: June 26, 2020, 05:12:17 PM »
Good morning guys
I'm here again to ask you for help.
Someone explains to me why this doesn't work.
Thanks for your help

jj2007

  • Member
  • *****
  • Posts: 10636
  • Assembler is fun ;-)
    • MasmBasic
Re: Trasparent Clock
« Reply #1 on: June 26, 2020, 08:55:29 PM »
Please avoid this: #include "D:/masm32/include/RESOURCE.h"
Not everybody has D: as the Masm32 drive. So use #include "/masm32/include/RESOURCE.h" instead.

Otherwise, your code builds and works fine. The only problem is that the background doesn't get erased. So you should maybe send a message to the underlying windows that it needs repainting...

Greenhorn

  • Member
  • **
  • Posts: 126
Re: Trasparent Clock
« Reply #2 on: June 28, 2020, 02:56:10 AM »
Works fine on my system. Otherwise you should explain what exactly does not work.

Kind regards
Greenhorn

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 7608
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Trasparent Clock
« Reply #3 on: June 28, 2020, 03:01:38 AM »
Works OK on my Win 10 64 1909. What OS are you testing on ?

A couple of suggestions, make the grab area a lot bigger so its easier to move around. I can close it with ALT F4 but a simpler key combination would be easier. Display is good, shows up on light and dark backgrounds.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

TouEnMasm

  • Member
  • *****
  • Posts: 1391
    • EditMasm
Re: Trasparent Clock
« Reply #4 on: June 28, 2020, 04:29:31 PM »

On windows 10,It work but I couldn't stop it  ?
Fa is a musical note to play with CL

TouEnMasm

  • Member
  • *****
  • Posts: 1391
    • EditMasm
Re: Trasparent Clock
« Reply #5 on: June 28, 2020, 06:08:35 PM »

I have study your source files.Some PROC don't preserve the EBX ESI EDI.
ClockSetup proc uses ebx edi esi hWin:DWORD,uMsg:DWORD,wParam:DWORD,lParam:DWORD
You need to verify others proc to avoid problems.
Fa is a musical note to play with CL

Vortex

  • Member
  • *****
  • Posts: 2372
Re: Trasparent Clock
« Reply #6 on: June 28, 2020, 07:00:36 PM »
Hi PushPop,

Nice work. I noticed another problem, the application's CPU demand is between %34-36 on my system.

PushPop

  • Regular Member
  • *
  • Posts: 19
Re: Trasparent Clock
« Reply #7 on: June 30, 2020, 05:31:34 PM »
Good morning again
Everything works, the only problem is that it does not clean the background, after a short time everything becomes one color. Maybe my computer is having problems

TouEnMasm

  • Member
  • *****
  • Posts: 1391
    • EditMasm
Re: Trasparent Clock
« Reply #8 on: June 30, 2020, 06:06:04 PM »

I have re-build your source (after added the uses) with different headers,Test it,and see if you have the same problem.
Fa is a musical note to play with CL

jj2007

  • Member
  • *****
  • Posts: 10636
  • Assembler is fun ;-)
    • MasmBasic
Re: Trasparent Clock
« Reply #9 on: June 30, 2020, 09:13:54 PM »
The only problem is that the background doesn't get erased. So you should maybe send a message to the underlying windows that it needs repainting...

There are two techniques:
1. inform the underlying window that it needs repainting
2. before painting the dials, get a bitmap of the current state; then BitBlt that bitmap as the background before painting new dials.

If I had time to waste, I would try sending a WM_PAINT message, or using InvalidateRect to force a paint (no idea if that can be done with a window outside the own process) :cool:

PushPop

  • Regular Member
  • *
  • Posts: 19
Re: Trasparent Clock
« Reply #10 on: June 30, 2020, 11:57:42 PM »
Here I am again
Good morning
I send you the image of how it works on my machine
Thank you

TouEnMasm

  • Member
  • *****
  • Posts: 1391
    • EditMasm
Re: Trasparent Clock
« Reply #11 on: July 01, 2020, 12:24:01 AM »
You are on Windows X ? (XP,7,8....)
Did you try the executable I have Build ?
You can also run DXDIAG and save file,it made a test for the screen ,do it
Fa is a musical note to play with CL

jj2007

  • Member
  • *****
  • Posts: 10636
  • Assembler is fun ;-)
    • MasmBasic
Re: Trasparent Clock
« Reply #12 on: July 02, 2020, 02:49:57 AM »
Salut Yves, what happened to your nick? Google still sees you as ToutEnMasm :cool:

PushPop

  • Regular Member
  • *
  • Posts: 19
Re: Trasparent Clock
« Reply #13 on: July 03, 2020, 08:13:46 PM »
Hello
I am using windows 7 ultimate, but unfortunately I still have the same problem
Greetings to all

TouEnMasm

  • Member
  • *****
  • Posts: 1391
    • EditMasm
Re: Trasparent Clock
« Reply #14 on: July 04, 2020, 06:35:24 AM »

test this one,he used a different type of paint message,clic on to quit
Fa is a musical note to play with CL