Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Escape from window procedure ?  (Read 1099 times)

0 Members and 1 Guest are viewing this topic.

Redee

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
Escape from window procedure ?
« 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.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6275
  • Thor Developer
    • View Profile
    • Bromeon
Re: Escape from window procedure ?
« Reply #1 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.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Redee

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
Re: Escape from window procedure ?
« Reply #2 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  :-\ >>



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.
« Last Edit: May 22, 2015, 12:33:22 pm by Redee »