/programs/bcc32/examples/window/window.cpp |
---|
20,9 → 20,28 |
void KolibriOnPaint(void) |
{ |
DrawButton(2,0xB0B0B0, 10,10,50,20); |
DrawButton(1,0xB0B0B0, 10,10,50,20); |
DrawText(15, 15, 0, string); |
DrawButton(2,0xff0000, 10,40,50,20); |
DrawButton(3,0x00ff00, 70,10,50,20); |
DrawButton(4,0x0000ff, 70,40,50,20); |
} |
void KolibriOnButton(long id, TThreadData th) |
{ |
switch(id){ |
case 2: |
SetWindowCaption("Red"); |
break; |
case 3: |
SetWindowCaption("Green"); |
break; |
case 4: |
SetWindowCaption("Blue"); |
//break; |
}; |
} |
/* |
bool KolibriOnClose(TThreadData th) |
{ |
return true; |
37,3 → 56,4 |
GetKey(); |
} |
void KolibriOnMouse(TThreadData th) {} |
*/ |
/programs/bcc32/examples/window/window_cpp.bat |
---|
1,10 → 1,14 |
kos32-bcc -S -v- -R- -6 -a4 -O2 -Og -Oi -Ov -OS -k- -D__KOLIBRI__ -I..\..\..\bcc32\include window.cpp |
echo STACKSIZE equ 102400 \n HEAPSIZE equ 102400 \n include "..\..\..\proc32.inc" \ninclude "..\..\..\bcc32\include\kos_start.inc" \n include "..\..\..\bcc32\include\kos_func.inc" \n include "..\..\..\bcc32\include\kos_heap.inc" > kos_make.inc |
echo STACKSIZE equ 102400> kos_make.inc |
echo HEAPSIZE equ 102400>> kos_make.inc |
echo include "..\..\..\bcc32\include\kos_start.inc">> kos_make.inc |
echo include "..\..\..\bcc32\include\kos_func.inc">> kos_make.inc |
echo include "..\..\..\bcc32\include\kos_heap.inc">> kos_make.inc |
echo include "kos_make.inc" > f_window.asm |
t2fasm < window.asm >> f_window.asm |
fasm f_window.asm window.kex |
kpack window.kex |
del kos_make.inc |
if exist window.kex kpack window.kex |
if exist window.kex del kos_make.inc |
pause |