Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (NnamueN, 1 invisible), 1,413 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 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 | chip programmers | 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