As subjected,I tested on windows 7 with MessageBoxA function:
Code: Select all
import "ecere"
#ifdef win32
#include "windows.h"
#endif
class Form1 : Window
{
text = "调用WIN32API";
background = activeBorder;
borderStyle = sizable;
hasMaximize = true;
hasMinimize = true;
hasClose = true;
size = { 440, 232 };
anchor = { horz = -68, vert = -100 };
//icon = { "C:\\person\\DevcppIcons\\dbnavedit.png", transparent = true };
Button btnHello
{
this, text = "(M)欢迎", altM, size = { 90, 29 }, position = { 48, 152 };
bool NotifyClicked(Button button, int x, int y, Modifiers mods)
{ #ifdef win32
MessageBoxA(0,"Caption","a message string",MB_OK|MB_ICONINFORMATION);
#endif
return true;
}
};
Button btnQuit
{
this, text = "(Q)退出", altQ, size = { 84, 29 }, position = { 312, 152 };
bool NotifyClicked(Button button, int x, int y, Modifiers mods)
{
this.Destroy(0);
return true;
}
};
}
Form1 form1 {};
Code: Select all
form1.ec:1:1: error: Couldn't open obj/release.win32\form1.sym