forked from pyrite-dev/milsko
yeah
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@337 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
684b6e1d6d
commit
61772bf9ca
6 changed files with 1536 additions and 14 deletions
|
|
@ -1,24 +1,15 @@
|
|||
/* $Id$ */
|
||||
#include <Mw/Milsko.h>
|
||||
|
||||
#include "../resource/harvard.c"
|
||||
|
||||
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]);
|
||||
}
|
||||
MwListBoxInsertMultiple(lb, -1, (char**)harvard, sizeof(harvard) / sizeof(harvard[0]) - 1);
|
||||
|
||||
MwLoop(w);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue