News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Graphic Static

Started by digelo, January 20, 2013, 01:23:58 AM

Previous topic - Next topic

dedndave

one thing you may have noticed, Michael
HALFTONE mode is a lot slower than COLORONCOLOR - lol

nice examples, guys   :t

digelo

Thank you guys for your helps specially Qword and Michael.
I just imported Qword's nice example to my application , and now im working on changing its colors while my program is running.

MichaelW

Quote from: dedndave on January 21, 2013, 01:06:12 AM
one thing you may have noticed, Michael
HALFTONE mode is a lot slower than COLORONCOLOR – lol

I could not see the difference, but in my crude test looping the code 1000 times directly in the WM_PAINT handler and measuring the loop time with GetTickCount, I get:

~900ms for COLORONCOLOR
~3200ms for HALFTONE
Well Microsoft, here's another nice mess you've gotten us into.

Farabi

qWord example a bit compilicated but he is right by using SetWindowLong. You have to create your own procedure for each control and intercept the message.
http://farabidatacenter.url.ph/MySoftware/
My 3D Game Engine Demo.

Contact me at Whatsapp: 6283818314165

hfheatherfox07

Quote from: qWord on January 20, 2013, 05:39:45 PM
That was fiddly ... in the attachment an example (GDI) that may be used as a base.

qWord

EDIT upload: some changes to reduce CPU usage . Also WM_DESTROY was not process by the control.
EDIT2: Further improvements


Hey qWord,
I seem to get errors with the Ampersand  "&"
Why ? :(

DigitalClock.asm(63) : error A2008: syntax error : &
fn(5): Macro Called From

DigitalClock.asm(87) : error A2008: syntax error : &
fn(5): Macro Called From


same in the Cntrl.asm

Thank you !
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

digelo

Quote from: hfheatherfox07 on January 23, 2013, 10:32:01 AM
I seem to get errors with the Ampersand  "&"

Replace "&" with "addr"

qWord

MREAL macros - when you need floating point arithmetic while assembling!

hfheatherfox07

Quote from: digelo on January 23, 2013, 10:57:01 AM
Quote from: hfheatherfox07 on January 23, 2013, 10:32:01 AM
I seem to get errors with the Ampersand  "&"

Replace "&" with "addr"

Thank you that did it !

@echo off
C:\masm32\bin\ml /c /coff DigitalClock.asm
C:\masm32\bin\ml /c /coff Cntrl.asm
C:\masm32\bin\\link.exe /subsystem:windows DigitalClock.obj Cntrl.obj

pause
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

hfheatherfox07

lol
never mind too many windows open at one time  :icon_redface:
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

xandaz

   Sorry i took so long. Some nice stuff already. Gotta catchup. Here's my shit example. I think that this is more or less what was intended. Thanks

xandaz

   Hey.... btw. Theres some problems with that example. I think it has to do with the memory allocated by the controls. It doesn't seem to free. is it still WM_DESTROY WM_CLOSE for child windows?

xandaz


jj2007

Works fine :t
You can close a child window by sending WM_CLOSE, 0, 0 - the destroy is automatic then.

xandaz

   That's not what i meant. For example, ... in this case you have a child window - the counter. The Counter has more children and allocates memory to allow independece of use, so you can create more than one control. When you click the close button on the top-right corner you get the WM_DESTROY. What does the child window get? i need to get the that memory freed. Anyway i used Heap Functions and then it seems to work.

qWord

All windows receive WM_DESTROY/WM_NCDESTROY - that is the place which can be used to free resources.
Also, the common way to remove a child control is to call DestroyWindow() and not sending WM_CLOSE - this is message is send when the X-Button or Alt-F4 (...) of a TLW is pressed.
MREAL macros - when you need floating point arithmetic while assembling!