Creating a scrollable window for runtime created controls

D

dfreas

I'm using Bloodshed Dev-C++ to write a program used to calculate orders
for my business. Until recently a command line program has been
sufficient but it is beginning to become cumbersome so I've switched to
writing a windows program and am learning the API as I go. If I use a
term wrong correct me - my experience in windows programming is
limited, I do however understand C++ fairly well as I've been using it
for about four years.

I want to be able to add controls at runtime to my main window - which
I have succesfully done. The number of controls is dependant on the
customer's order size. For small orders the program works fine. The
problem is for larger orders where the EDIT controls extend far beyond
the bottom of the window. I need to make the window scrollable.

Adding "WS_VSCROLL | WS_HSCROLL" did not work. It provided the window
with scrollbars but when the EDIT controls extend beyond the bottom of
the window I still cannot scroll down to see them.

Please let me know what I'm doing wrong and how to fix it. I assume I'm
leaving out an important step.

Thanks
-Daniel
 
J

John McCabe

I'm using Bloodshed Dev-C++ to write a program used to calculate orders
for my business. Until recently a command line program has been
sufficient but it is beginning to become cumbersome so I've switched to
writing a windows program and am learning the API as I go. If I use a
term wrong correct me - my experience in windows programming is
limited, I do however understand C++ fairly well as I've been using it
for about four years.

I want to be able to add controls at runtime to my main window - which
I have succesfully done. The number of controls is dependant on the
customer's order size. For small orders the program works fine. The
problem is for larger orders where the EDIT controls extend far beyond
the bottom of the window. I need to make the window scrollable.

I don't know anything about Bloodshed Dev-C++, but can't you use
something like a list control (CListCtrl in MFC)?
 
S

Scott McPhillips [MVP]

I want to be able to add controls at runtime to my main window - which
I have succesfully done. The number of controls is dependant on the
customer's order size. For small orders the program works fine. The
problem is for larger orders where the EDIT controls extend far beyond
the bottom of the window. I need to make the window scrollable.

There are many controls that provide this capabiity. See the Grid
Controls section here...
http://www.codeguru.com/Cpp/controls/controls/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top