mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-03 16:10:50 +00:00
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@336 b9cfdab3-6d41-4d17-bbe4-086880011989
25 lines
674 B
C
25 lines
674 B
C
/* $Id$ */
|
|
#include <Mw/Milsko.h>
|
|
|
|
int main(){
|
|
MwWidget w = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 640, 480,
|
|
MwNtitle, "test",
|
|
NULL);
|
|
MwWidget lb = MwCreateWidget(MwListBoxClass, "listbox", w, 5, 5, 630, 470);
|
|
char* str[512];
|
|
int i;
|
|
|
|
for(i = 0; i < sizeof(str) / sizeof(str[0]); i++){
|
|
str[i] = malloc(16);
|
|
sprintf(str[i], "element %d", i);
|
|
}
|
|
|
|
MwListBoxInsertMultiple(lb, -1, str, sizeof(str) / sizeof(str[0]));
|
|
|
|
for(i = 0; i < sizeof(str) / sizeof(str[0]); i++){
|
|
free(str[i]);
|
|
}
|
|
|
|
MwLoop(w);
|
|
}
|