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;
}
이 프로그램을 실행하면 전혀 내 창을 보지 못하는 것 같습니다. 여기에 무슨 문제가 있을까요? 당신이 창을 만드는 방법이 아니다간단한 윈도우 C++ 보이지 않음
어 - 당신은 "이 ShowWindow()"를 호출 어디 ??? http://msdn.microsoft.com/en-us/library/windows/desktop/ms633548%28v=vs.85%29.aspx – paulsm4
그리고 내가 만들고자하는 새 창은 WM_CREATE 이벤트를 호출 한 윈도우. 또한 WM_CREATE 이벤트가 실제로 호출되고 있다고 가정합니다.) – paulsm4