www.pudn.com > CADimage.rar > MainWindow.h, change:2005-04-12,size:2754b
#include "Window.h"
#include "cadimage.h"
const float ROTATION_ANGLE = 10.0f;
const int QUANTITY_OF_PARTS = 2;
const int QUANTITY_OF_BUTTONS = 8;
const int TOOLBAR_BUTTON_SIZE = 26;
const int COMBOBOX_ITEM_SIZE = 20;
const int TOOLBAR_SIZE = 32;
class CMainWindow : public CWindow
{
#ifndef CS_STATIC_DLL
static CADLAYER CADLayer;
static CADLAYERCOUNT CADLayerCount;
static CADLAYERVISIBLE CADLayerVisible;
static CADVISIBLE CADVisible;
static CLOSECAD CloseCAD;
static CREATECAD CreateCAD;
static CADLAYOUT CADLayout;
static CADLAYOUTNAME CADLayoutName;
static CADLAYOUTSCOUNT CADLayoutsCount;
static CADLAYOUTVISIBLE CADLayoutVisible;
static CURRENTLAYOUTCAD CurrentLayoutCAD;
static DEFAULTLAYOUTINDEX DefaultLayoutIndex;
static DRAWCADEX DrawCADEx;
static DRAWCADTOJPEG DrawCADtoJpeg;
static GETBOXCAD GetBoxCAD;
static GETEXTENTSCAD GetExtentsCAD;
static GETIS3DCAD GetIs3dCAD;
static GETPOINTCAD GetPointCAD;
static RESETDRAWINGBOXCAD ResetDrawingBoxCAD;
static SETDRAWINGBOXCAD SetDrawingBoxCAD;
static SETPROCESSMESSAGESCAD SetProcessMessagesCAD;
static SETROTATECAD SetRotateCAD;
HINSTANCE CADDLL;
#endif
BOOL drag;
BYTE DrwMode;
COLORREF colorBgrnd;
FRECT frectExtentsCAD;
HANDLE CADImage;
HBRUSH brushBackground;
HCURSOR curWait, curHand, curTarget, curDefault;
POINT offset;
POINTS oldPoint;
float fAbsWidth, fAbsHeight;
FPOINT ScaleRect;
FRECT rectDrawingBox;
double fKoef;
int nScale;
static bool IsAppChangingList;
bool Is3D();
void DestroyLayersDlg();
void DoMousePosition(POINTS PointOnScr);
void FillLayersList();
static BOOL CALLBACK LayersDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
void SplitStatusBar(int nParts= QUANTITY_OF_PARTS);
void RecalculateExtents();
public:
bool bRotated3D, bIsRotated, bIsDrawingBox;
HINSTANCE hInstance;
HWND hwndStatusBar, hwndToolBar, hwndComboBox;
static HWND hwndLayersDlg;
CMainWindow(LPSTR, WNDPROC, HINSTANCE, HICON, HICON, LPSTR, HBRUSH, UINT);
virtual ~CMainWindow();
void Load();
void Draw();
void LButtonDown(POINTS);
void LButtonUp(POINTS);
void MouseMove(POINTS);
void ChangeView(BYTE);
void DoCreateStatusBar(HWND hwndParent, HINSTANCE hInst);
void DoCreateToolBar(HWND hwndParent, HINSTANCE hInst);
void DoCreateComboBox(HINSTANCE hInst);
void ResetDrawingBox();
void ReSize(WPARAM wParam,LPARAM lParam);
void RotateCAD(const AXES axis, const float angle);
void SaveAs();
void SetDrawingBox();
void SetBgrndColor(const COLORREF color);
bool SetCurrentLayout();
void SetTextToStatusBar(LPSTR str, int part = 0);
void SetScale(int);
void ShowLayersDlg(bool Visible=true);
};