CodePudding user response:
The main window will have black line, not perfect, - this code to analysis,Black line how to analyze,
CodePudding user response:
In case the WM_PAINT:MwforceNCpaint=TRUE;
Printf (" paint1 \ n ");
/* repaint the lower Windows before alpha blending this window */
+ + HWND - & gt; Unmapcount;/* tricky don 't clip this window */
SendMessage (rootwp WM_PAINT, 0, 0);
For (sibwp=HWND - & gt; Siblings; Sibwp; Sibwp=sibwp - & gt; Siblings)
SendMessage (sibwp WM_PAINT, 0, 0);
- the HWND - & gt; Unmapcount;
/* then queue repaint the for who Windows */
For (sibwp=HWND - & gt; The parent - & gt; The children; Sibwp!=HWND;
Sibwp=sibwp - & gt; Siblings)
/* don 't paint if already made by above code */
If (sibwp - & gt; PaintSerial!=mwpaintSerial)
PostMessage (sibwp WM_PAINT, 0, 0);
/* now paint this window offscreen and blend with screen */
HDC=BeginPaint (HWND, & amp; Ps);
GetClientRect (HWND, & amp; The rect);
/* redirect painting to offscreen dc */
HdcMem=CreateCompatibleDC (ps. HDC);
HBMP=CreateCompatibleBitmap (hdcMem, the rect. Right, the rect. Bottom);
HbmpOrg=SelectObject (hdcMem HBMP);
/* paint window to offscreen */
Gets=(HBRUSH) GetClassLong (HWND, GCL_HBRBACKGROUND);
FillRect (hdcMem, & amp; The rect, gets);
//SelectObject (hdcMem, GetStockObject (DEFAULT_GUI_FONT));
SetBkMode (hdcMem, TRANSPARENT);
The DEBUG (" flag_connect is % d \ n ", flag_connect);
Oldfont=SelectObject (HDC, font_chinese);
SetBkColor (HDC, RGB (100149237));
If (flag_connect==0)
{
//HDC=BeginPaint (HWND, & amp; Ps);
//GetClientRect (HWND, & amp; The rect);
//SetTextColor (HDC, 0 x004060a0);
//Jimmy + + + set the text color
//SetBkColor (HDC, RGB (255,00,00));
Printf (" paint2 \ n ");
For (num_time=0; Num_time & lt; 9. Num_time + +)
{
//the fgets (buf_log, sizeof (buf_log), fp_log);
SetRect (& amp; Rect_log [num_time], 20150 + 32 * num_time, 20 + 200150 + 20 + 32 * num_time);
DrawText (HDC, "", 1, & amp; Rect_log [num_time], DT_WORDBREAK);
}
For (num_time=0; Num_time & lt; 9. Num_time + +)
{
SetRect (& amp; Rect_right [num_time], 540150 + 32 * num_time, 540 + 80150 + 20 + 32 * num_time);
DrawText (HDC, "", 1, & amp; Rect_right [num_time], DT_WORDBREAK);
}
//DEBUG (" tm. TmHeight is % d tm. TmAveCharWidth is % d \ n ", tm. The tmHeight, tm. The tmAveCharWidth);
//SetRect (& amp; The rect, 20150, 20 + 200150 + 20);
Printf (" paint3 \ n ");
DrawText (HDC, "welcome to use jump day landing-answer", 1, & amp; Rect_log [0],
DT_WORDBREAK);
Cur_time (buf_showtime);
SetRect (& amp; Rect_top, 10, 20 + 80, + 500, + 40);
DrawText (HDC, buf_showtime, 1, & amp; Rect_top DT_WORDBREAK);
Edit=CreateWindowEx (0 l, "edit",
", "
WS_BORDER | WS_CHILD | WS_VISIBLE,//WS_VISIBLE, WS_DISABLED
10, 10, 500, 80,
HWND, (HMENU) 200, NULL, NULL);
//EndPaint (HWND, & amp; Ps);
}
Mydc=GetDC (HWND);
DrawDIB (mydc, 570, 15, & amp; Image_logo);
ReleaseDC (HWND, mydc);
DeleteObject (SelectObject (hdcMem, hbmpOrg));
DeleteDC (hdcMem);
//EndPaint (HWND, & amp; Ps);//
Printf (" paint4 \ n ");
break;
CodePudding user response:
This is they write redraw function, the if statement does not perform when redrawing, could you help me have a lookCodePudding user response:
What do you think is the WINDOWS programming?CodePudding user response:
I took over the project, in Windows source insight written inside