August 18, 2019, 03:22:17 pm

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


makeLong, MakeLparam etc.

Started by Haim, August 23, 2008, 08:23:30 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Haim

Hello,
can anyone show me AURORA equivalents for makelong, MakeLparam, makeword, etc.??
Any help would be appreciated.

Haim

sapero

The MAKELONG macro creates a LONG value by concatenating the specified values. MAKELPARAM works in same way, but returns another 32-bit type - LPARAM.
Code Select
DWORD MAKELONG(
   WORD wLow,
   WORD wHigh
);


Code Select
sub MAKELONG(unsigned word wLow, unsigned word wHigh),unsigned int
{
  return wLow | (wHigh << 16);
}


Makeword takes two bytes and returns unsigned word. The 'shift' is 8 instead 16.

Haim

Sapero,
Thank you very much for your explanation1

Haim