MFC:如何仅使用SendDlgItemMessage调整控件的大小(即没有MoveWindow) [英] MFC: How to resize a control with only SendDlgItemMessage (ie. without MoveWindow)

查看:112
本文介绍了MFC:如何仅使用SendDlgItemMessage调整控件的大小(即没有MoveWindow)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在不调用MoveWindow的情况下更改Windows对象的大小(在这种情况下为

PictureBox)?


我正在写作Winamp的一个插件,我希望在其中显示一个平滑的

栏,显示不断变化的输出值。


在这个Winamp插件中,我无法使用SendMessage命令,因为它使用Winamp导致锁定。
导致锁定。我_can_使用SendDlgItemMessage。


以下代码完成工作:

MoveWindow(GetDlgItem(pitch_control_hwnd,IDC_BMP),500,400,out_val,10,FALSE );


不幸的是,MoveWindow在内部使用SendMessage命令,所以我

获得锁定。


我怎么能更改大小而不接受任何SendMessage调用?


注意:我知道我可以使用ProgressBar,但在WinXP中,它们是

不再流畅,但是用太大的块绘制。


欢迎任何其他想法在屏幕上显示(平滑)条形图,并且

更改尺寸也欢迎...


问候,


Theo

----

Is it possible to change the size of a Windows object (in this case a
PictureBox) without calling MoveWindow?

I''m writing a plugin for Winamp, in which I want to display a smooth
bar that displays a continuously changing output value.

In this Winamp plugin I cannot use the SendMessage command because it
causes lockups with Winamp. I _can_ use SendDlgItemMessage.

The following code does the job:
MoveWindow(GetDlgItem(pitch_control_hwnd, IDC_BMP), 500, 400, out_val, 10, FALSE);

Unfortunately, MoveWindow uses SendMessage commands internally, so I
get lockups.

How can I change the size without getting any SendMessage calls?

Notes: I know I can use a ProgressBar for this, but in WinXP, they are
not smooth anymore, but drawn with blocks that are too big.

Any other ideas to display a (smooth) bar on the screen with a
changing size are also welcome...

Regards,

Theo
----

推荐答案

Theo Appelboer写道:
Theo Appelboer wrote:
是否可以更改Windows对象的大小(在本例中为
PictureBox) )没有调用MoveWindow?

我正在为W写一个插件inamp,我想在其中显示一个平滑的
栏,显示不断变化的输出值。
Is it possible to change the size of a Windows object (in this case a
PictureBox) without calling MoveWindow?

I''m writing a plugin for Winamp, in which I want to display a smooth
bar that displays a continuously changing output value.




尝试进度条控件。如果这不起作用,则覆盖WM_PAINT。

不要使用MoveWindow来获得低效的动画效果。将动画画成

窗口。


但是你会在覆盖Windows的新闻组上获得更好的帮助

SDK 。这个小组讨论了原始的C ++语言本身。


-

Phlip
http://www.greencheese.org/ZeekLand < - 不是博客!!!



Try a Progress Bar control. If that doesn''t work, then override WM_PAINT.
Don''t use MoveWindow for a lowly animation effect. Paint the animation into
the window.

But you will get much better help on a newsgroup that covers the Windows
SDK. This group discusses the raw C++ language itself.

--
Phlip
http://www.greencheese.org/ZeekLand <-- NOT a blog!!!

* Phlip:
Theo Appelboer写道:
Theo Appelboer wrote:
是否可以更改Windows对象的大小(在本例中为
PictureBox)没有调用MoveWindow?

我正在为Winamp编写一个插件,我希望在其中显示一个平滑的
栏,显示不断变化的输出值。
尝试进度条控件。如果这不起作用,则覆盖WM_PAINT。
不要使用MoveWindow来获得低效的动画效果。将动画绘制到窗口中。
Is it possible to change the size of a Windows object (in this case a
PictureBox) without calling MoveWindow?

I''m writing a plugin for Winamp, in which I want to display a smooth
bar that displays a continuously changing output value.
Try a Progress Bar control. If that doesn''t work, then override WM_PAINT.
Don''t use MoveWindow for a lowly animation effect. Paint the animation into
the window.




请不要帮助将其更改为Windows编程组。


但是你会在涵盖Windows
SDK的新闻组上获得更好的帮助。这个小组讨论了原始C ++语言本身。



Please don''t help change this into a Windows programming group.

But you will get much better help on a newsgroup that covers the Windows
SDK. This group discusses the raw C++ language itself.




这是一个极端的位置,夸张,只对获得

点有用跨越。但是现在你证明了这一点已经完全没有了。

。即使是夸张也没有帮助:你把它反映回来了。

别人,这里西奥,没有理解任何东西。


也许不是夸大其词,一个有限但明确的规则:在这个

组中,是否/讨论如何使用Windows API,MFC等。


否,纯粹与Linux相关的问题/或答案/也不行。


-

答:因为它弄乱了人们的顺序通常阅读文字。

问:为什么这么糟糕?

A:热门帖子。

问:什么是最多的在usenet和电子邮件中烦人的事情?



That''s an extreme position, an exaggeration, useful only to get the
point across. But now you demonstrate that the point has eluded you
completely. Even the exaggeration doesn''t help: you reflect it back to
someone else, here Theo, without having understood anything.

Perhaps instead of an exaggeration, a limited but clear rule: in this
group do /not/ discuss how to use the Windows API, MFC, or the like.

No, purely Linux-related questions /or answers/ aren''t OK, either.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?


Alf P. Steinbach写道:
Alf P. Steinbach wrote:
请不要帮助改变这是一个Windows编程组。
Please don''t help change this into a Windows programming group.




你心情不好吗?


-

Phlip
http://www.greencheese .org / ZeekLand < - 不是博客!!!



Are you in a bad mood?

--
Phlip
http://www.greencheese.org/ZeekLand <-- NOT a blog!!!


这篇关于MFC:如何仅使用SendDlgItemMessage调整控件的大小(即没有MoveWindow)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆