|
jkirkerx wrote: I created a Win32 non empty test project SDI or dialog-based? If the former, what style did you opt for?
jkirkerx wrote: ...I hand edited the rc file, and added \t Alt-F5 to Exit in the File Column.
I did the same thing. It failed to show at runtime. It shows in the menu editor, however.
I still don't understand how I removed Ctrl+S earlier (there's no sign of it in the .rc file) and it still shows up at runtime.
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Opened Visual Studio 2008 on Windows XP
New Project
Visual C++
Win32 Project
TestProject
OK
Welcome to the Win32 Application Wizard - Next
Windows Application
Finish
Right Clicked TestProject.rc - > View Code
Went to MENUITEM "E&xit"
typed in "E&xit\t Alt-F5"
Save
Run
I get the Exit tab Alt-F5 in the menu bar
I didn't add an accelerator to it, just wanted to see if it displays.
Properties
Use of MFC - Use Standard Windows Library
Use of ATL - Not using ATL
Character Set - Use Unicode Character Set
|
|
|
|
|
jkirkerx wrote: Opened Visual Studio 2008 on Windows XP New Project Visual C++ Win32 Project
The problem has to do with MFC.
[edit]
Related questions here and here.
[/edit]
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
modified 18-Apr-12 11:13am.
|
|
|
|
|
I had the problem where the Alt-X worked for Exit, but my Alt-F5 work not do anything.
I loaded the accelerators,
HACCEL hAccelTable_Main, hAccelTable_Keys;
hAccelTable_Main = LoadAccelerators( hInstance, MAKEINTRESOURCE( IDR_NASE2012_SUWIZARD ));
hAccelTable_Keys = LoadAccelerators( hInstance, MAKEINTRESOURCE( IDA_KEYBOARD_ACCELERATORS ));
And then I realized I had to capture the messages. So now both sets of accelerators work concurrently.
while ((bReturn = GetMessage(&msg, NULL, 0, 0)) !=0) {
if (bReturn == -1) {
}
else {
if (( !TranslateAccelerator( g_hWndMainFrame, hAccelTable_Main, &msg )) && ( !TranslateAccelerator( g_hWndMainFrame, hAccelTable_Keys, &msg ))) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
}
|
|
|
|
|
I've done this before with Win32 and with dialog-based applications. Not something you typically have to do, however, with an SDI (MFC) application.
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
That's why I started with win32, to learn the basics or foundation first. Then I can just perhaps upgrade my app to MFC.
Good to hear your accelerators work and display correctly now. I'm sure that was a head banger.
I'll be posting my head banger soon today, after I have exhausted Google, Docked toolbars.
|
|
|
|
|
The code below includes NameOfClass in debug build.
#ifdef _DEBUG
friend class NameOfClass;
#endif
How do I exclude NameOfClass from release build in vs2008?
Thanks
modified 16-Apr-12 11:54am.
|
|
|
|
|
You're already excluding it with that statement. If you want to exclude the whole class completely, wrap the include statement with that same pre-processor directive.
|
|
|
|
|
|
Hello,
I developed an MFC application in vs2008 and it works fine.
After compiling the project in vs2010 the program crushes when i run it(the compilation goes fine).
What could be the problem?
Thanks.
|
|
|
|
|
Your glurblecruncheon interfaced with your gobblewarts.
It's not sufficient to say that it crashes - what is it doing when it crashes? What environment is it running on? What does the code actually look like at this point? Is anything written to the event log?
|
|
|
|
|
Does the application say anything when it crashes? Does it crash in both debug and release modes? Does it crash immediately or run for a while? If it crashes immediately, why not just look at the call stack to see where it crashes.
You need to provide a lot more information...
|
|
|
|
|
Dear friend don't worry it is a normal issue. The solution is available at http://connect.microsoft.com/VisualStudio/feedback/details/527167/upgraded-2008-project-compile-error-filetracker-dll
|
|
|
|
|
1. You should reply to the OP not to others who offer answers.
2. You should make your links clickable; like this[^].
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
Perhaps you should have replied to the original poster, rather than to Albert. He isn't the one having the issue, and the original poster doesn't receive notifications of replies to other people.
|
|
|
|
|
Am really sorry, am new to this session
|
|
|
|
|
Have a look to the thread, Member4725068 gave a link where it is explained, which was reposted as a clickable link by Richard MacCutchan
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.
|
|
|
|
|
|
I have been working with MFC for many years. I know the library and specially my way around to make my programs. Right now my career is not very into programming so I'm not over the newest and biggest wave around. Basically I’m programming for my pleasure and maintaining some programs I have. My doubts arise when you start seen winRT, .net and all those fireworks that we see every day. I want to keep doing what I do, but not be a dinosaur that someday realizes that it’s like still programming for Windows 98. What are your opinins and recommendations as what should be my next step (MFC, WinRT, TheBestFramerorkEver, etc.)
|
|
|
|
|
Personally, I would give a try to WinRT.
Veni, vidi, vici.
|
|
|
|
|
If you're a long time Windows/MFC programmer get away from Microsoft stuff for a while. It's very easy to get wedded to a particular vendor's tools and end up locked into their corporate strategy. Then when they bugger off in a different direction you end up trying to get up to speed with something else fast.
So spread your wings a bit...
- Pick up a linux or FreeBSD distribution and see how you can write code for them and how it's different/same as for Windows
- Grab a portable application framework (WxWidgets is good if you're well used to MFC) and see how you can build it and use it
- Learn another language like Python or Haskell. Python's a surprisingly close to C++ despite looking totally different and Haskell's a completely different programming model
- Reads loads of books about how to write large systems and see how that's different from how you write small ones
- Find an Open Source project that sounds interesting and a bit outside your comfort zone to expose you to how other people write code (get prepared to say WTF? and Ugh! a lot)
- If you REALLY want to stay programming just for Windows start writing the odd app in C rather than C++. Then try VB to see how that's different
Er, sorry, rambling, will stop now.
Good luck!
Ash
|
|
|
|
|
Thank you for your point of view. It surprices me that your recommendation is not in MS world. I like C++ as a language because for me it feels natural to me. I have programmed in many languages, some high level, others not so much, but I always come back to C++.
I would like to know if there other adventages to WxWidgets besides portability becasuse most of my programming has been for windows, and my target users use windows for now.
I have a lot of code in MFC, some programs will stay there until they die, others I would like to evaluate migrating to other frameworks, to take advantage of what the future brings (mobile, touch, etc). The problem right now I see is that many people are saying that this is dead and that is the futures and so on. Most is marketing but in the end I don't clearly see that MS is giving a long life to MFC. On the other hand, going to WinRT, it feels like as an experiment that could be dropped on the next release as we have seen many times. WxWidgets on the other hand has been for some time, but never tried. I think it will be arround for some years from now.
|
|
|
|
|
Disregard my advice to learn other languages then, looks like you already know a pile of them .
I recommend getting away from MS once in a while because you can get stuck in a bear trap if you use nothing else[1]. I see loads of poor buggers still trapped using VC++6.0 (on these forums and in real life) and I almost cry for them. Then I remember they made the choice to swallow the hook MS fed them gave them and now they can't choke it up. Instead of using standard C++ they splatted on every MS extension they could find. When MS finally came up with a very good standard compiler in 2003 (2002 was nearly there) they were stuck. Huge job to move the code.
Anyway, I don't recommend writing non-portable code, even if you just use windows, as it's your ticket out of trouble when you have to change tools. And portable code has another advantage: If you need a programmer quickly you have a greater pool to draw on, you're not just stuck with the subset of VC++ programmers and you're a member that bigger pool as well.
Where was I? Oh yes, WxWidgets next. So WxWidgets is meant to be portable so it's not a bad thing. However if you only ever do Windows in C++ with the caveats above it won't do a lot for you. You might as well keep using MFC. You might still like to look at the differences in implementation between WxWidgets and MFC, the things they do differently, the rubbish ideas in both, the great ideas in both.
For the next big thing I'd wait a couple of years and see what catches on. After a few years the good ideas are still there and the bad ones are gone apart from the people who invested heavily in them. Try and avoid the marketing spend (Sun and Microsoft spent loads on selling Java and .Net to non-techy managers, not developers) and concentrate on what helps you right now. I use a lot of open source libraries (expat, libCURL and OpenSSL to name three) and they can quite often do what the big guns are trying to flog in a more effective way.
So the moral of this lot is avoid company tie ins - they're usually bad for you. Keep learning stuff outside the box you're in (whether employer mandated or self imposed) and you can't go wrong. Well you can but it'll help in the long run.
Sorry about the length of the post, I'm not sure if I've answered your points that well though!
Cheers,
Ash
[1] And I say this with 6 different versions of MS's compiler on my computer
|
|
|
|
|
Thank for the time spent on answering my question. I think you are right on spending some time on external libraries.
|
|
|
|
|
You may like to look at C#, which should be fairly easy for you as an MFC developer. .NET Book Zero[^] by Charles Petzold is a great introduction, and these tutorials[^] on MSDN are quite helpful. Once you feel comfortable with C# and .NET, you can move on to WPF or ASP.NET, but of course, it all depends on where you want to be in the future.
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|