473,395 Members | 1,484 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,395 software developers and data experts.

Using STL in a forms application

I found out the hard way that I can't include an STL container in a
form object, and spent a half day trying to locate authoritative
documentation on exactly why. So far I've concluded from indirect
evidence (no thanks to the online help) that what I want to do cannot
be done. I have experimented with using pointers to STL containers as
members of managed classes, and on the surface this seems to work.

So what are people with more .NET experience than me doing to solve
this? I will trash my compiler long before I set aside one of the
single largest productivity gains in the C++ language ever to be
invented, and continue to curse Mircosoft for its inability to provide
an improve user interface rendering tool for standard C++ users, and
my employer for foisting it upon me, but at the end of the day I still
have to get my job done.

So what is the best way to create forms applications for the user
interface that continue to use the STL to accomplish the Real Work?
Nov 17 '05 #1
2 1056
There are .NET versions of most of the stuff in the STL; otherwise, use
pointers or wrappers to stuff. I've tended to package as much of our
unmanaged code into unmanaged classes and keep pointers to those in the
managed ones, and it works fine. If you're putting UI components into STL
containers you probably want to look at the .NET containers, since you'll
avoid going backwards and forwards between managed/unmanaged components.
Otherwise, if you're just using .NET for the UI and are happy with using
Win32 / MFC, why change?

Steve

"Bob Beauchaine" <b.**********@attbi.com> wrote in message
news:15**************************@posting.google.c om...
I found out the hard way that I can't include an STL container in a
form object, and spent a half day trying to locate authoritative
documentation on exactly why. So far I've concluded from indirect
evidence (no thanks to the online help) that what I want to do cannot
be done. I have experimented with using pointers to STL containers as
members of managed classes, and on the surface this seems to work.

So what are people with more .NET experience than me doing to solve
this? I will trash my compiler long before I set aside one of the
single largest productivity gains in the C++ language ever to be
invented, and continue to curse Mircosoft for its inability to provide
an improve user interface rendering tool for standard C++ users, and
my employer for foisting it upon me, but at the end of the day I still
have to get my job done.

So what is the best way to create forms applications for the user
interface that continue to use the STL to accomplish the Real Work?

Nov 17 '05 #3

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

Similar topics

6
by: Billy Jacobs | last post by:
I have a website which has both secure and non-secure pages. I want to uses forms authentication. How do I accomplish this? Originally I had my web.config file in the root with Forms...
1
by: Terminal882003 | last post by:
Hi, I have a problem in my application(C#) if I using RichTextBox to continuously display a series of text messages (using method AppendText()). When application is running, it will stop at some...
9
by: Terrance | last post by:
Good Afternoon: I was hoping if someone could share some light on a problem that I'm facing. When I create a Visual Basic.Net program and I use the XP style for my Window Forms and buttons; if I...
19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
2
by: Hrcko | last post by:
How to use this control? I have to grids on my form, one on the top and one on bottom. When I start application I want to be able to move bottom grip up, and top grid down, but it doesn't...
1
by: Carlos | last post by:
I'm getting RPC error when I try to register analys32.xll in the VB program. ErrorCode=-2147417851 Message="El servidor lanzó una excepción. (Exception from HRESULT: 0x80010105...
8
by: Gary | last post by:
I'm using an Act database. I was stuck on this a year ago and am still having trouble. I have three bits of code like so : - act.CActAppObj objACT = new act.CActAppObj(); act.CAIBaseView...
5
by: Rajkiran R.B. | last post by:
I want to log in to a website using C# code.. The main aim is to check whether the username and password I provide is correct or not. I used the following code bool somefunction() {...
6
by: Scott Gravenhorst | last post by:
Windows XP SP3 My application is set to open a SaveFile dialog when an exit is requested. When I click the app's close button, the save dialog opens, but when I click to change the folder, the...
3
by: shobhitguptait | last post by:
How to Run C#.NET Windows App on N/W with centralized DB using SQL SERVER 2000 Hello All...i m really grate full to c such a website where developers try to help people like us who face problems...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.