|
After using VC6++ for years I just purchased VS2008. It is radically different and I am quite confused. Is there a good tutorial or book that will teach me how to use MFC for this version. I don't want to use any of the managed code stuff or C#. I want to be able to do the things that were simple in VC6++.
For instance, put "This is a test in a ListBox". That was simple with VC6 and MFC. Four hours into VC++ 2008 and I haven't been able to get that to happen. In VC6 you could add a CString variable to a ListBox. There is no CString ListBox variable option for VC++ 2008.
Also, Class Wizard in VC6 allowed me to see any variable that had been assingned to a control. And Class View also allowed me to see all the variables that had been created for the project. Apparently neither one of the options are available in VC++ 2008. Class View doesn't show any control variables. In fact it doesn't show much of anything. And since I can't see the variables there appears to be no way to delete one once it is assigned to a control.
I do see the variables listed here:
CHIDTest2008Dlg::CHIDTest2008Dlg(CWnd* pParent /*=NULL*/)
: CDialog(CHIDTest2008Dlg::IDD, pParent)
, m_strText(0)
, m_ListBox(0)
, strListBox(_T(""))
, m_strListBox2(0)
{
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
But that is really of no use. And the online help is not much help. Am I missing something basic here or is this the way the environment really works. Was Microsoft trying to move everyone to managed code or C#?
Again, if anyone has a recommendation for a good book that only covers the MFC part of VS2008 I would appreciate them passing that along.
|
|
|
|
|
2buck56 wrote: In VC6 you could add a CString variable to a ListBox. There is no CString ListBox variable option for VC++ 2008.
a CString can cast itself to an LPCTSTR, so CListBox.AddString doesn't need an explict CString overload.
but, i can see class variables in the Class View. click on the class in the top pane, and the members will appear in the bottom pane.
|
|
|
|
|
Chris,
Thanks for the tip. I had been clicking on the + to expand the class. Clicking the class does display the variables as you said. Now, how would I delete one of the variables or functions? In VC6 you could do that with the Class Wizard. Do I have to manually remove the members in VC++ 2008?
|
|
|
|
|
2buck56 wrote: In VC6 you could do that with the Class Wizard. Do I have to manually remove the members in VC++ 2008?
don't know... i've always done it manually.
|
|
|
|
|
[Sarcasm] The removal of class wizard is one of the several intended "improvements". [/Sarcasm]
2buck56 wrote: In VC6 you could add a CString variable to a ListBox.
OK, this has nothing to do with visual studio versions, but I'd recommend using a control variable instead!
2buck56 wrote: Again, if anyone has a recommendation for a good book that only covers the MFC part of VS2008
Among other things, Beginning Visual C++ 2008[^] covers MFC as well.
I do hate some of the the "changes" that they've made. But at least the compiler has improved a lot.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
The loss of the class wizard drove me nuts at first. I still do a lot of work in VC6 and when the class wizard works, it's very refreshing. However, I'm reminded how often it fails and have found that I'm so accustomed to how VS 2008 works that a few things are now easier in VS 2008. Good news is that VS 2010 brings the class wizard back and improves on it, or at least parts of it (I haven't dug deeply into it.)
Do note that MFC itself hasn't changed much if up-porting an app. There is the feature pack additions (which range from interesting to totally junk) and there are some minor quirks when up-porting MFC.
As for the class wizard replacement; you use the properties. Triggering it is very confusing but you basically have to open the properties pane and .h file and click on the class name or the .cpp file and click in the message map block. A lightning, and two nonsense icons will pop up on the top of the pane which will show you events, messages and overrides.
Like I said, I totally hated this at first, but it's grown on me. I'll still welcome the class wizard back, but won't totally abandon this method. And given all the other niceties of VS 2008, I'm very ready to abandon VC 6 in about three week's time (I've actually already converted the entire solution to VS 2008, but we can't switch until we ship our current release, which is in beta. One very nice thing will be that our .NET and C++ modules will be built with the same solution for now on.)
|
|
|
|
|
Thanks everyone for the help and suggestions. I guess I'll just have to grit my teeth and learn the new IDE.
I manually deleted a couple of variables and classes from the test app that I was working on and it went well. Not as easy as the old class wizard but at least it works.
|
|
|
|
|
How can I get in MFC to display Operating system version(Vista, Xp, etc..) if possible? Any ApI, or Registry ?
|
|
|
|
|
It's all here[^] on MSDN.
MVP 2010 - are they mad?
|
|
|
|
|
Richard MacCutchan wrote: MVP 2010 - are they mad?
Definitely...
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]
|
|
|
|
|
CPallini wrote: Definitely
Well at least we agree on one thing!
MVP 2010 - are they mad?
|
|
|
|
|
"You hate me and I hate you
So at least we understand each other"
--The Kinks
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]
|
|
|
|
|
|
I need a program in PHP which can extract the hidden biders from ebay.I will have to insert the item number and the program must show me all bidders of the auction and their emails.
Also the same program must extract the registered contact information for any specified bidder specially the email address
I will pay for this
If someone can help please contact me at totos_back@yahoo.com
Thanks
|
|
|
|
|
BTW: posting plain e-mail address on a public forum is silly.
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]
|
|
|
|
|
Try rentacoder[^]
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
totolcm wrote: I need a program in PHP which can extract the hidden biders from ebay...and the program must show me all bidders of the auction and their emails.
Why? If eBay wanted you to have that info, they would not have got to such lengths to keep it from you.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
|
|
|
|
|
DavidCrow wrote: Why?
for feeding into a spam machine, of course.
why is it that half the questions on this forum come from people writing software that sounds like it's going to make all of our lives more miserable ?
|
|
|
|
|
This scumbag has posted his crap on pretty much every board. I hope the hamsters have their bugspray handy and deal with this infestation quickly.
|
|
|
|
|
Hello all,
I have began to get very interested in the security of a program. Along side with that I figured it would be beneficial to me to learn how to capture a programs memory. I want to be able to take a snapshot of whats going on behind the scenes.
I know I need to work with the iostream with C++. I am taking a class in C++ now but wanna work on a side project on my own.
So would anyone have any recommendations for me as to where I should start reading?
Thank you all very much in advance for your responses.
V/R
Rob
|
|
|
|
|
I would take a look at the functions ReadProcessMemory/WriteProcessMemory.
Greetings
Covean
|
|
|
|
|
|
Yes,
Thank you both very much. I will read more on those two links when I get to work.
V/R
Rob
|
|
|
|
|
Hi all,
since I want to improve my knowledge (just for myself, not related to job yet) I am thinking on speaking with my firm to install a new version of Visual Studio (from the ones available) and start on my own.
I mainly know about c++, MFC and VC6 (I'm noway a guru though, just middle level).
The versions I can get from my firm are VS .Net 2003, VS .Net 2005 and VS .Net 2008 (I am not thinking on learn c# yet, but I will somewhen). I am interested in VC++ (with or without MFC) but with C++ standards proximity in the new VS. I have already read several times that there are some important changes between versions.
So.. which one of them do you think I should choose?
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
modified on Wednesday, January 13, 2010 7:31 AM
|
|
|
|
|
The latest available, I would say.
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]
|
|
|
|