Hello everybody!
Do you know why this does not work? My problem is, that I cannot see any output on my window.
x is a public member variable of the class CMyMainWindow.
void CMyMainWindow::OnPaint()
{
CPaintDC dc(this);
RECT rect;
GetClientRect(&rect);
char text[128];
text[0] = 0;
if( -1 < x
&& x < SIZE
)
sprintf( text,"Results for x = %d", x );
if ( text[0] != 0 )
dc.TextOut( 600, 40, text );
}
void CMyMainWindow::OnRun()
{
MfContour2D* pContour = 0;
while( x >= (-1)
&& x < SIZE
)
{
x = ( x < 255 ) ? ( x + 1 ) : x;
sphere.LayerExtraction( x, 'x' );
pContour = sphere.ShapeSearch( gs_off,gs_d,gs_max, x );
if ( pContour != 0 )
{
InvalidateRect( NULL );
// If I call OnPaint as below, it works, with some changing in the definition of OnPaint of course.
//OnPaint( pContour );
}
}
}
Thanks, for your help!
Do you know why this does not work? My problem is, that I cannot see any output on my window.
x is a public member variable of the class CMyMainWindow.
void CMyMainWindow::OnPaint()
{
CPaintDC dc(this);
RECT rect;
GetClientRect(&rect);
char text[128];
text[0] = 0;
if( -1 < x
&& x < SIZE
)
sprintf( text,"Results for x = %d", x );
if ( text[0] != 0 )
dc.TextOut( 600, 40, text );
}
void CMyMainWindow::OnRun()
{
MfContour2D* pContour = 0;
while( x >= (-1)
&& x < SIZE
)
{
x = ( x < 255 ) ? ( x + 1 ) : x;
sphere.LayerExtraction( x, 'x' );
pContour = sphere.ShapeSearch( gs_off,gs_d,gs_max, x );
if ( pContour != 0 )
{
InvalidateRect( NULL );
// If I call OnPaint as below, it works, with some changing in the definition of OnPaint of course.
//OnPaint( pContour );
}
}
}
Thanks, for your help!