If you want to return a value, that return value comes first in the stirng table.
Put:
extern "C"
{
EXPORT int XSDKPUSHBUTTON(LPSTR stext, int ixpos, int iypos, int iheight, int iwidth , int ibid);
}
before the function declaration. Then for string table:
XSK Push Button[%LSLLLLL%xskPushButton%String Text, Integer X, Integer Y, Integer Height, Integer Width, Integer ID
(err... that's exatly what Ravn put
oops
So whole VC6 code is
#include "stdafx.h"
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
#ifndef EXPORT
#define EXPORT __declspec( dllexport ) extern "C"
#else
#define EXPORT __declspec( dllimport ) extern "C"
#endif
// Export the functions
extern "C"
{
EXPORT int XSDKPUSHBUTTON(LPSTR stext, int ixpos, int iypos, int iheight, int iwidth , int ibid);
}
int XSDKPUSHBUTTON(LPSTR stext, int ixpos, int iypos, int iheight, int iwidth , int ibid)
{
CreateWindowEx(NULL,
"button",
stext,
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
ixpos, iypos,
iwidth, iheight,
NULL,
(HMENU) (ibid),
NULL,
NULL);
return(0);
}
"A book. If u know something why cant u make a kool game or prog.
come on now. A book. I hate books. book is stupid. I know that I need codes but I dont know the codes"