1. How do I make a CComboBox Visible or Invisible at runtime?
// member variable m_combo1 is of type CComboBox
// Using Borland C++, I would write:
// m_combo1->Visible = true; (or false)

2. How can I change a CComboBox's Properties from "Drop Down" to "Drop List"
at runtime?

3. How do I load a picture into a PictureBox at runtime?
// member variable m_bitmap is of type CStatic
// Using Borland C++, I would write:
// m_bitmap1->Image = Image->FromFile(strPath)

I have MFC and VC++ books, but I can't find anything on how to do basics
like this.

If it helps, I am using eVC4-SP4 with the Pocket PC 2003 SDK.

Re: How do I control VC Controls? by ctacke/>

ctacke/>
Thu Aug 17 10:21:52 CDT 2006

1. Quit posting the same question over and over in new threads.
2. All of this is identical to the desktop. Go through some online
tutorials or get a book.

-Chris


"Joe" <Joe@discussions.microsoft.com> wrote in message
news:FED14D33-A8D5-4C02-8A2B-0F516CFA6180@microsoft.com...
> 1. How do I make a CComboBox Visible or Invisible at runtime?
> // member variable m_combo1 is of type CComboBox
> // Using Borland C++, I would write:
> // m_combo1->Visible = true; (or false)
>
> 2. How can I change a CComboBox's Properties from "Drop Down" to "Drop
> List"
> at runtime?
>
> 3. How do I load a picture into a PictureBox at runtime?
> // member variable m_bitmap is of type CStatic
> // Using Borland C++, I would write:
> // m_bitmap1->Image = Image->FromFile(strPath)
>
> I have MFC and VC++ books, but I can't find anything on how to do basics
> like this.
>
> If it helps, I am using eVC4-SP4 with the Pocket PC 2003 SDK.
>



Re: How do I control VC Controls? by Joe

Joe
Thu Aug 17 10:41:03 CDT 2006

I've spent a week going through books and searching for online tutorials that
can explain how to do the basics like making a control visible or not
visible, but that doesn't seem to be covered.

There also appears to be nothing that gives multiple examples of out how to
use the SetProperty() feature. All I have found is the one Microsoft example
of how to set text for a TextBox, and that doens't shed any light on how I
can use the SetProperty() feature to change settings of other controls - or
if it can even be done, whether with this control or through some other
mechanism.

If you know of any links to good examples, please do not keep them to
yourself.

> 1. Quit posting the same question over and over in new threads.
> 2. All of this is identical to the desktop. Go through some online
> tutorials or get a book.
>
> -Chris


Re: How do I control VC Controls? by Chris

Chris
Thu Aug 17 14:14:46 CDT 2006

"Joe" <Joe@discussions.microsoft.com> wrote in message
news:C97E6C38-E08F-44EC-8881-D5EA514EF274@microsoft.com...
> I've spent a week going through books and searching for online tutorials
> that
> can explain how to do the basics like making a control visible or not
> visible, but that doesn't seem to be covered.

ShowWindow?

> There also appears to be nothing that gives multiple examples of out how
> to
> use the SetProperty() feature. All I have found is the one Microsoft
> example
> of how to set text for a TextBox, and that doens't shed any light on how I
> can use the SetProperty() feature to change settings of other controls -
> or
> if it can even be done, whether with this control or through some other
> mechanism.
>
> If you know of any links to good examples, please do not keep them to
> yourself.

http://groups.google.com/group/microsoft.public.vb.winapi/browse_thread/thread/fe0b43770454bfb6/907ad86a2a1d75c4%23907ad86a2a1d75c4



Re: How do I control VC Controls? by Joe

Joe
Thu Aug 17 15:50:02 CDT 2006

Chris,

That worked! The way it was described in the Help, I thought "BOOL
ShowWindow(int nCmdShow)" was for the main application, mdi child, or some
other type of form. I was going about this in the complete wrong direction
by trying to use SetProperty().

Thanks!

"Chris Scott" wrote:
> ShowWindow?


Re: How do I control VC Controls? by Chris

Chris
Fri Aug 18 06:44:16 CDT 2006

Good to hear it got you moving in the right direction.

In MFC and the base API level of coding, just about any GUI component is at
its most basic state, a window. So to manipulate them you need to look to
the window API's such as ShowWindow(). Also, they have styles, which are
adjusted with things like SetWindowLong().


"Joe" <Joe@discussions.microsoft.com> wrote
> That worked! The way it was described in the Help, I thought "BOOL
> ShowWindow(int nCmdShow)" was for the main application, mdi child, or some
> other type of form. I was going about this in the complete wrong
> direction
> by trying to use SetProperty().