简体   繁体   English

如何使对话框外部桌面上的Win32 EDIT窗口占用所有空间

[英]How to make Win32 EDIT window on desktop outside of dialog take up all space

I need to create an EDIT control directly on the desktop without being inside of a dialog box. 我需要直接在桌面上创建一个EDIT控件,而不必放在对话框中。 I need the text box to take up all the available space in the window. 我需要文本框占用窗口中的所有可用空间。

Currently I am trying to just do something like: CreateWindow(L"EDIT", nullptr, WS_VISIBLE, 0, 0, 300, 50, nullptr, nullptr, nullptr, nullptr); 目前,我正在尝试执行以下操作:CreateWindow(L“ EDIT”,nullptr,WS_VISIBLE,0,0,300,50,nullptr,nullptr,nullptr,nullptr);

But that results in a textbar that's almost as wide as my window, but not nearly as tall, surrounded by a transparent background. 但这会导致文本栏几乎和我的窗口一样宽,但又不比窗口高,并被透明的背景包围。

I'm relatively new to win32 programming so any pointers in the right direction would be helpful. 对于Win32编程,我是相对较新的人,因此正确方向的任何指针都将有所帮助。

看起来我只需要在WS_VISIBLE之外添加WS_POPUP

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM