List Box VC++
I am basically a fresher into VC++.
I have created a List Box in my Dialog.
Now, I want integers from 1 to 1000 to be displayed in my List Box.
So, I added a code to the OnitDialog() function [which is invoked just before the dialog box is displayed upon the execution of the function DoModal()]
as follows:
CListBox* pListBox2=static_cast<CListBox*>(GetDlgItem(IDC_LIST4_SECTIONWIDTH));
for (int i=1;i<=3000;i=i+1)
{
pListBox2->AddString("%d",i);
}
This is not working and giving me an error--
How could I make it work??

