473,785 Members | 2,557 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating a scrollable window for runtime created controls

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

Nov 6 '05 #1
2 2373
df****@gmail.co m wrote:
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)?

Nov 7 '05 #2
df****@gmail.co m wrote:
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/

--
Scott McPhillips [VC++ MVP]

Nov 7 '05 #3

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

Similar topics

4
561
by: Altramagnus | last post by:
I have 30 - 40 type of different window. For each type I need about 20 instances of the window. When I try to create them, I get "Error creating window handle" My guess is there is a maximum number of window handle, because if I reduce to about 2 instances of each window, it can run. But not 20 instances of each window. Does anyone know what the problem is? is it really because it exceeds the maximum number of window handle?
15
6751
by: Carlos Lozano | last post by:
Hi, What is the right way to create an OCX COM component. The component is already registerred, but can't create an instance. I am using the reference to the interop module created. If I use javascript or vbscript it works. I will appreciate any help. I do the following (C#):
2
2899
by: Anand Sagar | last post by:
I have a Panel1 and button1 on my webform. At runtime, I create 2 textboxes. I do it at the Page_Load event. I put the code within the " If Not isPostBack" For the button click event, I will do a post-to-database coding and then show the same page again. I put EnableViewState = True for the textboxes. In the Page_Load if I dont use the IsPostBack checking, the code works fine. The button shows that the code has been fired and the page...
1
2320
by: RJN | last post by:
Hi Sorry for posting again. I have a datagrid which is put inside a div tag to make it scrollable. I need to page the datagrid. The page numbers appear at the bottom of the datagrid and has to be scrolled down completely to see the page number links. The page number should always be visible outside the scroll bar. Basically I want to create the paging links dynamically and on click of this it should fire PageIndexChanged event.
2
2587
by: RJN | last post by:
Hi Sorry for posting again. I have a datagrid which is put inside a div tag to make it scrollable. I need to page the datagrid. The page numbers appear at the bottom of the datagrid and has to be scrolled down completely to see the page number links. The page number should always be visible outside the scroll bar. Basically I want to create the paging links dynamically and on click of this it should fire PageIndexChanged event.
12
3175
by: Mats Lycken | last post by:
Hi, I'm creating a CMS that I would like to be plug-in based with different plugins handling different kinds of content. What I really want is to be able to load/unload plugins on the fly without restarting the application. What I did was to create an AppDomain that loaded the plugins and everything was great, until I tried to pass something else that strings between the domains...
7
2227
by: Varangian | last post by:
Hello is creating controls at runtime the same as designtime ? will a page be faster if controls are created at designtime rather than at runtime ? If so why ? thanks :)
5
2000
by: Guillaume BRAUX | last post by:
Hello, What I want to do is to add a userControl to a form class witch is a different class from the one the button is generated. For example, I want to instanciate a label in "class1" and add it ("show it") on a WinForm situated in "class2" (without having to add code to class2 !) The problem is that I need to instanciate "class2" from "class1" to be able to do a class2.controls.add(myLabel) in class1..
0
1446
by: Rune Jacobsen | last post by:
Hi all, In my project I have a control (described in an earlier post) which basically consists of three "subcontrols": One big area where the vital data is displayed (scrollable, since it will usually be larger than the window containing the parent control), a time strip on top of it, and a resource list on the left. Long story short - when someone scrolls the scrollable data control, the time strip and resource lists are hooked to keep...
0
9647
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10161
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9958
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8986
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7506
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4058
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3662
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2890
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.