|
For creating UI, MFC is still the right choice.
MFC also has a feature pack which helps to create advanced UI applications.
There is also an unsupported library called WTL.
ATL is mostly used to create COM and COM based components.
The most important library for any C++ application is STL.
Be sure to learn that.
STL is definitely portable across platforms.
|
|
|
|
|
Thanks! Very interesting.
Just wish to understand the STL role. What role does it play? Is it for UI? Or it is a general purpose library?
I'll have to take a look around to decide what path to take. There are also other libraries recommended by Rajesh (OpenSource crossplataform) that I will have to take a look.
Thanks again for your feedback.
REgards,
Fábio
|
|
|
|
|
It is a general purpose library like Rajesh already explained.
After you have learnt STL, you need to look at the Boost[^] libraries.
The new C++ standard yet to come out, takes a lot of stuff from the Boost libraries.
|
|
|
|
|
If you want to port to other platforms, use qt from the start; do not start using proprietary non-portable libraries because it will make things harder later on if you want to make things portable.
Max.
This signature was proudly tested on animals.
|
|
|
|
|
I thought of that. I seriouly plan to look at Qt. If I want to do portable apps, that's the choice I've made.
Thanks!
Fábio
|
|
|
|
|
Many people move from MFC to C#.NET. Why do you want to move back?
|
|
|
|
|
Because he came to his senses?
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
You said "I've been using wxWidgets". This means you don't like MFC any more.
|
|
|
|
|
No, I gave up on MFC. It's become bloated with every "new" Microsoft technology that they've tried to shoehorn into it. Also, Microsoft has bungled the whole DLL thing and made a mess of it. .NET is Microsoft's shiny new baby and I expect them to put MFC on the back shelf as soon as they can reasonably pull the plug. They tried once but did it too soon and got a fierce backlash they weren't expecting. My current focus is robotics and I want what I do portable to Linux. Someday I may just tell Bill and his merry crew to buzz off.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
For several reasons:
1 - Learning something new opens up the mind, it's harder and allows me to understand better the underworks of a system. Also, Unmanaged code interops better directly with OS and it's specially useful to control hardware.
2 - I intend to build performance critical applications that managed code can't handle.
3 - I want to open up new job opportunities. There's still plenty of market for C++ jobs and the candidates are beggining to grow hard to find. The jobs are getting better paid.
4 - I don't plan to really "MOVE" from C#, I plan to add it to my set of skills
5 - It's fun.
Regards,
Fábio
|
|
|
|
|
Hope some day Microsoft will make MFC just like QT.
|
|
|
|
|
I doubt it. Microsoft seems to insist on building technologies that will work with their own. Heck, even their own products are so tightly developed that won't work on their own systems (take Sharepoint 2005 and Windows Server 2008 for example, a lot of hassle).
Even if they support something that will work across platforms, they won't release the code and won't directly support it (case of mono/C#).
|
|
|
|
|
1) Choosing MFC is not a good way to learn the basics of the Win32 API. I would choose WTL or similar. Remember Winforms is also just a wrapper around the Win32 API.
2) There are very few places where managed code will fail. If dealing with a very performance critical code, then one will wrap this in a dll and call it from managed code.
3) Learning C++ is not a bad idea, it will allow you to see how many places .NET is holding your hand. But always choose the right tool for the job.
4) I would then focus on learning how to interop between managed and unmanged code. Instead of learning something as awful as MFC.
5) Can't argue with that 
|
|
|
|
|
1) The purpose I have on MFC is not really learning the Win32 API, I have the Windows via C/C++ for that. The purpose of MFC is to learn something that's still in demand on the market and allows me to build performance critical desktop apps, including drawing in GDI. I have to take a look on WTL, don't know how productive that will be and if it has demands on the market (that's the reason I'm choosing MFC), anyways, I heard it's an easy transition from MFC too. And yes, Winforms wraps the Win32API so good that I had no idea on how it works through it, needed to learn stuff from other plaeces so I could do some OS level operations not available natively in .Net
2) This is on of the greatest advantages of managed code, I'm aware of that, garbage collector can do miracles, but even using unmanaged code from managed code will defeat the performance purpose. I know that the operation done inside the dll will be fast, but all the rest will not, beginning with app startup.
3) Aye, I figure Visual Studio is still the tool. As for the libraries and frameworks, I will have to work on that.
4) That I do already, I had to do several native code calls from my manged applications. This include Windows APIs and native code libraries (COM).
5) Hehehe, I guess you know what I mean then 
|
|
|
|
|
Dear All,
I am working with ODBC API. My Requirement is to Move a Record to Move First Position, Last Position,Previous Position and Abosulte Position.
I dont want to use CRecordSet.MoveFist()... etc. Instead i am using ODBC Api's Like.
SQLAllocEnv(...)
SQLAllocConnect(...)
SQLDriverConnect(...)
SQLAllocStmt(...)
Etc... . With Api's I want to Move the Record to First,Last,Previous and Next Position of the Record. Please give me the Code Snippet to Move the Record to First,Next,Last and Previous Position. The Code must be in ODBC Only i dont want CRecordSet Wrapper.
How can we achieve this. Please Help Me Out. I want it Urgent.
Thanks in Advance.
Uday.
|
|
|
|
|
Check out SQLFetchScroll() and SQLExtendedFetch() .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
This [^] maybe interesting for you.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Dear Pallini,
SQLHENV envHandle;
SQLHDBC ConnHandle;
SQLHSTMT StmtHandle;
SQLRETURN Ret;
SQLSMALLINT szConnStroutlen;
SQLCHAR sZ_AuthorName[50];
SDWORD sdoutputDataLen;
unsigned char szConnStrout[255];
Ret = ::SQLAllocEnv(&envHandle);
Ret = ::SQLAllocConnect(envHandle,&ConnHandle);
Ret = ::SQLDriverConnect(ConnHandle,
NULL,(SQLWCHAR *)_T("Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\\Uday.mdb"),
SQL_NTS,(SQLWCHAR*)szConnStrout,sizeof(szConnStrout),&szConnStroutlen,SQL_DRIVER_NOPROMPT);
Ret = ::SQLAllocStmt(ConnHandle,&StmtHandle);
//To Fetch a Relative Record.
Ret = SQLFetchScroll(StmtHandle,SQL_FETCH_FIRST,0); ---> //Here it is Failing Help me out Please.
Thanks & Regards,
uday
Please Help me Out.
|
|
|
|
|
janaswamy uday wrote: Ret = SQLFetchScroll(StmtHandle,SQL_FETCH_FIRST,0); ---> //Here it is Failing
Meaning what?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Dear David,
I am not getting a Correct Output for the APi what i have used.
Please help me out.
Thanks & Regards,
Uday
|
|
|
|
|
janaswamy uday wrote: Ret = SQLFetchScroll(StmtHandle,SQL_FETCH_FIRST,0); ---> //Here it is Failing Help me out Please.
Have you taken a look at the "Returns" and "Diagnostics" sections of the Docs for SQLFetchScroll[^] function? What is the return value, and if it is a failure, what does the diagnostics reveal?
The solution to your issue may be right there.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
I really would like to help you, but.....The other guys already did.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi Every one.
actually It's the first time I use CSpinButtonCtrl in Visual Studio 2008 sp1
But it seems that it's not working with it's buddy control (in fact it does not do anything)
, here is my code in OnInitDialog() method, any Idea if I forgot something here!
CSpinButtonCtrl* pSpinCtrl = (CSpinButtonCtrl*)(this->GetDlgItem(IDC_SPIN1));
pSpinCtrl->SetBuddy(GetDlgItem(IDC_EDIT_SPIN_BUDDY));
pSpinCtrl->SetRange32(10,500);
pSpinCtrl->SetPos32(20);
|
|
|
|
|
Amir_m wrote: CSpinButtonCtrl* pSpinCtrl = (CSpinButtonCtrl*)(this->GetDlgItem(IDC_SPIN1));
pSpinCtrl->SetBuddy(GetDlgItem(IDC_EDIT_SPIN_BUDDY));
pSpinCtrl->SetRange32(10,500);
pSpinCtrl->SetPos32(20);
I don't see any problem with your code. Did you forget to set the "Set Buddy Integer" property of the spin control to true? If not, try that. Additionally, I would recommend that you add a control type member variable to your edit box (the buddy control), say m_Edit and add a control type member variable to the spin control as well (say m_Spin ). And then rewrite your code like this:
m_Spin.SetBuddy(&m_Edit);
m_Spin.SetRange(10,40);
m_Spin.SetPos(12); This way, you could avoid the casts, avoid an extra pointer variable, and avoid GetDlgItem [^]
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
guys...
i want to do a software to read text data and display the text...
this was the idea...the program should read the txt file...when the file was open, it will display one by one of the text...can anyone help me with this?? please...
|
|
|
|