CODE:#define WS_CHILD 1073741824
#define WS_VISIBLE 268435456
#define WS_BORDER 8388608
#define CBS_DROPDOWNLIST 3
#define CB_ADDSTRING 323
#define CB_GETCURSEL 327
#define MIM_STYLE 16
#define MF_POPUP 16
external(INT, "CreateWindow", "CreateWindowExA", "User32.dll" );
external(INT, "CreateMenu", "CreateMenu", "User32.dll" );
external(INT, "AppendMenu", "AppendMenuA", "User32.dll" );
external(INT, "SetMenuInfo", "SetMenuInfo", "User32.dll" );
external(INT, "SetMenu", "SetMenu", "User32.dll" );
int MENUINFO[7] = {28, MIM_STYLE, 0, 0, 0, 0, 0};
int HMENU, HMENU1, HMENU2, HMENU3, SelectMenu;
win MainWindow, SecondaryWindow, Browser, Game;
//-----------------------------------------------------------------------------------------------------------------------------------------------------
int combo1;
char c[255];
string combo_text[4]={"qwe", "rty", "asd", "123"};
createdialog(0);
createdialog(1);
showdialog(0, "Диалог",100, 100, 300, 300, 1, 1);
function getmessage(0, WM_CREATE)
{
HMENU = CreateMenu();
AppendMenu(HMENU, MF_POPUP, 1, "Настройки" );
SetMenuInfo(HMENU, address(#MENUINFO[0]));
SetMenu(gethwnd(0), HMENU);
}
function getmessage(1, WM_CREATE)
{
combo1=CreateWindow(0, "COMBOBOX", "", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_BORDER, 10, 10, 110, 120, gethwnd(1), 0, 0, 0);
for(int i=0; i<sizearray(combo_text); i++)
{
strcpy(#c[0], combo_text[i]);
sendmessage(CB_ADDSTRING, 0, address(#c[0]), formatiw(combo1));
}
}
function getmessage(0, WM_COMMAND)
{
if(loword(message.wparam) == 1)
{
showdialog(1, "Диалог2",500, 100, 200, 200, 0, 1);
}
}
loop()
{
int StatusCombobox1=sendmessage(CB_GETCURSEL, 0, 0, formatiw(combo1));
textbkcolor(255, 65280);
textout(0, 150, 250, "Выбранная строка: "+format(StatusCombobox1), 1);
sleep(10);
}