Page006
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
[[Page005]]
* 画像 document の実装 [#z661e847]
前節で見たように、Scroll window にとって必要なのは、表示...
元の text 表示機能も残そうとすると、基底 class を作って、...
// myconten.h
#ifndef MYCONTENT_H_INCLUDED
#define MYCONTENT_H_INCLUDED
#include <windows.h>
namespace mylib
{
class CMyContent
{
public:
static const int TYPE_UNKNOWN = 0;
static const int TEXT_PLAIN = 1;
static const int IMAGE_BMP = 11;
public:
virtual ~CMyContent();
virtual const SIZE& Size(HDC hdc);
virtual int Draw(HDC hdc, int x, int y, PAINTSTRUCT& ps);
protected:
CMyContent();
protected:
SIZE m_sz;
};
} // namespace mylib
#endif // MYCONTENT_H_INCLUDED
基底 class の関数を使って派生 class の関数を呼び出すわけ...
終了行:
[[Page005]]
* 画像 document の実装 [#z661e847]
前節で見たように、Scroll window にとって必要なのは、表示...
元の text 表示機能も残そうとすると、基底 class を作って、...
// myconten.h
#ifndef MYCONTENT_H_INCLUDED
#define MYCONTENT_H_INCLUDED
#include <windows.h>
namespace mylib
{
class CMyContent
{
public:
static const int TYPE_UNKNOWN = 0;
static const int TEXT_PLAIN = 1;
static const int IMAGE_BMP = 11;
public:
virtual ~CMyContent();
virtual const SIZE& Size(HDC hdc);
virtual int Draw(HDC hdc, int x, int y, PAINTSTRUCT& ps);
protected:
CMyContent();
protected:
SIZE m_sz;
};
} // namespace mylib
#endif // MYCONTENT_H_INCLUDED
基底 class の関数を使って派生 class の関数を呼び出すわけ...
ページ名: