面向对象编程技术实验报告
int penWidth; int penStyle; };
struct MySaveRectangle // 矩形保存 { POINT ptS; POINT ptE; COLORREF color; HBRUSH hNewBrush; int brushColor; int penWidth; int penStyle; };
struct MySaveEllipse // 椭圆保存 { POINT ptS; POINT ptE; COLORREF color; HBRUSH hNewBrush; int brushColor; int penWidth; int penStyle; };
struct MySaveText // 文本保存 { POINT pt; char g_EditInput[1024]; COLORREF crText; HFONT hFont; };
typedef struct tagDRAWDATA {
int iSelectionFunc; int iSelectionPenColor; int iSelectionPenStyle; int iSelectionPenWidth; int iSelectionBrush; HPEN hRedDashdotPen; HPEN hBlueSolidPen;
29
面向对象编程技术实验报告
int cxBeginPoint; int cyBeginPoint; int cxCurrPoint; int cyCurrPoint; BOOL bDrawing; }DRAWDATA;
void DrawMyLine(HDC hdc);
void DrawMyRectangle(HDC hdc); void DrawMyEllipse(HDC hdc); void ChooseFont(HWND hwnd); void ChooseColor(HWND hwnd); void DrawMyText(HDC hdc);
void SaveMyData(struct MySaveLine* SaveLine,int LineCount,struct MySaveRectangle* SaveRectangle,int RectangleCount,struct MySaveEllipse* SaveEllipse,int EllipseCount,struct MySaveText* SaveText,int TextCount);
void LoadMyData(struct MySaveLine* SaveLine,int LineCount,struct MySaveRectangle* SaveRectangle,int RectangleCount,struct MySaveEllipse* SaveEllipse,int EllipseCount,struct MySaveText* SaveText,int TextCount);
BOOL CALLBACK InputDlgProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
#endif
30
面向对象编程技术实验报告
31