Home > Back-end >  About C language Windows desktop wizard string descriptor output problem, ask for help!!!!!!!!!!
About C language Windows desktop wizard string descriptor output problem, ask for help!!!!!!!!!!

Time:09-28

Through the teaching, I know the "hello world" can be passed in desktop wizard TextOut output fonts, and can be realized through the mouse buttons to switch colors, there are three steps, the following is the output of the code:
 
{
PAINTSTRUCT ps;
HDC HDC=BeginPaint (hWnd, & amp; Ps);
//TODO: add the use of HDC here any drawing code...
SetTextColor (HDC, color);
TextOut (HDC, 0, 0, L "Hello World!" , 12);
EndPaint (hWnd, & amp; Ps);
}

Through the mouse around key switch goes like this:
 
Case WM_LBUTTONDOWN:
Color=RGB (255, 0, 0).
The InvalidateRect (hWnd, NULL, TRUE);
break;
Case WM_RBUTTONDOWN:
Color=RGB (0, 0, 255);
The InvalidateRect (hWnd, NULL, TRUE);
break;


So I want to design a small programs around the mouse key switch characters:
First of all, I want to put the
 TextOut (HDC, 0, 0, L "Hello World!" , 12); 

With the following characters,


Then through the mouse left key switch, left is this string of characters:


Right is the string of characters:


But can you tell me how to achieve this, look for everybody to help, you can reissue the small red envelopes,
  • Related