473,408 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

MFC: How to resize a control with only SendDlgItemMessage (ie. without 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.

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
----
Apr 18 '06 #1
11 5506
Theo Appelboer wrote:
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.

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!!!
Apr 18 '06 #2
* Phlip:
Theo Appelboer wrote:
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.


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.


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?
Apr 18 '06 #3
Alf P. Steinbach wrote:
Please don't help change this into a Windows programming group.


Are you in a bad mood?

--
Phlip
http://www.greencheese.org/ZeekLand <-- NOT a blog!!!
Apr 18 '06 #4
Phlip wrote:
Alf P. Steinbach wrote:
Please don't help change this into a Windows programming group.


Are you in a bad mood?


I don't know; but more important, he is right.
Best

Kai-Uwe Bux
Apr 18 '06 #5
Kai-Uwe Bux wrote:
Please don't help change this into a Windows programming group.


Are you in a bad mood?


I don't know; but more important, he is right.


You all read and reviewed my post "how to bounce a post". I have posted it
here many times, and nobody has complained about the line item "if you
can't help, don't bounce".

If you don't want to reply to that post, then don't do the "passive
aggressive" thing by whining about this post.

A bounce post should not just say, "your post is off topic go away". Tell
newbies that posting to the best newsgroup will help them get the best
answer.

The person who started this thread will not post off-topic here again, and
will very soon learn how to do their progress bar correctly.

--
Phlip
http://www.greencheese.org/ZeekLand <-- NOT a blog!!!
Apr 18 '06 #6

Phlip wrote:
A bounce post should not just say, "your post is off topic go away". Tell
newbies that posting to the best newsgroup will help them get the best
answer.


Why will posting in the best newsgroup get them the best answer? Two
reasons: firstly, it's the most likely place to find someone who knows
the answer; secondly, the most topical group will provide the highest
quality peer-review.

I don't think anyone objects to you telling the OP that going to a
different group will be better for them, but you also posted an
off-topic answer to the question and that's completely different.
Unlike answers in a topical group, your off-topic answer won't be
peer-reviewed. If you get it wrong, the OP will never know. At best
you've given the OP nothing more than a topical group will. At worst,
you've given them misinformation that nobody will correct.

So the OP is better off if you don't give off-topic answers. What about
the rest of the forum? People read your message only to discover it's
off-topic and wasting bandwidth. There's a long term risk of potential
posters getting the impression that off-topic questions will get
answered here. The more you encourage off-topic questions, the more you
help to lower the signal to noise ratio. To try and protect against
that long term risk, an otherwise unnecessary thread springs up solely
made up of people telling you to stop it.

So: no benefit, potential harm - don't do it.

Gavin Deane

Apr 18 '06 #7
Gavin Deane wrote:
So: no benefit, potential harm - don't do it.


Thank you for not appealing to authority!

--
Phlip
http://www.greencheese.org/ZeekLand <-- NOT a blog!!!
Apr 18 '06 #8
Gavin Deane wrote:
[..]
So the OP is better off if you don't give off-topic answers. What
about the rest of the forum? People read your message only to
discover it's off-topic and wasting bandwidth. [..]


I don't any more. I killfiled him. Enough's enough.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Apr 18 '06 #9
Phlip wrote:
Kai-Uwe Bux wrote:
Please don't help change this into a Windows programming group.

Are you in a bad mood?


I don't know; but more important, he is right.


You all read and reviewed my post "how to bounce a post". I have
posted it here many times, and nobody has complained about the line
item "if you can't help, don't bounce".


You know, just because you post something doesn't mean we have to
follow it. I happen to think your ideas are pretty bad for the most
part, I just don't feel like arguing them out. I just ignore them.


Brian
Apr 18 '06 #10
On Tue, 18 Apr 2006 14:02:57 GMT, Phlip <ph*******@gmail.com> wrote:
Alf P. Steinbach wrote:
Please don't help change this into a Windows programming group.


Are you in a bad mood?


After the "Pete Becker Incident" he's waited to spring it on someone
else. Just human nature, we know which way it all rolls... right. Btw,
did anyone else notice just after the tiff, suddenly Pete's .sig
changed. Now he's consultant.

I now wait for the "Indignation Phase." Hold on, I have to get me
popcorn. Spare me the "it's none of your business" crap. If you post
your life on usenet, it's public and common knowledge. (The reader can
interpret what common means.)

The Bible tells us to love our neighbors, and also to love
our enemies; probably because they are generally the same
people.
Apr 18 '06 #11
Default User wrote:
You know, just because you post something doesn't mean we have to
follow it. I happen to think your ideas are pretty bad for the most
part, I just don't feel like arguing them out. I just ignore them.


Feel free to ask about any of them. ;-)

--
Phlip
consultant
Apr 18 '06 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Caronte | last post by:
Hi all, I have a problem using Custom control class inside a DLL Extension. My Custom control use Class property to specify the register class name for the control. Both Dialog Class and...
5
by: andy.g.ward | last post by:
I keep getting this when trying to create an MFC activex control in a c# windows service - anyone got any ideas what the missing module could be??? Exception thrown :...
2
by: DaveKline | last post by:
I'm a new VB programmer, trying to use the VB Express 2005 development environment. Currently, when I try to resize any of the controls in a form designer window, I get an error that says "object...
3
by: MLH | last post by:
Me!AddnlOwnrList.Width = 5.1875 Me.Repaint Have tried the above in the on got focus event code to make the listbox control wider when its being used. I tried it in the Enter and Exit event code...
2
by: Mark Ingram | last post by:
Hi, ive got a custom control, which i like to keep at a fixed size (or a fixed ratio). So, during the OnSizeChanged function, i specify values for width and height. Which in *some* cases (i dont...
1
by: James Arnold | last post by:
How is it possible to add 'fixed' jumps when resizing a control? For example, the listbox will only allow you to resize it so a full row will be displayed. I have a segmented progress bar that...
1
by: skyy | last post by:
Hi... I am creating a MFC ActiveX control porject... I would like to create a text box when the activeX object is load. How do i do it? Thanks!
4
by: DeanJo | last post by:
I am trying to develop a resize module i can include on my pages that calculates the size of input fields based on the screen resolution... I can already detect the screen resolution, and i have...
2
by: AdamOnAccess | last post by:
Hi, I'm trying to find an event in the web browser control that triggers when the user clicks on a link inside the control and arrives at a new page. My web browser control only shows 5 events...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.