Waitrud Weber’s blog

things and reminders for memories

windows-make: WinAPI: The program could display objects.

The program displayed something but  didn't any other on the window.

We should code them well as maximum to full any software property anyway.

 

*

- source code - -
-

.\winmainthread_005a_006.cpp  File modified time Mon Mar 25 13:34:49 2024

0969 //
0970 int wm_paint_006_cell_004 () {
0971     // 5
0972     for ( i = 0; i<5; i++ ) {
0973         log_a[i] = dlog_001->log_list[ i + dlog_001->from ];
0974     }
0975     for ( i = 0; i<5; i++ ) {
0976         sprintf( log_cursol[i], "%d", i + dlog_001->from + 1);
0977     }
0978 
0979     hPen = CreatePen(PS_DASHDOT,1,RGB( 255, 255, 128));
0980     SelectObject(p_evt->hDc, hPen);
0981     SetBkColor(p_evt->hDc, RGB( 0, 128, 0));
0982     SelectObject(p_evt->hDc, CreateSolidBrush(RGB(0,128,0)));
0983     for ( i = 0; i<5; i++ ) {
0984         Rectangle( (HDC) hDC, rect_log[i].left, rect_log[i].top, rect_log[i].right, rect_log[i].bottom );
0985         Rectangle( (HDC) hDC, rect_log_cursol[i].left, rect_log_cursol[i].top, rect_log_cursol[i].right, rect_log_cursol[i].bottom );
0986     }
0987 
0988     hFont = CreateFont (13, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_SWISS, "Arial");
0989     hFont2 = (HFONT)SelectObject((HDC)hDC, hFont);
0990     SetTextColor( hDC, RGB( 255, 255, 128) );
0991     for ( i = 0; i<5; i++ ) {
0992         DrawText( (HDC) hDC, TEXT( log_a[i] ), -1, &rect_log[i], DT_LEFT );
0993         DrawText( (HDC) hDC, TEXT( log_cursol[i] ), -1, &rect_log_cursol[i], DT_LEFT );
0994     }
0995     return 0;
0996 }
0997 

- -
- - - -
- - - -
- - - -
- - - -
- - - -

 

*