|
At the moment MFC doesn't support .NET framework.
This is the big question that all MFC developers are asking, where do we go from here. Microsoft are being very quiet about a C++ Framework for .NET
I can't believe they won't do one - but I guess only time will tell.
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|
|
As far as I understood it if you build something with the /clr option then your application will be in the form of IL. I presume that if you use MFC (at least in a shared library) then the MFC portion would still be unmanaged. I've only used MC++ once for an ASP.NET control so I don't remember entirely how it works -- it's a weird hybrid
I think that the whole WinForms model is nicer (much clearner design IMO) but at the moment VS.NET doesn't support forms designer for C++ (but it does in the Everett release) and the WinForms controls themselves are pretty basic. My guess is that given another year it'll really take off.
--
Paul
"If you can keep your head when all around you have lost theirs, then you probably haven't understood the seriousness of the situation."
- David Brent, from "The Office"
MS Messenger: paul@oobaloo.co.uk
Sonork: 100.22446
|
|
|
|
|
Hi --
Supppose I have a text string like:
char text[30] = This is a great day ;
(my string comes like this, i.e. a char text[30])
Does anybody know how would I read the words of this string into cells in a [5] array? That is, how would I read this into an array called, say, words[5], where word[0] = This, word[1]=is, etc etc..
Thanks
KBL
|
|
|
|
|
strtok will split it up for you. You'll find life easier if you use std::string and std::vector though.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Christian Graus wrote:
You'll find life easier if you use std::string and std::vector though.
Just to build off of CG, I assume (should I say expect ) he will make some comment about the following code soon.
vector<std::string> vect;
vector<std::string>::iterator vi;
std::string a, b, c, d, e;
a = "Hello";
b = "This";
c = "is";
d = "a";
e = "test";
vect.push_back(a);
vect.push_back(b);
vect.push_back(c);
vect.push_back(d);
vect.push_back(e);
for(vi = vect.begin();vi != vect.end(); vi++)
cout << vi->c_str() << " ";
cout << endl;
Ah well, hope this helps. Going to bed now, I need to .
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
|
|
|
|
|
Nick Parker wrote:
he will make some comment about the following code soon.
I don't know what you mean......
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Ok.. Thanks for the tip! But how would I use std::vector and the push_back method to read: Hello this is a test into an array words[5], where words[0]=Hello, etc..
Thanks
KBL
|
|
|
|
|
Does my solution (see reply above yours) look very inefficient. So I go for std::string instead?
Kim
|
|
|
|
|
I think I might have found the solution. I already figured out to count the number of words.. I borrowed some code from one of NITRON's papers (thanks).
Note: Text comes from a stream named S.
String* words[] = new String*[number_words] ;
for (i=0; i
|
|
|
|
|
You'd be better off to use C++.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
you mean i was writing in C??
|
|
|
|
|
if you were not using an istream, yes. The rest is compilable C. C style strings ( char arrays ) and arrays, and C style string manipulation. strtok is a C function, but it's probably the easiest way to go, but I'd be shoving the results into a vector of strings. If you look up strtok in the MSDN, you should get the idea. If not, I'll post something ( I am just leaving to go home ).
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
I was using an ifstream..
I look the function you mentioned..
I'm interested in finding out how I would do the exact same thing using the std::vectors..
|
|
|
|
|
I used strtok. It was very easy - THANKS. Although I had probelsm readin the last word in the string, even though I used " /n" as my seps??
|
|
|
|
|
To be honest, I've never used it, I've always had a string and so used it's parsing methods, but I believe strtok is easier to use if you're starting with a char *. I dunno about the vagaries of reading the last string, did you check the MSDN docs ? Or is it OK now ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
I want to store data in database Access
seems simple application
but when I try to send data got from ComboBox it fails with error
with if I replace Combo with EditBox it works
with Combo I call functions GetCurSel() and GetLBText()
first of cource I call GetCurSel() and program throws error
what may be the problem?
|
|
|
|
|
Can any one tell me how to use flash ui components in my applications?
I had a brief chat with a guy who had develop a nice looking app, flash animations and all. Curious as I am, I asked him how he made it but all that he told me is that he used flash.
I tried to find out if flash movies could be exported as active x control or any other com interface but I don't think they could be. I also checked if flash ide could use import any COM components, but I could not find anything on it.
"Give me enough medals and I will win you any war"
- Napoleon
|
|
|
|
|
I believe I remember seeing a Flash COM component before... Sorry I'm not of much help though.
Why waste time learning when ignorance in instantaneous
-Hobbes
|
|
|
|
|
On http://www.macromedia.com[^]you should be able to download the shockwave flashplayer ocx.
Once you have registered the component on your system, you can include it as an activeX component in your resources...
All you have to do then is create your flash movies and load them from your app.
Don't think you are, know you are...
|
|
|
|
|
|
Hi
These days, I'm down for the difficulty of Ado programming with VC++, would you mind telling me how to get the resource of Ado programming with VC++? By the way, MSDN tell me a very nasty way to programming with ADO.
Thank you in advance.
Extreme programming. Do the No.1
|
|
|
|
|
Do you mean what book should you read ? What's wrong with the way MSDN does it, exactly ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
There are some great examples on CodeProject for using ADO with C++.
http://www.codeproject.com/database/#ADO[^]
Are you using #import on the ADO Library. If you are, this gives you a wrapper class pretty much equivalent of VB - so you should be able to convert the VB examples into C++ very easily.
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|
|
Hi,
may I know is it possible to import C++ code into vb code?
I have a problem here. I have a c++ code that I intrnd to add into my application but my application is written in vb and I afraid that the libraries that it used is not available in vb?
Thank you.
=) hibiki
|
|
|
|
|
*grin* is this a troll ? VB is not a real language. I know, I'm using it right now. The only reason VB is ever useful is that it can call COM objects, which can be written in C++. If you want to call your C++ code from VB, you'll have to expose it via COM, or rewrite it assuming it uses the subset of C++ which exists in VB ( from memory, the mathematical operators )
I apologise for my sarcasm - VB sucks and I am having a bad day trying to use it. But the answer is no, they are different languages, and you cannot take code from one into the other. If it's a function, rewrite it ( if you can ), if it's a class, expose it via COM.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|