Home > Software engineering >  Win32 how the variables are displayed in the edit control
Win32 how the variables are displayed in the edit control

Time:09-28

HwndEdit=CreateWindow (TEXT (" edit "),
The TEXT (" TEXT] "),
WS_CHILD | WS_VISIBLE,
P.x, p.x - a, p.y - b - a + 50, p.y - b + 50,
HWnd, (HMENU) 0,
HInstance, NULL);
Use this statement to create an Edit control, the second TEXT only the input TEXT string, I want him to show the value of a variable, and a great god tell me how to operate

CodePudding user response:

Use sprintf to convert the value of a variable into a string, then put it in

CodePudding user response:

The data formatted into characters, then the SetWindowText

CodePudding user response:

(1) HMENU to 0,//=1000 CTRL ID
2 int var=100;
Char svar [10].
Sprintf (svar, "% d", var);


SetWindowText (hwndEdit, svar);

CodePudding user response:

Why don't use Cedit * pedit=new Cedit to new and then move on to the location you need


Pedit - & gt; SetWindowText (variable);
Update the update (true/false)
  • Related