home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 March / VPR9703A.ISO / VPR_DATA / DOGA / SOURCES / TCH2AVI.LZH / TSHWWNDW.CPP < prev    next >
C/C++ Source or Header  |  1996-05-16  |  1KB  |  75 lines

  1. /*  Project tch2avi
  2.     Project Team DoGA
  3.     Copyright (c) 1996. All Rights Reserved.
  4.  
  5.     サブシステム:    tch2avi.apx Application
  6.     ファイル:        tshwwndw.cpp
  7.     作成者:          Masamichi Takatsu
  8.  
  9.  
  10.     概要
  11.     ====
  12.     TShowWindow (TWindow) のインプリメンテーション用のソースファイル
  13. */
  14.  
  15. #include <owl\owlpch.h>
  16. #pragma hdrstop
  17.  
  18. #include "tshwwndw.h"
  19.  
  20. extern TDib *dib;
  21. extern char mess[256];
  22.  
  23. //{{TShowWindow Implementation}}
  24.  
  25.  
  26. TShowWindow::TShowWindow (TWindow* parent, const char far* title, TModule* module):
  27.     TWindow(parent, title, module)
  28. {
  29.     // ウィンドウの背景色を変更する
  30. //    SetBkgndColor(RGB(0xc0, 0xc0, 0xc0));
  31.  
  32.     // INSERT>> コンストラクタ用のコードはここに
  33.  
  34. }
  35.  
  36.  
  37. TShowWindow::~TShowWindow ()
  38. {
  39.     Destroy();
  40.  
  41.     // INSERT>> デストラクタ用のコードはここに
  42.  
  43. }
  44.  
  45. void TShowWindow::Redraw(void)
  46. {
  47.     if (dib) {
  48.  
  49. //        MoveWindow(0, 0, dib->Width(), dib->Height(), TRUE);
  50. //        TClientDC dc(*this);
  51. //        TRect clientRect(0,0,dib->Width(), dib->Height());
  52. //        dc.SetDIBitsToDevice(clientRect, TPoint(0,0), *dib);
  53. //        Invalidate();
  54.     }
  55. }
  56.  
  57.  
  58. void TShowWindow::Paint (TDC& dc, BOOL erase, TRect& rect)
  59. {
  60.     TWindow::Paint(dc, erase, rect);
  61.  
  62.     // INSERT>> 追加のコードはここに
  63.     dc.SelectObject(TPen(TColor::White));
  64.     dc.Rectangle(rect);
  65.  
  66.     if (dib) {
  67.         TRect clientRect(0,0,dib->Width(), dib->Height());
  68.         dc.SetDIBitsToDevice(clientRect, TPoint(0,0), *dib);
  69.     }
  70.     if (mess[0]) {
  71.         dc.TextOut(0,0,mess);
  72.     }
  73. }
  74.  
  75.