PictureBox Control
Hello,
I am very new to C++/win32 programming and to teach myself
I am trying to port some of my VB projects over to C++.
The first one I am attempting uses a PictureBox Control in which
a bar graph of sorts is displayed.
The user can dynamically adjust this graph by clicking and
dragging points on the graph etc. (in other words VB's
PictureBox Control responds to mouse events).
What control in C++/win32 should I use to acheive this same
functionality?
Thanks
[534 byte] By [
mmscg] at [2007-11-18 19:16:48]

# 2 Re: PictureBox Control
It would have to be completely owner-draw. The WinAPI does not support such a control, sorry :(
# 3 Re: PictureBox Control
OK then, thanks!
I will try using a Static control, and see if I can learn how
to subclass in C++, to get the functionality I need.
Does anyone know of a tutorial or something demonstrating
subclassing controls?
mmscg at 2007-11-9 13:12:02 >

# 4 Re: PictureBox Control
maybe a little late, but may this helps you:
MSDN ( http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwui/html/msdn_subclas3.asp)
greets
ecu@dor
# 6 Re: PictureBox Control
You may wanna take a look at this thread as well:
dev-archive Forums - Mouseover event (http://www.dev-archive.com/forum/showthread.php?s=&threadid=290195)
In that thread I attached a sample application that uses subclassed Picture Controls (static control with SS_BITMAP property). In the sample they are used as buttons, but you might find the subclass code useful, etc. (Make sure you add the Notify style to the static control so that you can process mouse messages, etc).
RussG1 at 2007-11-9 13:15:04 >

# 7 Re: PictureBox Control
Your sample (along with the MSDN example) got me well on the
way to getting this "PictureBox" set up and working as it does in VB.
...still have a lot problems, but at least I am making progress.
mmscg at 2007-11-9 13:16:06 >
