Objects flashing still on the windows thread.
We've already known the solution of it, which is prepared other window which is message lines better.
Printing end messages on that window, we could see the objecst not flashing because sycronization of other window becomes well.
---
464 :// 465 :void wButtonController::ProcessWmPaint () { 466 : static char ex_str[2048]; 467 : static char str[2048]; 468 : static char num_str[2048]; 469 : static char pastestr[1024]; 470 : 471 : //PAINTSTRUCT ps; 472 : RECT msg_key, msg_clip, msg_replace; 473 : FILE * pFile; 474 : RECT msg; 475 : int succ = 0; 476 : 477 : //HDC hdc = BeginPaint(this->event->hWnd, &ps); 478 : HDC hdc = this->event->hDc; 479 : HPEN hPen = CreatePen(PS_DASHDOTDOT, 2, RGB( 0, 0, 0 ) ); 480 : 481 : int key_w = this->event->wParam; 482 : int key_l = this->event->lParam; 483 : 484 : itoa(key_w, num_str, 10); 485 : strcpy( str, "b key param: "); 486 : strcat( str, num_str ); 487 : 488 : itoa(key_l, num_str, 10); 489 : strcat( str, ":" ); 490 : strcat( str, num_str ); 491 : 492 : itoa(this->key_state, num_str, 10); 493 : strcat( str, ":" ); 494 : strcat( str, num_str ); 495 : 496 : itoa( this->CursolNumber, num_str, 10); 497 : strcat( str, ":" ); 498 : strcat( str, num_str ); 499 : 500 : printf("this->event->main_mode = %d\r\n", this->event->main_mode); 501 : 502 : switch ( this->event->main_mode ) { 503 : case -2: 504 : break; 505 : default: 506 : printf("default:\r\n"); 507 : SelectObject(hdc, hPen); 508 : 509 : // 100 510 : SetRect( &msg_key, 300, 100, 400, 250 ); 511 :// DrawText( hdc, TEXT((LPCSTR)str ), -1, &msg_key, DT_NOCLIP ); 512 : 513 : // 200 514 : SetRect(&msg_clip, 300, 200, 400, 250); 515 :// DrawText( hdc, TEXT( (LPCSTR)this->main_pastestr ), -1, &msg_clip, DT_NOCLIP); 516 : 517 : // 300 518 : SetRect(&msg_replace, 300, 300, 400, 350); 519 :// DrawText( hdc, TEXT((LPCSTR)this->main_replace_selection ), -1, &msg_replace, DT_NOCLIP); 520 : 521 : // message 522 : SetRect( &msg, 300, 400, 400, 450); 523 : if ( succ == -1 ) { 524 : 525 : DrawText( hdc, TEXT( "Could not read clipboard" ), -1, &msg, DT_NOCLIP); 526 : } else { 527 : 528 : ex_str[0] = '\0'; 529 : itoa( this->CursolNumber, num_str, 10); 530 : strcat( num_str, ":" ); 531 : strcat( ex_str, num_str ); 532 : itoa( this->succ_paste, num_str, 10); 533 : strcat( ex_str, num_str ); 534 : //DrawText( hdc, TEXT( ex_str ), -1, &msg, DT_NOCLIP); 535 : } 536 : this->drawButtons( hdc ); 537 : this->kickEventDisplayThreeD( hdc ); 538 : 539 : //EndPaint(this->event->hWnd, &ps); 540 : break; 541 : } 542 : 543 : //EndPaint( this->event->hWnd, &ps); 544 :}
---
---