2013-03-30 13:05:37 -04:00
|
|
|
#pragma once
|
|
|
|
#ifndef id68C60174_0140_4DE1_B7255EFF557A74F9
|
|
|
|
#define id68C60174_0140_4DE1_B7255EFF557A74F9
|
|
|
|
|
|
|
|
#include <Window.hpp>
|
|
|
|
#include <MyDropTarget.hpp>
|
|
|
|
|
|
|
|
#include <commctrl.h>
|
|
|
|
#include <shellapi.h>
|
|
|
|
|
|
|
|
#define WM_CHANGETEXT (WM_USER+1)
|
|
|
|
|
|
|
|
class PreviewWindow : public Window {
|
|
|
|
public:
|
2013-08-26 16:52:47 -04:00
|
|
|
virtual LPCTSTR ClassName() { return L"Zalgo_Preview"; }
|
2013-03-30 13:05:37 -04:00
|
|
|
static PreviewWindow *Create(LPCTSTR szTitle);
|
|
|
|
void Destroy() { DestroyWindow(m_hwnd); }
|
2013-08-26 16:52:47 -04:00
|
|
|
|
|
|
|
void ChangeText(LPWSTR text, bool padding = true);
|
|
|
|
void SetFont(HFONT hFont);
|
|
|
|
void SetFont(const LOGFONT &lf);
|
2013-03-30 13:05:37 -04:00
|
|
|
protected:
|
|
|
|
LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnCreate();
|
|
|
|
LRESULT OnDestroy();
|
|
|
|
void OnPaint();
|
|
|
|
|
|
|
|
virtual HICON GetIcon();
|
|
|
|
private:
|
|
|
|
HFONT hFont;
|
2013-08-26 16:52:47 -04:00
|
|
|
bool used_logfont;
|
2013-03-30 13:05:37 -04:00
|
|
|
HBRUSH hBrush;
|
|
|
|
int xChar, yChar, xUpper, xClient, yClient, xClientMax, xPos, yPos;
|
|
|
|
LPTSTR *lpLines;
|
|
|
|
int lines;
|
|
|
|
bool empty;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // header
|