CODE://C
external(INT, "CreateWindow", "CreateWindowExA", "User32.dll");
external(INT, "CreateMenu", "CreateMenu", "User32.dll");
//A
external(INT, "AppendMenu", "AppendMenuA", "User32.dll");
//S
external(INT, "SetMenuInfo", "SetMenuInfo", "User32.dll");
external(INT, "SetMenu", "SetMenu", "User32.dll" );
//-----------------------------------------------------------------------------------------------------------------------------------------------------
#definefile "C:\Users\Home\Desktop\МОЁ\Kibor\Constants.txt";
int Image_x[99], Image_y[99];
int Display_Color, Display_Width, Display_Height;
int MENUINFO[7] = {28, MIM_STYLE, 0, 0, 0, 0, 0};
int HMENU, HMENU1, HMENU2, HMENU3, HMENU4, SelectMenu;
win MainWindow, SecondaryWindow;
int Object_Scrollbar1;
int Srollbar1_Min = 0, Srollbar1_Max = 100, Srollbar1_Pos = 0, Up_Controls, Down_Controls;
//-----------------------------------------------------------------------------------------------------------------------------------------------------
getdisplay(Display_Color, Display_Width, Display_Height);
createdialog(0);
createdialog(1);
showdialog(0, "Основной", Display_Width/2-450, Display_Height/2-400, 700, 400, 4, 1);
setwindowparam(MainWindow);
//-----------------------------------------------------------------------------------------------------------------------------------------------------
while(window("Основной") == 0)
{
sleep(10);
}
else
{
//Window_Adjust();
//Window_Topmost();
}
//-----------------------------------------------------------------------------------------------------------------------------------------------------
loop()
{
sleep(10);
}
//-----------------------------------------------------------------------------------------------------------------------------------------------------
function getmessage(0, WM_CREATE)
{
MainWindow = formatiw(gethwnd(0));
HMENU = CreateMenu();
AppendMenu(HMENU, MF_POPUP, 1, "Настройки" );
AppendMenu(HMENU, MF_POPUP, 211, "Обновить" );
AppendMenu(HMENU, MF_POPUP, 111, "О программе" );
SetMenuInfo(HMENU, address(#MENUINFO[0]));
SetMenu(gethwnd(0), HMENU);
}
//-----------------------------------------------------------------------------------------------------------------------------------------------------
function getmessage(0, WM_COMMAND)
{
if(loword(message.wparam) == 1)
{
MainWindow = window("Основной");
showdialog(1, "Настройки", MainWindow.left+100, MainWindow.top+100, 525, 500, 4, 1);
setwindowparam(SecondaryWindow);
}
}
//-----------------------------------------------------------------------------------------------------------------------------------------------------
function getmessage(1, WM_CREATE)
{
Object_Scrollbar1 = CreateWindow(0, "SCROLLBAR", 0, WS_VISIBLE | WS_CHILD | SBS_VERT, 10, 10, 20, 200, gethwnd(1), 0, 0, 0);
}
//-----------------------------------------------------------------------------------------------------------------------------------------------------