Russell Gantman wrote:
Could my problem be that I do not have a class which is derived from CWinApp?
Yes, definitely and most likely
Thanks a lot for your help, that did it.
All I had to do was add another class derived from CWinApp and instantiate an object of that type and the assertion
went away. It really makes sense since there was no CWinApp object which means AfxGetApp has nothing to get
I skate to where the puck is going to be, not where it is.
Have any one of you migrate any VC++ (using MFC, ver 6.0) program from Windows 32 bit operating systems (XP, 2000, ME, 98SE) to Windows Vista? If so, can you please share some of the problems you have faced and there resolutions? (I heard that Vista has a memory issue if somebody uses malloc/calloc functions). Any additions to this list (with/without resolution)?
I would use either TBB mentioned above, or use Qt. The primary reason is that most threading libraries lack thread compatible containers for data. TBB will be easier to code since it is higher level than most thread classes, but it still amounts to the same thing: you insert the code into a skeleton codeset. If you are simply using threads for scientific problem solving you may not need the storage containers, still it is nice to have.
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
I'm not sure what it is called not do I know how to do it, hence this is why I'm here . I'm trying to develop an application (very simple at first) that resembles a Microsoft Window, i.e it must have object that one can click on that will open other applications. Makes sense ??
Can anyone please help me in this regard ?
Many thanks in advance
The only programmers that are better that C programmers are those who code in 1's and 0's
That's more than a little vague - or a bunch of questions.
The open other applications for example...
Do you mean bring running applications to the foreground?
Do you mean run new programs? If so, read up on ShellExecute, or CreateProcess.
How will this be presented to the user?
A few buttons on a dialog that run hard coded programs?
Read a list of programs from shortcuts in a directory?
An editable list?
Will you extract the appropriate Icon from the executable so you can show a pretty pic to the user?
As you can see, this is multiple tasks. If you can more clearly define them, you may get help with individual ones. At the moment it looks like: "I have to write something, and I'm not even sure what it needs to do. Can you do it for me?". And that's a rapid road to being ignored.
You've asked many questions here on quite complex subjects, and even answered some. So none of the above should stretch you too far.
Using MFC, you can make an SDI application, and make the view descend from a CListCtrlView. Set it to large icon view, and you're part of the way there.
Choosing the text / icons is another challenge. Pick a directory, and use FindFirstFile etc to get all the *.exe files there? Extract the icons from each of them?
Then handle the double click / enter events to say "aha, the user has chosen one!". Then launch the application. As you say you don't want to a run a program, then I don't know what you mean by it. But I'm sure it's explainable.
Basically, just break this down into smaller parts.
First, the listview SDI app, and fill it with a couple of hardwired words / icons.
Second, get a list of the programs / thingies you care about.
Third, give them appropriate pics.
Fourth, work out how to handle enter key / double clicking on one.
Lastly, lauch the application the use picked.
I have a menu with a combo box as one of its item. The combo box has 4 entries. When I compile and run my application I find that the each entry in the combo box gets repeated. So my menu shows 8 combo box entries instead of 4. Why is it so?
Also while running the application in debug mode, the combo box is blank when I launch the menu. But in release mode, the first combo box entry appears as default value. I want to avoid this.
Please suggest me a solution for the above 2 problems.