home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / S12733.ZIP / PAINT.C < prev    next >
C/C++ Source or Header  |  1989-06-29  |  498b  |  31 lines

  1. #define INCL_PM
  2.  
  3. #include <os2.h>
  4. #include <stddef.h>
  5. #include <string.h>
  6. #include "hello.h"
  7.  
  8. extern char szMessage[];
  9.  
  10. void HelloPaint(hWnd)
  11. HWND hWnd;
  12. {
  13. HPS    hPS;
  14. RECTL  rect;
  15.  
  16. hPS = WinBeginPaint( hWnd, (HPS)NULL,&rect);
  17.  
  18. WinFillRect(hPS,&rect,CLR_GREEN);
  19.  
  20. rect.xLeft=10;
  21. rect.xRight=200;
  22. rect.yBottom=2;
  23. rect.yTop=30;
  24.  
  25. #define TEXT "This is some text"
  26.  
  27. WinDrawText(hPS, strlen(TEXT), TEXT, &rect, CLR_BLACK, CLR_WHITE, DT_LEFT | DT_BOTTOM);
  28.  
  29. WinEndPaint(hPS);
  30. }
  31.