|
|
Microsoft OS/2 SDK PM 08-08-1988
/****************************************************************************
PROGRAM: line.c Created by Microsoft Corp., 1988
PURPOSE: Demonstrate the color, line, arc, and retained
drawing capabilities of the MS OS/2 Presentation Manager.
FUNCTIONS:
GENERICWNDPROC
ABOUT
ARCPDLGPROC
FIL_S_DLGPROC
COMMENTS:
This code demonstrates some of the features of GPI, the Graphics
Programming Interface for MS OS/2. The user interface consists of
menus, dialogs, and message boxes.
You can use menu selections to:
o Erase the current screen contents
o Open a segment for retained drawing
o Save a segments contents
o Display a series of segments
o Select line widths ranging from 2 to 50 pels
o Select a line color from one of the 16 default colors
o Select a line-end style
o Select a line-join style
o Select a foreground line mix mode
o Plot an x- and y-axis for arc and ellipse drawing
o Draw 3 types of arcs
o Collect points for fillet and spline drawings
o Draw fillets and splines
You can draw lines by pressing the left-most mouse button and
dragging the mouse.
You can collect points for fillets and splines by clicking the
leftmost button when the mouse cursor is at the appropriate
position in the window's client area.
****************************************************************************/
#include "line.h"
HAB hab; /* handle to the anchor block */
HMQ hmq; /* handle to the message queue */
HPS hps; /* handle to the presentation space */
SIZEL page; /* ps pagesize */
HDC hdc; /* device context handle */
LONG width = 2; /* wide-line width */
POINTL point1, point2; /* pel points */
POINTL cur_pos, prev_pos, point; /* points used in tracking mouse */
LONG larray[4]; /* array of fillet sharpness values */
POINTL farray[20]; /* array fillet & spline params */
LONG m; /* full arc multiplier */
BOOL draw_full_arc, draw_geom_line, collect_points, geom_line_flag = 1;
LONG seg_num=0; /* unique segment identifier */
LONG i,j, point_count; /* loop counter */
POINTL parray[4] = { 10,10, 50,50, 200,10, 10,10 };
LONG bflWinStyle; /* window style */
CHAR str[80]; /* char string from sprintf */
LINEBUNDLE pbundle; /* attribute bundle pointer */
SHORT lP, lQ, lR, lS; /* temporary arc parameters */
ARCPARAMS arcparams; /* arc parameters */
POINTL arc_array[2] = {450, 150, 550, 100}; /* params for point arc */
CHAR szClassName[] = "Line"; /* window class name */
HWND hwndClient; /* handle to the client */
HWND hwndFrame; /* handle to the frame window */
QMSG qmsg; /* message queue structure */
VOID cdecl main() {
hab = WinInitialize(NULL);
hmq = WinCreateMsgQueue(hab, 0);
if (!WinRegisterClass(hab, szClassName, GenericWndProc, CS_SIZEREDRAW, 0))
DosExit(EXIT_PROCESS, 1);
bflWinStyle = FCF_SYSMENU | FCF_TITLEBAR | FCF_SIZEBORDER | FCF_MINMAX |
FCF_MENU;
if (!(hwndFrame = WinCreateStdWindow(HWND_DESKTOP, 0L, &bflWinStyle,
szClassName, "Line Graphics", 0L, NULL, ID_RESOURCE, &hwndClient)))
DosExit(EXIT_PROCESS, 1);
WinSetWindowPos(hwndFrame, NULL, 0, 0, 639, 349,
SWP_SIZE | SWP_MOVE | SWP_SHOW);
/* obtain a handle to a window DC */
hdc = WinOpenWindowDC(hwndClient);
/* create a ps */
hps = GpiCreatePS (hab, /* handle to anchor block */
hdc, /* handle to window DC */
&page, /* page size is 0 by 0 */
PU_PELS | GPIA_ASSOC); /* map 1 world coordinate to 1
* pel, associate the new ps
* with hdc
*/
GpiSetMarker(hps, MARKSYM_SMALLCIRCLE);
while (WinGetMsg(hab, &qmsg, NULL, 0, 0))
WinDispatchMsg(hab, &qmsg);
WinDestroyWindow(hwndFrame);
WinDestroyMsgQueue(hmq);
WinTerminate(hab);
DosExit(EXIT_PROCESS, 0);
}
/****************************************************************************
FUNCTION: GenericWndProc(HWND, USHORT, MPARAM, MPARAM)
PURPOSE: Processes messages
MESSAGES:
WM_COMMAND - input received
WM_PAINT - paint the window
****************************************************************************/
MRESULT FAR PASCAL GenericWndProc(hwnd, usMessage, mp1, mp2)
HWND hwnd;
USHORT usMessage;
MPARAM mp1;
MPARAM mp2;
{
RECTL rcl;
HWND hMenu; /* handle to the System menu */
POINTL point1, point2; /* point structures */
RECTL rect; /* rect structure */
CHAR str[126]; /* array of characters */
HPS hgpi; /* special ps for repainting */
switch (usMessage) {
case WM_COMMAND:
switch (LOUSHORT (mp1)) {
/*
* ABOUT menu case statement
*/
case IDM_ABOUT:
WinDlgBox(HWND_DESKTOP, hwndFrame, About, NULL, ID_ABOUT,
NULL);
return 0L;
/*
* LINE menu case statement
*/
case IDM_DR_LINE:
geom_line_flag = TRUE;
collect_points = FALSE;
return 0L;
/*
* ARC menu case statements
*/
case IDM_AR_PARM: /* display arc param dialog box */
WinDlgBox(HWND_DESKTOP,
hwndFrame,
(PFNWP)ArcPDlgProc,
NULL,
IDDLG_ARCP,
NULL);
return 0L;
case IDM_AR_AXIS: /* draw cartesian coord system */
point1.x = 500; point1.y = 200;
GpiMove(hps, &point1);
DrawAxis(hps, &point1);
return 0L;
case IDM_AR_FULL: /* draw a full arc */
point1.x = 500; point1.y = 200;
GpiMove(hps, &point1);
GpiFullArc(hps, DRO_OUTLINE, 50L * 65536L);
return 0L;
case IDM_AR_3PNT: /* draw a 3 point arc */
point1.x = 500; point1.y = 200;
GpiMove(hps, &point1);
GpiPointArc(hps, arc_array);
return 0L;
case IDM_AR_PRTL: /* draw a partial arc */
point1.x = 500; point1.y = 200;
GpiPartialArc(hps,
&point1, /* arc's center */
50L * 65536L,/* radii multiplier */
0L, /* start angle=0 * 65536 */
5898240L); /* sweep angle=90 * 65536 */
return 0L;
case IDM_AR_CPNT: /* collect points for fillet or spline */
draw_geom_line = FALSE;
geom_line_flag = FALSE;
collect_points = TRUE;
i = 0;
return 0L;
case IDM_AR_SPLN: /* draw spline using collected points */
collect_points = FALSE;
if (!(j = --i % 3)){ /* check for mult. of 3 points */
j = i; /* set up j for polyspline call */
for (i = 0; i<=j; i++){ /* shift elements */
farray[i].x = farray[i+1].x;
farray[i].y = farray[i+1].y;
}
farray[i].x = farray[i+1].x; farray[i].y = farray[i+1].y;
GpiQueryCurrentPosition(hps, &cur_pos);
GpiPolySpline(hps, j, farray);
for (i = 0; i<=j; i++){
farray[i].x = 0;
farray[i].y = 0;
}
i = 0;
}
else
{
sprintf(str,"((Number_of_Points - 1) mod 3) != 0");
WinMessageBox(HWND_DESKTOP,
hwndClient,
str,
"Try Again...",
0,
MB_OK);
for (i = 0; i<20; i++){
farray[i].x = 0;
farray[i].y = 0;
}
i = 0;
}
return 0L;
case IDM_AR_SFLL: /* draw sharp fillet using collected pts */
collect_points = FALSE;
sprintf(str, "Plot 9 points. (If sharpness > 1, the fillet is a parabola, if sharpness < 0, the fillet is a hyperbola.) Four fillets will be drawn.");
WinMessageBox(HWND_DESKTOP,
hwndClient,
str,
"PolyFilletSharp",
0,
MB_OK);
WinDlgBox(HWND_DESKTOP,
hwndFrame,
(PFNWP)Fil_S_DlgProc,
NULL,
IDDLG_FSDP,
NULL);
j = i; /* set up j for polyspline call */
for (i = 0; i<=j; i++){ /* shift elements */
farray[i].x = farray[i+1].x;
farray[i].y = farray[i+1].y;
}
GpiPolyFilletSharp(hps,--j, farray, larray);
for (i = 0; i<=j; i++){
farray[i].x = 0;
farray[i].y = 0;
}
i = 0;
return 0L;
case IDM_AR_FLLT: /* draw fillet using collected points */
collect_points = FALSE;
sprintf(str, "This selection will draw multiple fillets.");
WinMessageBox(HWND_DESKTOP,
hwndClient,
str,
"PolyFillet",
0,
MB_OK);
GpiPolyFillet(hps,i, farray);
for (i = 0; i<20; i++){
farray[i].x = 0;
farray[i].y = 0;
}
i = 0;
return 0L;
/*
* QUERY menu case statement
*/
case IDM_QUERY: /* query the line attributes */
QueryLBundle();
return 0L;
/*
* WIDTH menu case statments
*/
case IDM_WI_2: /* set the line width to 2 pels */
width = 2;
return 0L;
case IDM_WI_5: /* set the line width to 5 pels */
width = 5;
return 0L;
case IDM_WI_10: /* set the line width to 10 pels */
width = 10;
return 0L;
case IDM_WI_15: /* set the line width to 15 pels */
width = 15;
return 0L;
case IDM_WI_20: /* set the line width to 20 pels */
width = 20;
return 0L;
case IDM_WI_25: /* set the line width to 25 pels */
width = 25;
return 0L;
case IDM_WI_50: /* set the line width to 50 pels */
width = 50;
return 0L;
/*
* LINE END menu case statements
*/
case IDM_LE_DEFAULT: /* set the lineend to default */
GpiSetLineEnd(hps, LINEEND_DEFAULT);
return 0L;
case IDM_LE_FLAT: /* set the lineend to flat */
GpiSetLineEnd(hps, LINEEND_FLAT);
return 0L;
case IDM_LE_SQUARE: /* set the lineend to square */
GpiSetLineEnd(hps, LINEEND_SQUARE);
return 0L;
case IDM_LE_ROUND: /* set the lineend to round */
GpiSetLineEnd(hps, LINEEND_ROUND);
return 0L;
/*
* LINE JOIN menu case statments
*/
case IDM_LI_DEFAULT: /* set the linejoin to default */
GpiSetLineJoin(hps, LINEJOIN_DEFAULT);
return 0L;
case IDM_LI_BEVEL:
GpiSetLineJoin(hps, LINEJOIN_BEVEL);
return 0L;
case IDM_LI_ROUND:
GpiSetLineJoin(hps, LINEJOIN_ROUND);
return 0L;
case IDM_LI_MITRE:
GpiSetLineJoin(hps, LINEJOIN_MITRE);
return 0L;
/*
* COLOR menu case statments
*/
case IDM_CO_BACKGROUND: /* set the color to background */
GpiSetColor(hps, CLR_BACKGROUND);
return 0L;
case IDM_CO_BLUE: /* set the color to blue */
GpiSetColor(hps, CLR_BLUE);
return 0L;
case IDM_CO_RED: /* set the color to red */
GpiSetColor(hps, CLR_RED);
return 0L;
case IDM_CO_PINK: /* set the color to pink */
GpiSetColor(hps, CLR_PINK);
return 0L;
case IDM_CO_GREEN: /* set the color to green */
GpiSetColor(hps, CLR_GREEN);
return 0L;
case IDM_CO_CYAN: /* set the color to cyan */
GpiSetColor(hps, CLR_CYAN);
return 0L;
case IDM_CO_YELLOW: /* set the color to yellow */
GpiSetColor(hps, CLR_YELLOW);
return 0L;
case IDM_CO_NEUTRAL: /* set the color to neutral */
GpiSetColor(hps, CLR_NEUTRAL);
return 0L;
case IDM_CO_DARKGRAY: /* set the color to darkgray */
GpiSetColor(hps, CLR_DARKGRAY);
return 0L;
case IDM_CO_PALEBLUE: /* set the color to paleblue */
GpiSetColor(hps, CLR_PALEBLUE);
return 0L;
case IDM_CO_PALERED: /* set the color to palered */
GpiSetColor(hps, CLR_PALERED);
return 0L;
case IDM_CO_PALEPINK: /* set the color to palepink */
GpiSetColor(hps, CLR_PALEPINK);
return 0L;
case IDM_CO_DARKGREEN: /* set the color to darkgreen */
GpiSetColor(hps, CLR_DARKGREEN);
return 0L;
case IDM_CO_DARKCYAN: /* set the color to darkcyan */
GpiSetColor(hps, CLR_DARKCYAN);
return 0L;
case IDM_CO_BROWN: /* set the color to brown */
GpiSetColor(hps, CLR_BROWN);
return 0L;
case IDM_CO_PALEGRAY: /* set the color to palegray */
GpiSetColor(hps, CLR_PALEGRAY);
return 0L;
/*
* MIX MODE menu case statments
*/
case IDM_MM_DEFAULT: /* set the mix mode to default */
GpiSetMix(hps, FM_DEFAULT);
return 0L;
case IDM_MM_OR: /* set the mix mode to or */
GpiSetMix(hps, FM_OR);
return 0L;
case IDM_MM_OVERPAINT: /* set the mix mode to overpaint */
GpiSetMix(hps, FM_OVERPAINT);
return 0L;
case IDM_MM_XOR: /* set the mix mode to xor */
GpiSetMix(hps, FM_XOR);
return 0L;
case IDM_MM_LEAVEALONE: /* set the mix mode to leavealone */
GpiSetMix(hps, FM_LEAVEALONE);
return 0L;
case IDM_MM_AND: /* set the mix mode to and */
GpiSetMix(hps, FM_AND);
return 0L;
case IDM_MM_SUBTRACT: /* set the mix mode to subtract */
GpiSetMix(hps, FM_SUBTRACT);
return 0L;
case IDM_MM_MASKSRCNOT: /* set the mixmode to masksrcnot */
GpiSetMix(hps, FM_MASKSRCNOT);
return 0L;
case IDM_MM_ZERO: /* set the mix mode to zero */
GpiSetMix(hps, FM_ZERO);
return 0L;
case IDM_MM_NOTMERGESRC: /* set the mix mode to notmergesrc */
GpiSetMix(hps, FM_NOTMERGESRC);
return 0L;
case IDM_MM_NOTXORSRC: /* set the mix mode to notxorsrc */
GpiSetMix(hps, FM_NOTXORSRC);
return 0L;
case IDM_MM_INVERT: /* set the mix mode to invert */
GpiSetMix (hps, FM_INVERT);
return 0L;
case IDM_MM_MERGESRCNOT: /* set the mix mode to mergesrcnot
GpiSetMix (hps, FM_MERGESRCNOT);
return 0L;
case IDM_MM_NOTCOPYSRC: /* setthe mix mode to notcopysrc */
GpiSetMix(hps, FM_NOTCOPYSRC);
return 0L;
case IDM_MM_MERGENOTSRC:/* set the mix mode to mergenotsrc */
GpiSetMix(hps, FM_MERGENOTSRC);
return 0L;
case IDM_MM_NOTMASKSRC: /* set the mix mode to notmasksrc */
GpiSetMix (hps, FM_NOTMASKSRC);
return 0L;
case IDM_MM_ONE: /* set the mix mode to one */
GpiSetMix(hps, FM_ONE);
return 0L;
/*
* SCREEN menu case statement
*/
case IDM_SC_ERASE: /* erase the screen */
WinQueryWindowRect(hwnd, &rcl);
WinFillRect(hps, &rcl, CLR_WHITE);
return 0L;
/*
* SEGMENT menu case statements
*/
case IDM_DR_DRAW1: /* open a segment for drawing */
GpiSetDrawingMode(hps,
DM_DRAWANDRETAIN);
GpiOpenSegment (hps,
++seg_num);
GpiSetSegmentAttrs (hps, seg_num, ATTR_CHAINED, ATTR_ON);
return 0L;
case IDM_DR_SAVE: /* close a segment and save its contents */
GpiCloseSegment (hps);
return 0L;
case IDM_DR_DRAW2: /* display all of the saved segments */
if (seg_num == 1)
GpiDrawSegment(hps, seg_num);
else
GpiDrawFrom(hps, 1L, seg_num);
return 0L;
}
return 0L;
/*
* User pressed the leftmost mouse button
*/
case WM_BUTTON1DOWN: /*...and they're drawing or collecting points */
if (geom_line_flag){ /* drawing wide lines */
cur_pos.x = (LONG) LOUSHORT(mp1); /* get the x-coordinate of the current pos */
cur_pos.y = (LONG) HIUSHORT(mp1); /* get the y-coord of the current pos */
GpiMove (hps, &cur_pos); /* move to the current pos */
draw_geom_line = TRUE;
}
if (collect_points){ /* collecting points */
cur_pos.x = (LONG) LOUSHORT(mp1); /* get the x-coordinate of the current pos */
cur_pos.y = (LONG) HIUSHORT(mp1); /* get the y-coord of the current pos */
if (i == 0){
point.x = cur_pos.x; point.y = cur_pos.y;
}
farray[i].x = cur_pos.x; farray[i++].y = cur_pos.y;
GpiMarker(hps, &cur_pos);
GpiSetCurrentPosition(hps, &point);
}
return TRUE;
/*
* User is dragging the mouse
*/
case WM_MOUSEMOVE: /*...and their drawing */
if (draw_geom_line)
{
cur_pos.x = (LONG) LOUSHORT(mp1); /* get the x-coord for the mouse */
cur_pos.y = (LONG) HIUSHORT(mp1); /* get the y-coord for the mouse */
DrawWideLine(hps, cur_pos); /* draw the line */
return TRUE;
}
return FALSE;
/*
* User released the leftmost mouse button
*/
case WM_BUTTON1UP: /*...stop all drawing */
draw_geom_line = FALSE;
return TRUE;
/*
* Paint the window
*/
case WM_PAINT:
hgpi = WinBeginPaint(hwnd, NULL, NULL);
GpiErase(hgpi);
WinEndPaint(hgpi);
break;
default:
return (WinDefWindowProc(hwnd, usMessage, mp1, mp2));
}
return (0L);
}
/****************************************************************************
FUNCTION: About(HWND, USHORT, MPARAM, MPARAM)
PURPOSE: Processes messages for "About" dialog box
MESSAGES:
WM_COMMAND - Input received
COMMENTS:
Wait for user to click on "Ok" button, then close the dialog box.
****************************************************************************/
MRESULT FAR PASCAL About(hwnd, usMessage, mp1, mp2)
HWND hwnd;
USHORT usMessage;
MPARAM mp1;
MPARAM mp2;
{
switch (usMessage) {
case WM_COMMAND:
switch (LOUSHORT(mp1)) {
case ID_OK:
WinDismissDlg(hwnd, 0);
break;
}
break;
default:
return (WinDefDlgProc(hwnd, usMessage, mp1, mp2));
}
return (0L);
}
/***************************************************************************
FUNCTION: DrawWideLine
PURPOSE: This function uses the coordinates of the cursor to draw
a line of specified width and color. (Note: since this is
a wide line, the drawing occurs within a path)
***************************************************************************/
DrawWideLine(hps, cur_pos)
HPS hps;
POINTL cur_pos;
{
GpiSetLineWidthGeom(hps, width);
GpiBeginPath(hps, 1L); /* start a path */
GpiLine(hps, &cur_pos);
GpiEndPath(hps);
GpiModifyPath(hps,
1L,
MPATH_STROKE);
GpiFillPath(hps,
1L,
FPATH_ALTERNATE);
}
/***************************************************************************
FUNCTION: ArcParam Dlg Proc
PURPOSE: This function processes the arc parameters and scaling factor
that the user enters.
COMMENTS: The application uses these values when it draws a full arc,
a partial arc, or, a three-point arc.
***************************************************************************/
MRESULT FAR PASCAL ArcPDlgProc(hwnd, Msg, lParam1, lParam2)
HWND hwnd;
USHORT Msg;
MPARAM lParam1;
MPARAM lParam2;
{
switch (Msg)
{
case WM_COMMAND:
switch (LOUSHORT (lParam1))
{
case DM_QUIT:
WinDismissDlg(hwnd, FALSE);
break;
case DM_OK:
/*
* Capture lP
*/
WinQueryDlgItemShort(hwnd,
DM_LP,
&lP,
0);
/*
* Capture lQ
*/
WinQueryDlgItemShort(hwnd,
DM_LQ,
&lQ,
0);
/*
* Capture lR
*/
WinQueryDlgItemShort(hwnd,
DM_LR,
&lR,
0);
/*
* Capture lS
*/
WinQueryDlgItemShort(hwnd,
DM_LS,
&lS,
0);
arcparams.lP = (LONG)(lP);
arcparams.lQ = (LONG)(lQ);
arcparams.lR = (LONG)(lR);
arcparams.lS = (LONG)(lS);
GpiSetArcParams(hps, &arcparams);
WinDismissDlg(hwnd, TRUE);
break;
default:
break;
}
break;
default:
return WinDefDlgProc (hwnd, Msg, lParam1, lParam2);
}
return 0L;
}
/***************************************************************************
FUNCTION: QueryLBundle
PURPOSE: Query the line attribute structure and print attributes
in a message box
***************************************************************************/
QueryLBundle()
{
GpiQueryAttrs(hps,
PRIM_LINE,
LBB_COLOR | LBB_MIX_MODE | LBB_WIDTH |
LBB_GEOM_WIDTH | LBB_TYPE | LBB_END |
LBB_JOIN,
&pbundle);
sprintf(str, "Color %ld Mix %d C_Width %ld G_Width %ld Type %d End %d Join %d", pbundle.lColor, pbundle.usMixMode, pbundle.fxWidth, pbundle.lGeomWidth, pbundle.usType, pbundle.usEnd, pbundle.usJoin);
WinMessageBox(HWND_DESKTOP,
hwndClient,
str,
"Line Attributes",
0,
MB_OK);
}
/***************************************************************************
FUNCTION: DrawAxis()
PURPOSE: Plots a Graph that identifies origin for full arcs
***************************************************************************/
DrawAxis(hps, pOrigin)
HPS hps;
PPOINTL pOrigin;
{
POINTL start, end; /* points for axis plotting */
LONG color; /* old color */
color = GpiQueryColor(hps);
GpiSetColor (hps, CLR_BLUE);
/* plot y-axis */
start.x = pOrigin->x; start.y = 600;
end.x = start.x; end.y = 5;
DrawLine(hps, &start, &end);
/* plot x-axis */
start.x = 5; start.y = pOrigin->y;
end.x = 810; end.y = start.y;
DrawLine(hps, &start, &end);
/* plot units along x-axis */
start.x = 300; start.y = 202;
end.x = 300; end.y = 198;
DrawLine(hps, &start, &end);
start.x = 400; start.y = 202;
end.x = 400; end.y= 198;
DrawLine(hps, &start, &end);
start.x = 600; start.y = 202;
end.x = 600; end.y = 198;
DrawLine(hps, &start, &end);
start.x = 700; start.y = 202;
end.x = 700; end.y = 198;
DrawLine(hps, &start, &end);
/* plot units along y-axis */
start.x = 497; start.y = 400;
end.x = 502; end.y = 400;
DrawLine(hps, &start, &end);
start.x = 497; start.y = 300;
end.x = 502; end.y = 300;
DrawLine(hps, &start, &end);
start.x = 497; start.y = 100;
end.x = 502; end.y = 100;
DrawLine(hps, &start, &end);
GpiSetColor(hps, color);
}
/***************************************************************************
FUNCTION: DrawLine(start, end)
PURPOSE: Draws a line from a starting point to an ending point
***************************************************************************/
DrawLine(hps, pStart, pEnd)
HPS hps;
PPOINTL pStart;
PPOINTL pEnd;
{
POINTL start, end; /* start and end points */
start.x = pStart->x; start.y = pStart->y;
end.x = pEnd->x; end.y = pEnd->y;
GpiMove(hps, &start);
GpiLine(hps, &end);
}
MRESULT FAR PASCAL Fil_S_DlgProc(hwnd, Msg, lParam1, lParam2)
HWND hwnd;
USHORT Msg;
MPARAM lParam1;
MPARAM lParam2;
{
switch (Msg)
{
case WM_COMMAND:
switch (LOUSHORT (lParam1))
{
case DM_QUITF:
WinDismissDlg(hwnd, FALSE);
break;
case DM_OKF:
/*
* Capture Sharpness for Fillet1
*/
WinQueryDlgItemShort(hwnd,
DM_S1,
&lP,
1);
/*
* Capture Sharpness for Fillet2
*/
WinQueryDlgItemShort(hwnd,
DM_S2,
&lQ,
1);
/*
* Capture Sharpness for Fillet3
*/
WinQueryDlgItemShort(hwnd,
DM_S3,
&lR,
1);
/*
* Capture Sharpness for Fillet4
*/
WinQueryDlgItemShort(hwnd,
DM_S4,
&lS,
1);
larray[0] = (LONG)(65536 * lP);
larray[1] = (LONG)(65536 * lQ);
larray[2] = (LONG)(65536 * lR);
larray[3] = (LONG)(65536 * lS);
WinDismissDlg(hwnd, TRUE);
break;
default:
break;
}
break;
default:
return WinDefDlgProc (hwnd, Msg, lParam1, lParam2);
}
return 0L;
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.