flat assembler
Message board for the users of flat assembler.

Index > Windows > OpenGL.asm example

Author
Thread Post new topic Reply to topic
WereMole



Joined: 28 May 2016
Posts: 5
WereMole
What causes the WM_PAINT message to be repeated called in the OPELGL.ASM example?
Post 09 Oct 2016, 01:15
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17475
Location: In your JS exploiting you and your system
revolution
Because the update region is never validated Windows will continue to send WM_PAINT messages.
Post 09 Oct 2016, 03:01
View user's profile Send private message Visit poster's website Reply with quote
WereMole



Joined: 28 May 2016
Posts: 5
WereMole
Thank you. I did not understand the importance of the validation.

https://msdn.microsoft.com/en-us/library/windows/desktop/dd145213(v=vs.85).aspx

To verify this I modified the WIN64 > OPENGL example.

I added three lines. The code was:

proc WindowProc uses rbx rsi rdi, hwnd,wmsg,wparam,lparam
mov [hwnd],rcx
frame

now:

proc WindowProc uses rbx rsi rdi, hwnd,wmsg,wparam,lparam
mov [hwnd],rcx
mov [wmsg],rdx
mov [wparam],r8
mov [lparam],r9
frame

Then I changed the end of .wmpaint from:

jmp .finish

To:

mov rcx,[hwnd]
mov rdx,[wmsg]
mov r8,[lparam]
mov r9,[wparam]

jmp .defwndproc

The animation stopped.

Thanks again
Post 09 Oct 2016, 11:49
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.