|
It's a dialog based application, can't find
ExitInstance()
|
|
|
|
|
Override it, easiest done with the class wizard.
|
|
|
|
|
is that means CDialog class has a ExitInstance() member function? inherited from ,maybe a parent class.
I will check thhat
|
|
|
|
|
It means that your Application object (derived from CWinApp) has an ExitInstance() override.
|
|
|
|
|
Since you're adding the font in the application's InitInstance method, it would be properly matched if you release it in ExitInstance[^].
It would also work if done in the destructor of the dialog class, but ExitInstance would be cleaner.
The Visual Studio wizard does not normally output the dialog class destructor, but you could write one yourself as you would normally do and it will be called when the dialog class goes out of scope.
«_Superman_»
I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) (October 2009 - September 2013) Polymorphism in C
|
|
|
|
|
|
I am a C++ programmer(based on Visual Studio-MFC, Win32). I have 3-year work experience, now i'm so confused when search jobs at monster.com. So many Android job chances, and very few Windows C++ jobs. And the salary of Android is much better than VC++.
To my dismay, Microsoft had fooled a lot of people, its technologies uupdated frequently and many of them are out of date, like Visual Basic, SilverLight, MFC, FrontPage, Expression Studio and so on.
So confused about my situation, should I learn Android or go on learning MFC/Win32 or Linux C++ development?
If should I learn Android, where should I start? How long will it take to make me a Anroid programmer?(If I want to find a Android job)
I want to hear your recommentations.
|
|
|
|
|
Hm... I'll give you Silverlight, but MFC and Visual Basic both lasted over a decade, which isn't too shabby in this business. MFC is still supported and developed, but far less used, these days. (If you want to work with GUIs on Windows, learn C#.)
Predicting the future is notoriously hard, and predicting what platforms will be around in five years isn't much easier (remember Symbian, which had close to 100% of the smartphone market?) so it's hard to give advice, especially since the smartphone/social media/online world is experiencing a nice bubble at the moment.
The main language used for Android development is Java, which means learning a new language and its libraries, as well as the quirks of the Android platform. How long did it take you to learn C++/MFC?
Of course, you can also develop for Android using C/C++, C# (via Xamarin's Mono), or JavaScript (via PhoneGap). As the latter two are evolving and improving, I'd say they are better bets, since they both are platform-independent. However, most Android jobs I've seen advertised have been for Java-based development.
In the end, it comes down to what you want to work with. If you enjoy C++, why not stick with it? It will be around for a good while yet.
|
|
|
|
|
thank you so much for the long response~ it's a good answer.
|
|
|
|
|
Falconapollo wrote: How long will it take to make me a Anroid programmer? I've been doing it for nearly fours year, and have barely scratched the surface.
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
may i know your salary? PS: i'm from Beijing, China.
|
|
|
|
|
You're not confused, you're scared. Welcome to analysis - paralysis.
"So many Android job chances, and very few Windows C++ jobs. And the salary of Android is much better than VC++."
Why are we still talking? Go get a cheap tablet, there are numerous Android resources on the network, and I suspect a few getting started articles on CP.
You have 3 years of experience, many of us have 30+. If you want to do Android, do Android.
Charlie Gilley
<italic>You're going to tell me what I want to know, or I'm going to beat you to death in your own house.
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
excuse me, 30+? you mean 300k dollars per year?
I'm from China, work in Beijing.
|
|
|
|
|
300K / year? lol, no. I mean over 30 years of experience.
Although if you start working for yourself, you might get there and more.
Charlie Gilley
<italic>You're going to tell me what I want to know, or I'm going to beat you to death in your own house.
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
wow, over 30+ years experience. it's almost impossible to find such a person in China, we have fall behind for a long time. are you a manger?
|
|
|
|
|
I was at one time. Work for myself now as an independent business.
Charlie Gilley
<italic>You're going to tell me what I want to know, or I'm going to beat you to death in your own house.
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Maybe you could consider developing with QT?
You write one C++ code that you can compile for all major platforms ...
|
|
|
|
|
|
Dear all;
I wanna implement a application.
1.play sound from buzzer on motherboard in win xp, win 7, win 8.
2.play wav from sound card in win xp, win 7, win 8.
The function 2 is OK, but the function 1 failed.
(A)use Beep function
i. works on win xp.
ii. failed on win 7, the sound just play from the sound card.
iii. failed on win 8, the sound just play from the sound card.
(B)use MessageBeep function
i. Did not test on win xp.
ii.failed on win 7, the sound just play from the sound card.
iii.Did not test on win 8.
Somebody says the Beep.sys was different between win xp and win 7. I don't want to replace the Beep.sys on win 7.
How can I implement this application?
Thanks for your help. Victor
|
|
|
|
|
See the Beep function[^] in the MSDN. It describes why the sound is generated by the sound card with Windows 7 and later. Modern PC systems did not have the timer chip to generate the sound for the internal speaker. Without the timer chip, there is no need for an internal speaker. Some system manufacturers has therefore added a buzzer to their systems. But this is not true for all systems.
So you should use the MessageBeep() function which decides how to play the sound. Your application may also check for the Windows version and use the Beep() function whith XP. But you can not rely on the existance of an internal speaker or buzzer.
|
|
|
|
|
But you can not rely on the existance of an internal speaker or buzzer
I guess that every PC has something that buzz when he had no RAM inserted in he's RAM slot ... or not ?
|
|
|
|
|
You are probably right about the buzzer.
|
|
|
|
|
Dear Jochen:
My computer install two operation system, win xp and win 7
use MessageBeep()
1.XP-Did not test.
2.Win 7- The sound play from sound card, not buzzer.
use Beep()
1.XP-The sound from buzzer.
2.Win 7- The sound play from sound card, not buzzer.
So I ensure the buzzer exist.
Anything else method?
Thank for your help, Victor
|
|
|
|
|
The simplest solution to use the buzzer/speaker with XP and the soundcard with Vista and later is:
OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&osvi);
if (VER_PLATFORM_WIN32_NT == osvi.dwPlatformId && osvi.dwMajorVersion >= 6)
::MessageBeep(-1);
else
::Beep(1000, 1000);
If you want to use the buzzer with Windows Vista and later, you must replace the beep.sys driver (which is a bad option). There may be alternatives by accessing the buzzer by low level code. But these will probably not work with 64-bit Windows versions.
If have found BEEPx at http://www.waldbauer.com/tmp/reference.php[^].
|
|
|
|
|
IIRC, Beep is synchronous and MessageBeep is asynchronous.
MessageBeep is the recommended way to go.
To play a real WAV file, you could use the PlaySound[^] function.
«_Superman_»
I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) (October 2009 - September 2013) Polymorphism in C
|
|
|
|
|