Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / MSVC++ 2003 & MSVC++ 2008

Author
Message
MHS
15
Years of Service
User Offline
Joined: 16th Aug 2009
Location:
Posted: 30th Sep 2009 08:50
hi
i've just started writing windows apllication but there is a problem i can't figure. here is a project written in MSVC++ 2003 and when i want to open it by MSVC++ 2008 the conversion wizard comes up and then every thing goes fine. but if i make a new project (win32/windows application/empty project) and copy the code it doesn't work and i'll get 3 errors and 1 warning. i compared the code int converted project with the code in the original project but they are no different at all.
the book i'm studying is on MSVC++ 2003 and with this problem i can't write even one working code of it.
what should i do?

Attachments

Login to view attachments
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 30th Sep 2009 22:37
I tried to compile your code, also got errors, but I know what the problem is. The later version of the C++ compiler supposes that you use Unicode character set, since this is the preferred choice in later versions of Windows. The program, however, supposes that you use simple character set.

To make the compiler choose the simple-character version of the operating system functions, open the project properties, then choose Configuration Properties; General. You should see a "Character Set" option which is by default set to Unicode. Change that to "Not set". This solved the compilation problems for me. Except for the warning, but that's a completely different issue. (The warning tells you that you are trying to compare a signed and an unsigned integer, which can be solved by changing the type of the variable.)

Remark: This code you are testing is a Windows API program. Note that you don't need to learn about the Windows API to use Dark GDK. It doesn't hurt if you know something about it, of course, but it's a lot of work to learn to use the API for any meaningful purpose.

Login to post a reply

Server time is: 2024-10-01 14:26:52
Your offset time is: 2024-10-01 14:26:52