RE: [Dev-C++] why doesn't this work?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Josu O. <jon...@ao...> - 2003-02-20 11:28:13
|
It's not a good idea to draw on a window when it's created. Do it when it receives the message WM_PAINT. Or even better have a look to this wonderful book: http://www.charlespetzold.com/oop/pw4.html > -----Mensaje original----- > De: Vlada Djurovic [SMTP:dj...@im...] > Enviado el: jueves 20 de febrero de 2003 10:15 > Para: 'DevC++ help' > Asunto: [Dev-C++] why doesn't this work? > > Hi. > This is suppposed to be simple, but I can't get it to work. All I want to > do > is display some text using TextOut function, but I get only a blank > window. > Here's the code: > > HDC hDC; > case WM_CREATE: > { > char str[]="Display text"; > hDC=GetDC(hwnd); > TextOut(hDC,100,100,str,lstrlen(str)); > ReleaseDC(hwnd,hDC); > } > break; > > What am I doing wrong? > ------------ > Vlada > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. > The most comprehensive and flexible code editor you can use. > Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. > www.slickedit.com/sourceforge > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |