SFML community forums

Help => Window => Topic started by: Redee on May 21, 2015, 08:14:59 pm

Title: Escape from window procedure ?
Post by: Redee on May 21, 2015, 08:14:59 pm
How ?)
For example while we resizing border of window - code stops implementation.
In that moment me need run another code....
I know about threads but need in one thread implementation.
Title: Re: Escape from window procedure ?
Post by: Nexus on May 21, 2015, 08:34:09 pm
The problem about resizing/moving the window has come up a lot in the past, you might want so use the search function.
Title: Re: Escape from window procedure ?
Post by: Redee on May 22, 2015, 10:18:20 am
Don't worry - I already access to current MSG message in processEvent(..).
But when knocking to my message - got error access to another cell of memory.
Trying to fix it.
Don't scare its my mod of Sfml. MSG message at WindowImpl.hpp
I using this trick at WindowImplWin32::processEvent(..) >>

RECT rc;
rc.left = 0;
rc.top = 0;
rc.right = 1000;
rc.bottom = 500;
*((RECT*)WindowImplWin32::message.lParam) = rc;

And ugly error  :-\ >>

(https://farm6.staticflickr.com/5446/17934119846_09afc9524f.jpg) (https://farm6.staticflickr.com/5446/17934119846_2dc02df3b5_o.jpg)

Its saying me in message.lParam not wrote RECT* in this moment.
Need to detect what MSG was before.
Its >         WM_ENTERSIZEMOVE                0x0231(561)
And lParam here pure...

Ok can check > if(!message.lParam)
To make sure message stores this previous...

Maybe solution is throw to methods LPARAM &lparam instead LPARAM lparam
Try this now.
Nope (.


YEAAAAAAAAAAAAh  I did it  ;D ;D ;D
Simlpy needed change from  void processEvent(UINT message, WPARAM wParam, LPARAM lParam);
to
void processEvent(UINT message, WPARAM wParam, LPARAM &lParam);
And then change this lParam.