Compiler passs only english messages, which is const char: we could caare about char pointer: .\wButtonController.cpp Wed May 27 20:16:12 2020 1 :// button controler needs the function which changes button cursol. 2 :// that means the contoroler needs the cursol number. 3 :// if there is no cursol numbers i must create them. 4 : 5 :#define _CRT_SECURE_NO_WARNINGS 6 :#define _CRT_NONSTDC_NO_DEPRECATE 435 :// 436 :// 437 :// 438 :// 439 :// 440 :void wButtonController::ProcessWmPaint () { 441 : static char ex_str[2048]; 442 : static char str[2048]; 443 : static char num_str[2048]; 444 : static char pastestr[1024]; 445 : 446 : //PAINTSTRUCT ps; 447 : RECT msg_key, msg_clip, msg_replace; 448 : FILE * pFile; 449 : RECT msg; 450 : int succ = 0; 451 : 452 : //HDC hdc = BeginPaint(this->event->hWnd, &ps); 453 : HDC hdc = this->event->hDc; 454 : HPEN hPen = CreatePen(PS_DASHDOTDOT, 2, RGB( 0, 0, 0 ) ); 455 : 456 : int key_w = this->event->wParam; 457 : int key_l = this->event->lParam; 458 : 459 : itoa(key_w, num_str, 10); 460 : strcpy( str, "b key param: "); 461 : strcat( str, num_str ); 462 : 463 : itoa(key_l, num_str, 10); 464 : strcat( str, ":" ); 465 : strcat( str, num_str ); 466 : 467 : itoa(this->key_state, num_str, 10); 468 : strcat( str, ":" ); 469 : strcat( str, num_str ); 470 : 471 : itoa( this->CursolNumber, num_str, 10); 472 : strcat( str, ":" ); 473 : strcat( str, num_str ); 474 : 475 : printf("this->event->main_mode = %d\r\n", this->event->main_mode); 476 : 477 : switch ( this->event->main_mode ) { 478 : case -2: 479 : break; 480 : default: 481 : printf("default:\r\n"); 482 : SelectObject(hdc, hPen); 483 : 484 : // 100 485 : SetRect( &msg_key, 300, 100, 400, 250 ); 486 :// DrawText( hdc, TEXT((LPCSTR)str ), -1, &msg_key, DT_NOCLIP ); 487 : 488 : // 200 489 : SetRect(&msg_clip, 300, 200, 400, 250); 490 :// DrawText( hdc, TEXT( (LPCSTR)this->main_pastestr ), -1, &msg_clip, DT_NOCLIP); 491 : 492 : // 300 493 : SetRect(&msg_replace, 300, 300, 400, 350); 494 :// DrawText( hdc, TEXT((LPCSTR)this->main_replace_selection ), -1, &msg_replace, DT_NOCLIP); 495 : 496 : // message 497 : SetRect( &msg, 300, 400, 400, 450); 498 : if ( succ == -1 ) { 499 : 500 : DrawText( hdc, TEXT( "Could not read clipboard" ), -1, &msg, DT_NOCLIP); 501 : } else { 502 : 503 : ex_str[0] = '\0'; 504 : itoa( this->CursolNumber, num_str, 10); 505 : strcat( num_str, ":" ); 506 : strcat( ex_str, num_str ); 507 : itoa( this->succ_paste, num_str, 10); 508 : strcat( ex_str, num_str ); 509 : //DrawText( hdc, TEXT( ex_str ), -1, &msg, DT_NOCLIP); 510 : } 511 : 512 : this->drawButtons( hdc ); 513 : //EndPaint(this->event->hWnd, &ps); 514 : break; 515 : } 516 : 517 : //EndPaint( this->event->hWnd, &ps); 518 :} ...