case WM_CREATE:
{
int randomsize=0;
//std::string lineofquote;
char lineofquote[255];
std::ifstream infile;
infile.open("quotes.txt",std::ios::in);
if (infile)
{
MessageBox(NULL,"infile failed","Error reading file", MB_OK);
return 0;
}
newhandler = CreateWindow(TEXT("static"),TEXT("Quote here") ,WS_CHILD | WS_VISIBLE , 0,0,550,150,hWnd,NULL,NULL,NULL);
while(!infile.eof())//get file size
{
infile.getline(lineofquote,255,'\n');
SetWindowText(newhandler,lineofquote);
randomsize++;
}
infile.close();
//std::cout<<randomsize;
break;
}
当我运行这个程序时,我似乎根本看不到我的窗口。这里可能有什么问题?