开发者

How to write text into window? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cann开发者_C百科ot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

Parent form handle hwnd is existed. Now I want to populate it with edit controls into which output-text is written. I am not familiar with WIN32 API, Thanks for showing me some code examples. Thank you!~


http://msdn.microsoft.com/en-us/library/ms633546(VS.85).aspx

If you want to set text using chars then you can use SetWindowTextA so you don't need to bother with multibyte to/from wide characters.

I suggest the Programming Windows book by Charles Petzold.

You say hwnd is your parent then you could create the edit controls with default text like:

HWND hedit=CreateWindow(TEXT("EDIT"),TEXT("Default window text"),WS_CHILD | WS_VISIBLE, 0,0,400,300,hwnd,0,0,0);

Read up on the docs for CreateWindow at http://msdn.microsoft.com/en-us/library/ms632679(v=vs.85).aspx


Use CreateWindow to create Edit controls and do whatever you want with them.

Use google, etc or MSDN search before asking something.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜