TextWindow::DrawText

Displays a string in the Detail Result Display window

int DrawText(
   int  colorKind,
   int  newLine,
   TCHAR        *format [,
                argment] ...
);

int DrawText(
   COLORREF     color,
   int  newLine,
   TCHAR        *format [,
                argment] ...
);

Parameters
colorKind
Color of the text to be drawn
1 (JUDGE_OK): OK color (black)
-1 (JUDGE_NG): NG color (red)
0 (JUDGE_NC): Gray
color
Color of the text to be drawn
newLine
Specifies whether or not to insert a line break after drawing the specified string
TRUE: Insert a line break after drawing
FALSE: Do not insert a line break after drawing
*format
Formatting string (compliant with sprintf() specification)
argument
Optional argument (compliant with sprintf() specification)

Return Value
Returns 0 when the string is successfully displayed.
Otherwise returns a non-zero value.

Description
Draws a string in the Detail Result Display window.

Example
    int Sample::MeasureDispT(ProcUnit *ptrProcUnit, int subNo, TextWindow *ptrTextWindow)
    {
        MEASUREDATA *ptrMeasureData;

        ptrMeasureData = ptrProcUnit->GetMeasureData();

        // Display measurement results

        DrawText(JUDGE_OK, TRUE, _T("Correlation = %3d"), ptrMeasureData->corr);
        DrawText(JUDGE_OK, TRUE, _T("X Coordinate = %3d"), ptrMeasureData->measureX);
        DrawText(JUDGE_OK, TRUE, _T("Y Coordinate = %3d"), ptrMeasureData->measureY);
    }