Appendix A: System Routines — Windows
1157
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
WinBitmapGet
(continued)
Example:
short x, y, i;
WINDOW w1;
WIN_RECT r1 = {119,0,239,119}, r2 = {72,16,89,39};
BITMAP *Bitmap;
HANDLE h;
char Str[20];
if (WinOpen( &w1, &r1, WF_DUP_SCR )) {
WinActivate( &w1 );
WinClr( &w1 );
Str[18] = '\0';
for( i = 0; i <= 9; i++) {
memset( Str, '0' + i, 18 );
WinStrXY( &w1, 6, i*8+8, Str );
}
if ((h = HeapAlloc(WinBitmapSize(&w1,&r2))) != H_NULL) {
Bitmap = (BITMAP *) HeapDeref(h);
WinBitmapGet( &w1, &r2, Bitmap );
for (x = 12, y = 72; x <= 138; x += 18, y += 8)
WinBitmapPut( &w1, x, y, Bitmap, A_REPLACE );
HeapFree( h );
GKeyIn(NULL,0);
}
WinClose( &w1 );
}