Click here to Skip to main content
15,894,337 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have written

C++
m_dispCTRL.SetDlgItemInt(IDC_EDIT1, 100);


but it didn't show the number. is there any code to show it?
Posted

1 solution

What is the m_dispCTRL? If it's the edit control, try using the window (CWnd) instead. More info, see: CWnd::SetDlgItemInt[^]
 
Share this answer
 
Comments
Kay Andrian Fikar 8-Jan-12 8:14am    
well, i use the code

dialog.SetDlgItemInt(IDC_EDIT3, j)

from CView class,
but it failed to init the dialog in fact. the code cannot use from outside the dialog class?
Wendelius 8-Jan-12 8:17am    
If the dialog exists you can use it from elsewhere. Perhaps an easier funcion is: SetDlgItemInt function[^]
Kay Andrian Fikar 10-Jan-12 18:20pm    
Well, could u give me any references how to declare SetDlgItemInt function and how to get a handle window to a dialog box?...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900