00001
00002
00004
00005
#if !defined(AFX_RESIZEDLG_H__CBCB8815_7899_11D1_96A4_00C04FB177B1__INCLUDED_)
00006 #define AFX_RESIZEDLG_H__CBCB8815_7899_11D1_96A4_00C04FB177B1__INCLUDED_
00007
00008
#if _MSC_VER >= 1000
00009
#pragma once
00010
#endif // _MSC_VER >= 1000
00011
00012
#include "dlg.h"
00013
#include "list.h"
00014
#include "parentinfo.h"
00015
00016 typedef struct tagCHANNEL
00017 {
00018 int Pos;
00019 int Size;
00020 int iFixed;
00021 int iWeight;
00022 }
CHANNEL, *
PCHANNEL;
00023
00024
#undef PROPERTY
00025 #define PROPERTY(type, Name) public: void Set##Name( type v) { m_##Name=v; } type Get##Name() const {return m_##Name; } private: type m_##Name; public:
00026 typedef struct _tagSPECIAL
00027 {
00028 BOOL bSpecial;
00029 int iMin;
00030 int iMax;
00031 int iAlignment;
00032 int iDiff;
00033 }
SPECIAL, *
PSPECIAL;
00034
00035
00036 class CResizeDlg :
public CDlg
00037 {
00038 typedef CDlg BASECLASS;
00039
public:
00040
CResizeDlg(
int DlgID, HWND hWndParent, HINSTANCE hInst);
00041
virtual ~CResizeDlg();
00042
00043
virtual BOOL CALLBACK
DlgProc(HWND hDlg, UINT uMessage, WPARAM wParam, LPARAM lParam);
00044
PROPERTY(
int, NumCols );
00045
PROPERTY(
int, NumRows );
00046
PROPERTY( BOOL, Annotate);
00047
PROPERTY(
int, RowWeight);
00048
PROPERTY(
int, ColWeight);
00049
PROPERTY(
int, ControlCount);
00050
00051
00052
protected:
00053
void SpecialRowCol();
00054
void DeterminNumberOfControls();
00055
virtual void DoChangePos( WINDOWPOS * lpwp);
00056
int FindCol(
int pos);
00057
int FindRow(
int pos);
00058
void AddToSystemMenu();
00059
void DoInitDialog();
00060
void PlaceControls();
00061 LONG
HitTest(LONG lCurrent);
00062
virtual void DeterminWeights();
00063
void Annotate();
00064
void Sort(
CEdge **,
int iCount);
00065
void WalkControls();
00066
virtual void ResizeControls( WORD width, WORD height );
00067 CControlList m_ControlList;
00068 CParentInfo m_ParentInfo;
00069
00070
void FindControls();
00071
void MakeAttatchments();
00072
void FindBorders();
00073
void FindCommonGuides();
00074
void DeterminCols(
CEdge ** ppEdges,
int iCount);
00075
void DeterminRows(
CEdge ** ppEdges,
int iCount);
00076
00077 CHANNEL *
m_Rows;
00078 CHANNEL *
m_Cols;
00079
00080
virtual void AddGripper();
00081
virtual HDWP
SetGripperPos(HDWP hdwp);
00082 HWND
m_hwndGripper;
00083
00084 SPECIAL m_SpecialRow;
00085 SPECIAL m_SpecialCol;
00086 };
00087
00088
#undef PROPERTY
00089
#endif // !defined(AFX_RESIZEDLG_H__CBCB8815_7899_11D1_96A4_00C04FB177B1__INCLUDED_)
00090
00091
00092
00093
#if !defined(AFX_SCALEDLG_H__C4C6558B_9289_11D1_A5CC_00C04FB177B1__INCLUDED_)
00094 #define AFX_SCALEDLG_H__C4C6558B_9289_11D1_A5CC_00C04FB177B1__INCLUDED_
00095
00096
#if _MSC_VER >= 1000
00097
#pragma once
00098
#endif // _MSC_VER >= 1000
00099
00100
#include "ResizeDlg.h"
00101
00102 class CScaleDlg :
public CResizeDlg
00103 {
00104 typedef CResizeDlg BASECLASS;
00105
public:
00106
CScaleDlg(
int DlgID, HWND hWndParent, HINSTANCE hInst);
00107
virtual ~CScaleDlg();
00108
00109
protected:
00110
void DoChangePos( WINDOWPOS * lpwp);
00111 LONG
m_dwInitFontSize;
00112
void DeterminWeights();
00113
void ResizeControls(WORD width, WORD height);
00114
private:
00115 int dwLastCX;
00116 int dwLastCY;
00117 };
00118
00119
#endif // !defined(AFX_SCALEDLG_H__C4C6558B_9289_11D1_A5CC_00C04FB177B1__INCLUDED_)