News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

I like emoticons! Update.

Started by Bill Cravener, July 28, 2008, 04:10:11 PM

Previous topic - Next topic

Bill Cravener

Hi Steve,

Had a quick look over your source as far as programming style goes I'd say you and I were similar. Your source is easy to read and I'm going to enjoy reading thru it and playing around with your example.

I do get some flicker from the min max exit buttons as you said when resizing. I would probably create tiny bitmaps of the buttons an blit them onto the titlebar. That would eliminate flicker but regardless your window looks sharp and it's a great example to show others how it can be done.

I really enjoy examples like this and it reminds me of the old days when we asm coders loved to post interesting and often useful asm examples. Thanks for posting another asm toy to play with! 
My MASM32 Examples.

"Prejudice does not arise from low intelligence it arises from conservative ideals to which people of low intelligence are drawn." ~ Isaidthat

BlackVortex

Really good work guys !

I learned some new things ! Oh, and hutch, your example is great !

Could you point me to the right direction for fade-in/out effects ? I've been using AnimateWindow but it has serious problems in vista aero   :snooty:


hutch--

BlackVortex,

Have a look at Bill's examples in the current masm32 version. I pinched Bill's technique some years ago for making fade in entries with a started application. It works well because it ests if the function is available in the particular OS version, runs it if it is and bypasses it if its not.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

BlackVortex

I just rummaged through all the folders inside "examples" but found zilch !
       


I failed you hutch    :red

P.S.: I like emoticons, too !

BlackVortex

Sorry for the double-posting, but maybe I missed the fade effects because I use WindowBlinds with a custom windows theme (on xp fully updated)

I mean, shouldn't the version of TopGun.exe in the masm32 v10 package fade in ? It doesn't. I think I noticed it on one of my other computers (in another house now, lol, can't test, I'm stranded with only my main working PC and my virtual machines don't work properly)

Plz direct me to an example source code.

hutch--


drv:\masm32\examples\bcraven\calender\calender.asm


Bill's algo does both fade in and fade out.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

BlackVortex

Gee !

That was a lot of consts and procs and structs and timers,sleeps,painting etc. Took me 10 minutes to get it to assemble, tested successfully but I decided it's not worth it for an aesthetic gimmick.

I did learn some new things looking at the code and that's more important than copy/pasting , thanks for helping me out   :P

hutch--

Try this, its a stripped down version of Bill's algo only for win2000 and higher.


; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

WindowFadeIn proc hWin:DWORD,msdelay:DWORD,step:DWORD,swattr:DWORD

    ; --------------------------------------------------
    ; hWin      = handle of window to fade in.
    ; msdelay   = delay between fade level changes
    ; step      = incremental fade rate change up to 255
    ; swattr    = ShowWindow style
    ; --------------------------------------------------

    LOCAL wstyle    :DWORD

    push esi
    xor esi, esi

    invoke GetWindowLong,hWin,GWL_EXSTYLE           ; get current window style
    mov wstyle, eax
    or eax,WS_EX_LAYERED
    invoke SetWindowLong,hWin,GWL_EXSTYLE,eax       ; add the WS_EX_LAYERED style

    invoke SetLayeredWindowAttributes,hWin,0,0,2

    invoke ShowWindow,hWin,swattr

  doloop:
    invoke SetLayeredWindowAttributes,hWin,esi,esi,1 or 2
    invoke Sleep, msdelay

    invoke UpdateWindow,hEdit
    invoke UpdateWindow,hRebar
    invoke UpdateWindow,hStatus
    invoke UpdateWindow,hWin

    add esi,step
    cmp esi,255
    jl doloop

    invoke SetLayeredWindowAttributes,hWin,0,255,2
    invoke UpdateWindow,hWin

    invoke SetWindowLong,hWin,GWL_EXSTYLE,wstyle    ; restore original window style

    pop esi

    ret

WindowFadeIn endp

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Sean1337

This is an awesome program and a great idea for using custom emoticons on message boards..props..nice job dude.

Bill Cravener

QuoteI did learn some new things looking at the code and that's more important than copy/pasting

BlackVortex,

That is what I love about reading interesting asm source code examples the new things you learn!


Steve,

Hard to believe its been 5 years since I created that calendar example. The years go by too quickly!


QuoteThis is an awesome program and a great idea for using custom emoticons on message boards..props..nice job dude.

Sean1337,

Thanks, its nice knowing I'm not the only one who likes using emoticons!
My MASM32 Examples.

"Prejudice does not arise from low intelligence it arises from conservative ideals to which people of low intelligence are drawn." ~ Isaidthat