Re: [Dev-C++] why doesn't this work?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <cg...@wo...> - 2003-02-20 11:34:07
|
When you process the WM_CREATE, the window is not yet created, so you
cannot work with its hdc, at least, it is what it seems to happen. I did
an experiment like yours and didn't worked, I deleted the code and moved
to another WM_.
Vlada Djurovic wrote:
>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
>
>
>
|