Click here to Skip to main content
16,004,836 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: about load and unload library Pin
George_George22-Mar-06 5:42
George_George22-Mar-06 5:42 
GeneralRe: about load and unload library Pin
Ștefan-Mihai MOGA23-Mar-06 2:39
professionalȘtefan-Mihai MOGA23-Mar-06 2:39 
GeneralRe: about load and unload library Pin
George_George24-Mar-06 14:42
George_George24-Mar-06 14:42 
Questionhow can i get DC of a GDI+ Bitmap Pin
dijesh_ka21-Mar-06 20:27
dijesh_ka21-Mar-06 20:27 
QuestionCompile Win32 codes in VS.NET 2005? Pin
Syouki_kou21-Mar-06 20:22
Syouki_kou21-Mar-06 20:22 
GeneralRe: Compile Win32 codes in VS.NET 2005? Pin
Ștefan-Mihai MOGA21-Mar-06 20:34
professionalȘtefan-Mihai MOGA21-Mar-06 20:34 
GeneralRe: Compile Win32 codes in VS.NET 2005? Pin
Syouki_kou21-Mar-06 21:06
Syouki_kou21-Mar-06 21:06 
GeneralRe: Compile Win32 codes in VS.NET 2005? Pin
RChin21-Mar-06 23:40
RChin21-Mar-06 23:40 
Syouki_kou wrote:
d:\workshop\file system\all codes\monitor ap\pwspy\mainfrm.cpp(89) : error C2440: 'static_cast' : cannot convert from 'BOOL (__thiscall CMainFrame::* )(WPARAM,LPARAM)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'
None of the functions with this name in scope match the target type


With regards to the messages of the type I've quoted above, maybe I can help.
I remember getting these when I also moved from VS6 to VS7.1.
The new compiler seems to be a lot stricter when it comes to message function prototypes.
I am assuming these functions are message handlers (used in the ON_MESSAGE macro). The prototype required by 7.1 is :
LRESULT memberFxn( WPARAM, LPARAM ).
With VS6.0, you could get away with this allowing a void or a BOOL return type. Even the WPARAM / LPARAM parameters could be tweeked and the compiler would not complain. VS7+ does not give you this flexiblity anymore.

For these type of errors, you will need to go to these functions and change then to the expected prototype. So for example, for the quoted error above, you will need to change the return type from BOOL to LRESULT.

I would also think that the majority of the other compiler errors have similar solutions.




I Dream of Absolute Zero

GeneralRe: Compile Win32 codes in VS.NET 2005? Pin
Syouki_kou22-Mar-06 16:31
Syouki_kou22-Mar-06 16:31 
AnswerRe: Compile Win32 codes in VS.NET 2005? Pin
Syouki_kou21-Jun-06 16:10
Syouki_kou21-Jun-06 16:10 
AnswerRe: Compile Win32 codes in VS.NET 2005? Pin
toxcct21-Mar-06 20:55
toxcct21-Mar-06 20:55 
QuestionDisplaying a Bitmap. Pin
Waldermort21-Mar-06 19:31
Waldermort21-Mar-06 19:31 
AnswerRe: Displaying a Bitmap. Pin
Monty221-Mar-06 22:03
Monty221-Mar-06 22:03 
AnswerRe: Displaying a Bitmap. Pin
Hamid_RT21-Mar-06 23:45
Hamid_RT21-Mar-06 23:45 
QuestionString to Number Pin
<color>Aljechin 21-Mar-06 19:19
<color>Aljechin 21-Mar-06 19:19 
AnswerRe: String to Number Pin
Waldermort21-Mar-06 19:23
Waldermort21-Mar-06 19:23 
GeneralRe: String to Number Pin
<color>Aljechin 21-Mar-06 19:25
<color>Aljechin 21-Mar-06 19:25 
GeneralRe: String to Number Pin
Waldermort21-Mar-06 19:32
Waldermort21-Mar-06 19:32 
GeneralRe: String to Number Pin
Waldermort21-Mar-06 19:48
Waldermort21-Mar-06 19:48 
AnswerRe: String to Number Pin
Aqueel21-Mar-06 19:45
Aqueel21-Mar-06 19:45 
AnswerThanks All Prob Solved Pin
<color>Aljechin 21-Mar-06 20:08
<color>Aljechin 21-Mar-06 20:08 
GeneralRe: Thanks All Prob Solved Pin
Nibu babu thomas21-Mar-06 20:23
Nibu babu thomas21-Mar-06 20:23 
GeneralRe: Thanks All Prob Solved Pin
Waldermort21-Mar-06 20:26
Waldermort21-Mar-06 20:26 
GeneralRe: Thanks All Prob Solved Pin
Aqueel21-Mar-06 21:25
Aqueel21-Mar-06 21:25 
AnswerRe: String to Number Pin
lawrence200021-Mar-06 22:42
lawrence200021-Mar-06 22:42 

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.