|
Thx's all
I was wrong..
It's working..
THx's for help
singh
|
|
|
|
|
how can i give color to CtabCtrl buttons .......?
|
|
|
|
|
Hello,
I am planning to develop an opensource application which has to work on all three popular platforms (Linx, MAC and Windows). The application will have a core engine which is same for all the platforms and the UI will be different for each platform.
For windows, I plan to use WPF and for LINUX and MAC someother opensource UI framework.
I need to make the core engine as platform independent, hence I plan to write it on C++. How do I start about it? I am fairly new to C++ (I know the basics).
I know MFC is only for windows. Is it possible to develop a library which woks on all platforms using VC++? What are the other alternatives I have?
|
|
|
|
|
Christian Flutcher wrote: For windows, I plan to use WPF and for LINUX and MAC someother opensource UI framework.
Please have a look at the following links. All of them are completely cross-platform:
Visual Component Framework[^] - This one is developed and maintained by one of our fellow CPians, namely Jim Crafton.
WX Widgets[^]
QT[^]
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Rajesh R Subramanian wrote:
Visual Component Framework[^] - This one is developed and maintained by one of our fellow CPians, namely Jim Crafton.
WX Widgets[^]
QT[^]
Thanks for that You already suggested these when we had a lounge discussion on the same subject. Thanks anyway.
For writting the core engine, which compiler should I use? I have to make it as a DLL. And is it possible to use the Visual Studio editor even if I am not using MFC/C++ CLI?
|
|
|
|
|
Christian Flutcher wrote: For writting the core engine, which compiler should I use?
On Windows, you may use Visual C++ (Yes, visual studio).
Christian Flutcher wrote: And is it possible to use the Visual Studio editor even if I am not using MFC/C++ CLI?
Usually, there should be a way to get those open source frameworks (like WxWidgets, QT, etc.,) to work on VS IDE itself. After all, VS is just an IDE. Consult with the corresponding websites of those frameworks. But some may have its own IDE and that should not be a problem though - the IDE should work on all platforms, which is better in fact.
Not to mention that you will need to compile your application separately on the all of the target OS for generating the corresponding binaries of that OS.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Rajesh R Subramanian wrote: On Windows, you may use Visual C++ (Yes, visual studio).
I plan to use the borland compiler and use VS as editor. After completing it, I need to compile it for each platform, right? Do you know that compiler allows to create a DLL for that class in windows?
Thanks for taking time to help me. Your replies were really helpful. Thanks again
|
|
|
|
|
Christian Flutcher wrote: I plan to use the borland compiler and use VS as editor.
Is there a specific reason to it? If you are using the VS, then why not use the Visual C++ compiler itself?
Christian Flutcher wrote: After completing it, I need to compile it for each platform, right?
Yes, you will need to compile your code on each and every platform that you plan to deploy it on.
Christian Flutcher wrote: Do you know that compiler allows to create a DLL for that class in windows?
A DLL is also a mere PE File[^], and you will be able to create one with any compiler.
If you need to know how to create a DLL and use it, I will suggest this series of 4 articles written by Hans Dietrich:
http://www.codeproject.com/KB/DLL/XDllPt1.aspx[^] (Links to next parts of the series is on the article itself)
Also, see this: Regular DLL tutorial for beginners[^]
Write back if there's any trouble.
Christian Flutcher wrote: Thanks for taking time to help me. Your replies were really helpful. Thanks again Smile
My pleasure.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Rajesh R Subramanian wrote: Is there a specific reason to it? If you are using the VS, then why not use the Visual C++ compiler itself?
Correct. But this class should compile with other compilers which are in LINUX and MAC. So I think, using VC++ compiler won't allow me to compile the same code on other platforms. Correct me if I am wrong.
|
|
|
|
|
Using VC++ compiler on Windows has nothing to do with compiling on other platforms. If you write portable code, it will compile on any standard-conforming C++ compiler including VC++.
|
|
|
|
|
Okay. So I shoud not use any MFC classes. Use plain C++ classes for it, right?
|
|
|
|
|
Christian Flutcher wrote: Okay. So I shoud not use any MFC classes. Use plain C++ classes for it, right?
Right. Using the VC++ IDE not necessarily mean using MFC or ActiveX, which are specific to Windows. I just typed that out to you on another reply and you've posted it at the same time.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Christian Flutcher wrote: But this class should compile with other compilers which are in LINUX and MAC. So I think, using VC++ compiler won't allow me to compile the same code on other platforms.
Using the Visual C++ IDE necessarily not mean using the Windows API and Windows specific things like MFC, ATL, etc,.
As another user pointed out, write plain and portable C++ code, which is standards-conformant and that should compile on any standard C++ compiler. Hope that helps.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Rajesh R Subramanian wrote: write plain and portable C++ code, which is standards-conformant and that should compile on any standard C++ compiler. Hope that helps
Indeed. I am cleared now. Thanks.
BTW, all these C++ things are bit confusing compared to C#, isn't it?
|
|
|
|
|
Christian Flutcher wrote: BTW, all these C++ things are bit confusing compared to C#, isn't it?
Definitely NO. The managed world is a much larger mess when compared. There is a new .NET framework for download, every couple of days. There is a new technology every fortnight. By the time you finish mastering a new feature related to C#, that becomes obsolete. But that's not the case with C++. It is an old-timer language and exists for a "different" purpose. By all means, we should not compare C++ and .NET. One is a language and another is a framework. They both serve for different purposes and as I've said several times, they cannot rival each other on what they were built to do. But to my fortune, .NET was built with C++. Or just to be rude, "My compiler compiled your compiler".
C++ is just C++. Things like MFC, VCF, etc., are frameworks that are built with and built to work with C++, which might be confusing at the beginning. I suggest that you master the actual language itself first and then move on to technologies that were built with C++. I talked too much - but hey, that's your fault.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
That's why I love C++ than anyother language and trying my best to learn it. People like you are a real inspiration.
Rajesh R Subramanian wrote: I talked too much
I loved that.
|
|
|
|
|
Last question,
Is it possible to use reflection in standard C++? I need to invoke a class from it's name. It's trivial in C# .NET like Activator.CreateInstance will do, but what about C++?
|
|
|
|
|
Christian Flutcher wrote: Is it possible to use reflection in standard C++?
With standard C++, NO. Reflection is something that is within the managed (.NET) world. I would also recommend that you start a new thread if you have a "totally new" question. That would kinda fetch replies from more people and give more visibility to your query.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Okay. I should stop bothering you now. I will look into the reflection stuff later. Thanks for the help and have a great day.
|
|
|
|
|
|
IPC[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
prviously i tried with sockets for bluetooth programming but i found microsoft supports only a few dongle so now i decided to go with serial communication, so any body have tutorials or any materials regarding this if plz.. post me...
|
|
|
|
|
hi...
I have a CString like CString str ="1,2,3,4,5,6";
now i want to retrieve each one as string like
str1=1;
str2=2;
str3=3;
here "," is delimeter.
Even this is so simple... but i am not familier with CString methods.
please help me in this regard
Thanks in advance....
Regards
varma.
|
|
|
|
|
Use AfxExtractSubString function!
Regards,
Rane
|
|
|
|
|
See CString::Tokenize
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|