Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, AndrewAMD), 13,824 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 4 of 4 1 2 3 4
Win API with Lite-C Pure Mode - ScanMessage fix [Re: yorisimo] #151765
09/28/07 15:32
09/28/07 15:32
Joined: Mar 2007
Posts: 197
Y
yorisimo Offline
Member
yorisimo  Offline
Member
Y

Joined: Mar 2007
Posts: 197
I got word back from GS support. ScanMessage was not setup for Lite-C, only for DLLs. This will be fixed in the next update along with an example in the manual. Until then, you'll need to edit avars.h like this:
Code:

#ifndef acknex_h //if using DLL
void (*SendPacket)(long to,void *data,long size,long flags); // the send function of the engine
void (*ReceivePacket)(long from,void *data,long size); // user provided receive function
long (*ScanMessage)(UINT message, WPARAM w_param, LPARAM l_param); // user provided message handler
#else // use normal pointers for lite-C
ENGINE_ void *SendPacket;
ENGINE_ void *ReceivePacket;
ENGINE_ void *ScanMessage;
#endif



and a working complete example of using it (resize the window and it will beep, all the defaults still work):
Code:

#include <acknex.h>
#include <windows.h>
#include <default.c>

function MyMessageFunction(UINT message, WPARAM wParam, LPARAM lParam);

function main() {
ScanMessage=MyMessageFunction;
}

function MyMessageFunction(UINT message, WPARAM wParam, LPARAM lParam){
if(message== WM_SIZE){ beep();}
}




Joris Lambrecht
My Contributions: Relative Rotation, Window Sizing
Re: Win API with Lite-C Pure Mode - ScanMessage fix [Re: yorisimo] #151766
11/01/07 04:45
11/01/07 04:45
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
pararealist Offline
Senior Member
pararealist  Offline
Senior Member

Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
Since A7.06

#include <acknex.h>
#include <windows.h>
#include <default.c>

function MyMessageFunction(UINT message, WPARAM wParam, LPARAM lParam);

function main() {
on_scanmessage = MyMessageFunction;
}

function MyMessageFunction(UINT message, WPARAM wParam, LPARAM lParam){
if(message== WM_SIZE){ beep();}
}


A8.3x Commercial, AcknexWrapper and VS 2010 Express
&#9675;pararealist now.
Re: Win API with Lite-C Pure Mode - ScanMessage fi [Re: pararealist] #151767
11/09/07 16:51
11/09/07 16:51
Joined: Mar 2007
Posts: 197
Y
yorisimo Offline
Member
yorisimo  Offline
Member
Y

Joined: Mar 2007
Posts: 197
yup, this thread was started before 7.06. This issue is now well documented.


Joris Lambrecht
My Contributions: Relative Rotation, Window Sizing
Page 4 of 4 1 2 3 4

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1