Click here to Skip to main content
15,889,867 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: OnInitDialog? Pin
David Crow30-Apr-12 6:07
David Crow30-Apr-12 6:07 
AnswerRe: OnInitDialog? Pin
Le Quang Long30-Apr-12 14:11
Le Quang Long30-Apr-12 14:11 
QuestionRestrict Copy and Paste Pin
john563229-Apr-12 18:35
john563229-Apr-12 18:35 
AnswerRe: Restrict Copy and Paste Pin
_AnsHUMAN_ 29-Apr-12 22:29
_AnsHUMAN_ 29-Apr-12 22:29 
AnswerRe: Restrict Copy and Paste Pin
JohnCz2-May-12 11:09
JohnCz2-May-12 11:09 
QuestionHow to setup the project settings when create an x64 project in cs2008? Pin
SAMZCN29-Apr-12 17:27
SAMZCN29-Apr-12 17:27 
AnswerRe: How to setup the project settings when create an x64 project in cs2008? Pin
Lakamraju Raghuram29-Apr-12 17:56
Lakamraju Raghuram29-Apr-12 17:56 
GeneralRe: How to setup the project settings when create an x64 project in cs2008? Pin
SAMZCN30-Apr-12 1:06
SAMZCN30-Apr-12 1:06 
Some marcos like WIN32/_WIN32 and WIN64/_WIN64 are used by VC++. I am not sure what's the difference between WIN32/WIN64 and _WIN32/_WIN64.
Lakamraju Raghuram wrote:
I think you have't fully understood that article.

When you are copying win32 settings to x64, that article clearly mentioned to change win32 switch to win64 for /D switch

Refering to the artical, the WIN32 macro should be repalced by WIN64 with /D switch support. But after I did it under the steps, the WIN32 macro still there but not replaced by WIN64. You may try it from your side. So I am confused by the result.I wonder if it is a defect of vs2008 IDE. Some other articals mentioned that the WIN32 macro always should be set with /D switch and with WIN64 macro definied for x64 application perspectively.

Lakamraju Raghuram wrote:
Which source code? your code or in any of the standard headers?

If it is yours, then you should take care to propely to map these settings to win32 and win64 pre-processor definitions

I found the _WIN64 macro in MFC header file of basestd.h. Here a code snap:
C++
#if defined(_WIN64)
    typedef __int64 INT_PTR, *PINT_PTR;
    typedef unsigned __int64 UINT_PTR, *PUINT_PTR;

    typedef __int64 LONG_PTR, *PLONG_PTR;
    typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;

    #define __int3264   __int64

#else
    typedef _W64 int INT_PTR, *PINT_PTR;
    typedef _W64 unsigned int UINT_PTR, *PUINT_PTR;

    typedef _W64 long LONG_PTR, *PLONG_PTR;
    typedef _W64 unsigned long ULONG_PTR, *PULONG_PTR;

    #define __int3264   __int32

#endif

So I am not sure which macro I should set in the preprocessor definition setting. By default, VS2008 IDE set the WIN32 macro with /D switch. Also I found _WIN32 macro is used in the MFC header files and source files.

modified 30-Apr-12 7:27am.

GeneralRe: How to setup the project settings when create an x64 project in cs2008? Pin
Randor 30-Apr-12 2:42
professional Randor 30-Apr-12 2:42 
Questionrelational operators in class time Pin
MMJ198929-Apr-12 14:28
MMJ198929-Apr-12 14:28 
QuestionRe: relational operators in class time Pin
Lakamraju Raghuram29-Apr-12 17:57
Lakamraju Raghuram29-Apr-12 17:57 
QuestionAsyncIO - how to use it? Pin
TalSt29-Apr-12 1:47
TalSt29-Apr-12 1:47 
AnswerRe: AsyncIO - how to use it? Pin
Aescleal29-Apr-12 3:22
Aescleal29-Apr-12 3:22 
QuestionEXE File Protection Pin
Le Quang Long27-Apr-12 21:22
Le Quang Long27-Apr-12 21:22 
AnswerRe: EXE File Protection Pin
Rajesh R Subramanian27-Apr-12 21:31
professionalRajesh R Subramanian27-Apr-12 21:31 
GeneralRe: EXE File Protection Pin
Le Quang Long28-Apr-12 0:12
Le Quang Long28-Apr-12 0:12 
GeneralRe: EXE File Protection Pin
Rajesh R Subramanian28-Apr-12 0:57
professionalRajesh R Subramanian28-Apr-12 0:57 
GeneralRe: EXE File Protection Pin
Le Quang Long28-Apr-12 16:19
Le Quang Long28-Apr-12 16:19 
Questionhow to make this not stop? Pin
Member 784572027-Apr-12 14:17
Member 784572027-Apr-12 14:17 
AnswerRe: how to make this not stop? Pin
krsmichael27-Apr-12 14:45
krsmichael27-Apr-12 14:45 
GeneralRe: how to make this not stop? Pin
Member 784572027-Apr-12 15:07
Member 784572027-Apr-12 15:07 
GeneralRe: how to make this not stop? Pin
krsmichael27-Apr-12 18:33
krsmichael27-Apr-12 18:33 
GeneralRe: how to make this not stop? Pin
Member 784572027-Apr-12 21:20
Member 784572027-Apr-12 21:20 
AnswerRe: how to make this not stop? Pin
Stephen Hewitt27-Apr-12 20:05
Stephen Hewitt27-Apr-12 20:05 
AnswerRe: how to make this not stop? Pin
Emilio Garavaglia29-Apr-12 10:44
Emilio Garavaglia29-Apr-12 10:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.