Click here to Skip to main content
15,899,634 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralGet mouse coordinates Pin
alex.barylski13-Feb-04 12:25
alex.barylski13-Feb-04 12:25 
GeneralRe: Get mouse coordinates Pin
Jörgen Sigvardsson13-Feb-04 13:21
Jörgen Sigvardsson13-Feb-04 13:21 
GeneralQuick Question Pin
Nick Parker13-Feb-04 11:13
protectorNick Parker13-Feb-04 11:13 
GeneralRe: Quick Question Pin
Monty214-Feb-04 0:16
Monty214-Feb-04 0:16 
GeneralReadProcessMemory Pin
__Cerb13-Feb-04 10:10
__Cerb13-Feb-04 10:10 
GeneralListbox Frustration Pin
C++NewBe13-Feb-04 9:53
C++NewBe13-Feb-04 9:53 
GeneralRe: Listbox Frustration Pin
alex.barylski13-Feb-04 10:02
alex.barylski13-Feb-04 10:02 
General64-bit compatibility Pin
Freon13-Feb-04 9:48
Freon13-Feb-04 9:48 
Is there any way to check for 64-bit and fix compatibility issues in a large .NET solution without generating thousands of warnings?

If _WIN64 *is not* defined, the Windows headers define many function parameters and return types as 32 bits, so I get warnings for all integer/pointer conversions involving those functions. For example, consider the following header functions:

inline void* GetWindowUserData (HWND hwnd)
{
return (void*) GetWindowLongPtr(hwnd, GWLP_USERDATA);
}

inline void* SetWindowUserData (HWND hwnd, void* data)
{
return (void*) SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)data);
}

These two alone generate the following warnings in *every* source file that includes this header (which is most of them in the solution):

..\Viewapi\Vapidlg.h(155) : warning C4312: 'type cast' : conversion from 'LONG' to 'void *' of greater size
..\Viewapi\Vapidlg.h(161) : warning C4244: 'argument' : conversion from 'LONG_PTR' to 'LONG', possible loss of data
..\Viewapi\Vapidlg.h(161) : warning C4312: 'type cast' : conversion from 'LONG' to 'void *' of greater size


If _WIN64 *is* defined, a huge number of warnings are produced that I cannot tie to anything in my source code. For example:

C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlalloc.h(342) : warning C4244: 'argument' : conversion from 'SIZE_T' to 'size_t', possible loss of data
loss of data
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlalloc.h(382) : warning C4244: 'argument' : conversion from 'SIZE_T' to 'size_t', possible loss of data
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlalloc.h(381) : while compiling class-template member function 'void *ATL::_ATL_SAFE_ALLOCA_IMPL::CAtlSafeAllocBufferManager<Allocator>::Allocate(SIZE_T)'
with
[
Allocator=ATL::CCRTAllocator
]
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlconv.h(778) : see reference to class template instantiation 'ATL::_ATL_SAFE_ALLOCA_IMPL::CAtlSafeAllocBufferManager<Allocator>' being compiled
with
[
Allocator=ATL::CCRTAllocator
]


How can I reduce the number of spurious warnings so that I can fix the real issues?

Thanks in advance...

GeneralCannot attach debugger to a remote process Pin
Anonymous13-Feb-04 9:13
Anonymous13-Feb-04 9:13 
QuestionHow do I know if I have MAPI installed for Lotus Notes mail client? Pin
ElizabethC13-Feb-04 9:10
ElizabethC13-Feb-04 9:10 
GeneralNeed help sending email out from MFC application using Lotus Notes mail server Pin
ElizabethC13-Feb-04 8:44
ElizabethC13-Feb-04 8:44 
GeneralRe: Need help sending email out from MFC application using Lotus Notes mail server Pin
valikac14-Feb-04 5:34
valikac14-Feb-04 5:34 
GeneralDial-up Networking &amp; Dialing Rules Pin
Russell Morris13-Feb-04 8:16
Russell Morris13-Feb-04 8:16 
GeneralRe: Dial-up Networking &amp; Dialing Rules Pin
valikac14-Feb-04 5:35
valikac14-Feb-04 5:35 
GeneralSQL compare time part of datetime field Pin
asdf175313-Feb-04 7:29
asdf175313-Feb-04 7:29 
GeneralRe: SQL compare time part of datetime field Pin
David Crow13-Feb-04 8:11
David Crow13-Feb-04 8:11 
GeneralMDI Document Sample Pin
vancouver77713-Feb-04 7:23
vancouver77713-Feb-04 7:23 
GeneralRe: MDI Document Sample Pin
David Crow13-Feb-04 8:13
David Crow13-Feb-04 8:13 
QuestionHow to get Drag data from IE Pin
Vistac13-Feb-04 6:46
Vistac13-Feb-04 6:46 
GeneralVisual Studio .NET Wizard(s) Pin
ExtraLean13-Feb-04 5:58
ExtraLean13-Feb-04 5:58 
GeneralNo tooltip in .NET IDE Pin
morefalt13-Feb-04 5:52
morefalt13-Feb-04 5:52 
GeneralMIDI delta.2.SMTPE convert Pin
~toki13-Feb-04 5:47
~toki13-Feb-04 5:47 
GeneralList View Question Pin
Prakash Nadar13-Feb-04 4:50
Prakash Nadar13-Feb-04 4:50 
GeneralRe: List View Question Pin
David Crow13-Feb-04 5:05
David Crow13-Feb-04 5:05 
GeneralRe: List View Question Pin
Steve S13-Feb-04 5:33
Steve S13-Feb-04 5:33 

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.