Механизмы параллельных вычислений в Windows. Разработка справочной системы
Рефераты >> Программирование и компьютеры >> Механизмы параллельных вычислений в Windows. Разработка справочной системы

};

if(strcmp(buf,"Т") == 0){

MoveToEx(hdc,x-50,y-50,NULL);

LineTo(hdc,x+50,y-50);

MoveToEx(hdc,x,y-50,NULL);

LineTo(hdc,x,y+50);

flag = true;

};

if(strcmp(buf,"_|_") == 0){

MoveToEx(hdc,x-50,y+50,NULL);

LineTo(hdc,x+50,y+50);

MoveToEx(hdc,x,y-50,NULL);

LineTo(hdc,x,y+50);

flag = true;

};

if(strcmp(buf,"Н") == 0){

MoveToEx(hdc,x-50,y-50,NULL);

LineTo(hdc,x-50,y+50);

MoveToEx(hdc,x-50,y,NULL);

LineTo(hdc,x+50,y);

MoveToEx(hdc,x+50,y-50,NULL);

LineTo(hdc,x+50,y+50);

flag = true;

};

if(strcmp(buf,"стрелка вверх") == 0){

MoveToEx(hdc,x-50,y,NULL);

LineTo(hdc,x,y-50);

LineTo(hdc,x+50,y);

MoveToEx(hdc,x,y-50,NULL);

LineTo(hdc,x,y+50);

flag = true;

};

if(strcmp(buf,"стрелка вниз") == 0){

MoveToEx(hdc,x-50,y,NULL);

LineTo(hdc,x,y+50);

LineTo(hdc,x+50,y);

MoveToEx(hdc,x,y-50,NULL);

LineTo(hdc,x,y+50);

flag = true;

};

if(strcmp(buf,"треугольник") == 0){

MoveToEx(hdc,x,y-50,NULL);

LineTo(hdc,x+50,y+50);

LineTo(hdc,x-50,y+50);

LineTo(hdc,x,y-50);

flag = true;

};

if(strcmp(buf,"нижний левый прямоугольный треугольник") == 0){

MoveToEx(hdc,x-50,y-50,NULL);

LineTo(hdc,x-50,y+50);

LineTo(hdc,x,y+50);

LineTo(hdc,x-50,y-50);

flag = true;

};

if(strcmp(buf,"нижний правый прямоугольный треугольник") == 0){

MoveToEx(hdc,x+50,y-50,NULL);

LineTo(hdc,x+50,y+50);

LineTo(hdc,x,y+50);

LineTo(hdc,x+50,y-50);

flag = true;

};

if(strcmp(buf,"верхний левый прямоугольный треугольник") == 0){

MoveToEx(hdc,x-50,y-50,NULL);

LineTo(hdc,x,y-50);

LineTo(hdc,x-50,y+50);

LineTo(hdc,x-50,y-50);

flag = true;

};

if(strcmp(buf,"верхний правый прямоугольный треугольник") == 0){

MoveToEx(hdc,x,y-50,NULL);

LineTo(hdc,x+50,y-50);

LineTo(hdc,x+50,y+50);

LineTo(hdc,x,y-50);

flag = true;

};

if(strcmp(buf,"квадрат с диагональю верх лево - низ право") == 0){

MoveToEx(hdc, x-50, y-50, NULL);

LineTo(hdc, x+50, y-50);

LineTo(hdc, x+50, y+50);

LineTo(hdc, x-50, y+50);

LineTo(hdc, x-50, y-50);

LineTo(hdc, x+50, y+50);

flag = true;

};

if(strcmp(buf,"квадрат с диагональю низ лево - верх право") == 0){

MoveToEx(hdc, x-50, y-50, NULL);

LineTo(hdc, x+50, y-50);

LineTo(hdc, x+50, y+50);

LineTo(hdc, x-50, y+50);

LineTo(hdc, x-50, y-50);

MoveToEx(hdc,x-50,y+50,NULL);

LineTo(hdc,x+50,y-50);

flag = true;

};

if(strcmp(buf,"квадрат с крестом") == 0){

MoveToEx(hdc, x-50, y-50, NULL);

LineTo(hdc, x+50, y-50);

LineTo(hdc, x+50, y+50);

LineTo(hdc, x-50, y+50);

LineTo(hdc, x-50, y-50);

LineTo(hdc, x+50, y+50);

MoveToEx(hdc,x-50,y+50,NULL);

LineTo(hdc,x+50,y-50);

flag = true;

};

if(strcmp(buf,"левый треугольник") == 0){

MoveToEx(hdc,x-50,y,NULL);

LineTo(hdc,x+50,y-50);

LineTo(hdc,x+50,y+50);

LineTo(hdc,x-50,y);

flag = true;

};

if(strcmp(buf,"правый треугольник") == 0){

MoveToEx(hdc,x+50,y,NULL);

LineTo(hdc,x-50,y-50);

LineTo(hdc,x-50,y+50);

LineTo(hdc,x+50,y);

flag = true;

};

if(strcmp(buf,"стрелка влево") == 0){

MoveToEx(hdc,x,y-50,NULL);

LineTo(hdc,x-50,y);

LineTo(hdc,x,y+50);

MoveToEx(hdc,x-50,y,NULL);

LineTo(hdc,x+50,y);

flag = true;

};

if(strcmp(buf,"стрелка вправо") == 0){

MoveToEx(hdc,x,y-50,NULL);

LineTo(hdc,x+50,y);

LineTo(hdc,x,y+50);

MoveToEx(hdc,x-50,y,NULL);

LineTo(hdc,x+50,y);

flag = true;

};

if(strcmp(buf,"круг") == 0){

Ellipse(hdc,x-50,y-50,x+50,y+50);

flag = true;

};

if(strcmp(buf,"прямоугольник без углов") == 0){

RoundRect(hdc,x-50,y-30,x+50,y+30,50,50);

flag = true;

};

};

SelectObject(hdc,hOldBrush);

DeleteObject(hBrush);

SelectObject(hdc,hPenOld);

DeleteObject(hPen);

}

//Файл Shapes.h

#define IDD_SELECT 3

#define IDD_ABOUT 2

#define IDC_OK1 104

#define IDC_STATICTEXT1 102

#define IDM_ABOUT 103

#define IDM_EXIT 102

#define IDS_NAME 101

#define IDD_MAIN 1

#define IDC_SELECT 105

#define IDC_LISTBOX1 101

#define IDC_BUTTON1 102

#define IDC_OK3 112

#define IDC_ADD 107

#define IDC_DELETE 108

#define IDC_LISTBOX2 106

#define IDC_CLEAR 111

#define IDC_OK2 110

#define IDC_LISTBOX3 109

/****************************************************************************

shapes.rc

produced by Borland Resource Workshop

*****************************************************************************/

#include "shapes.h"

IDD_MAIN DIALOG 0, 0, 343, 210

EXSTYLE WS_EX_APPWINDOW

STYLE DS_3DLOOK | WS_OVERLAPPED | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX

CAPTION "Shapes"

FONT 8, "MS Sans Serif"

{

CONTROL "Выбор", IDC_SELECT, "button", BS_PUSHBUTTON | BS_CENTER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 8, 8, 108, 14

CONTROL "ListBox1", IDC_LISTBOX1, "listbox", LBS_MULTIPLESEL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP, 8, 48, 108, 149

CONTROL "Нарисовать", IDC_OK3, "button", BS_PUSHBUTTON | BS_CENTER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 8, 28, 108, 13

}

STRINGTABLE

{

IDS_NAME, "Shapes"

}

IDD_ABOUT DIALOG 0, 0, 240, 50

STYLE DS_3DLOOK | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX

CAPTION ""

FONT 8, "MS Sans Serif"

{

CONTROL "OK", IDC_OK1, "button", BS_PUSHBUTTON | BS_CENTER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 164, 17, 56, 13

CONTROL "Здесь должна быть информация о приложении", IDC_STATICTEXT1, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 12, 13, 120, 22

}

IDD_SELECT DIALOG 0, 0, 389, 182

STYLE DS_MODALFRAME | DS_3DLOOK | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU

CAPTION "Выбор фигур"

FONT 8, "MS Sans Serif"

{

CONTROL "OK", IDC_OK2, "BUTTON", BS_PUSHBUTTON | BS_CENTER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 168, 16, 52, 14

CONTROL "ListBox1", IDC_LISTBOX3, "listbox", LBS_NOTIFY | LBS_MULTIPLESEL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, 4, 13, 156, 168

CONTROL "Добавить", IDC_ADD, "button", BS_PUSHBUTTON | BS_CENTER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 168, 39, 52, 14


Страница: