how to create textbox in WinApi

I create like this

htextbox=CreateWindow(L"static",L"",WS_BORDER|ES_MULTILINE|WS_CHILD|WS_VISIBLE,50,0,
            100,50,hWnd,(HMENU)ID_STATIC,hInst,NULL);

But I can't write text there. What is wrong?

Upvotes: 1

Views: 4851

Answers (1)

David Heffernan
David Heffernan

Reputation: 612964

You say that you want a text box which makes me think you want the user to be able to edit the text. In which case you have the wrong window class. The STATIC window class is for labels. What you want is an EDIT control.

Upvotes: 5

Related Questions