Hi. I had same problem. Try this code:
char *sStart_pan; // this is a pointer to char array with code of panel
ev = engine_open(NULL);
if (!ev) return 1; // acknex.dll not found
//folder with button images
add_folder("%EXE_DIR%\\DATA\\Btn\\");
...
//Allocation of memory
sStart_pan = new char[strlen("bmap = Start_pan.jpg;\
button (381, 229, btnStart_d.jpg, btnStart_u.jpg, btnStart_u.jpg, meth1, NULL, NULL);\
flags = OVERLAY;")];
//copy code of panel to char array
strcpy(sStart_pan,"bmap = Start_pan.jpg;\
button (381, 229, btnStart_d.jpg, btnStart_u.jpg, btnStart_u.jpg, meth1, NULL, NULL);\
flags = OVERLAY;");
//create a new panel
Start_pan = pan_create(sStart_pan,1);
// make it visible
Start_pan->flags|=VISIBLE;
// wait some frame for visualisation of panel
for (int i=0; i<3; i++) engine_frame();
It's working on my computer.
The buttons is shown and method "meth1" is working.
I'm using MS Visual Studio 2005 and A7 engine (version 7.06.1)
With best regards.
Last edited by Olorin; 04/20/09 09:36.