Click here to Skip to main content
       

C / C++ / MFC

 
AnswerRe: where can download comment macro? Pinmemberjibesh28-Jan-13 19:48 
QuestionFilter the EN_KILLFOCUS message from CIPAddressCtrl Pinmemberzhangyoung28-Jan-13 14:53 
AnswerRe: Filter the EN_KILLFOCUS message from CIPAddressCtrl PinmemberCode-o-mat28-Jan-13 22:27 
GeneralRe: Filter the EN_KILLFOCUS message from CIPAddressCtrl Pinmemberzhangyoung29-Jan-13 3:04 
GeneralRe: Filter the EN_KILLFOCUS message from CIPAddressCtrl PinmemberCode-o-mat29-Jan-13 3:13 
QuestionHow to create an uncompressed avi file from a matrix of data? PinmemberKiran Satish27-Jan-13 16:40 
QuestionRe: How to create an uncompressed avi file from a matrix of data? PinmvpCPallini27-Jan-13 22:38 
AnswerRe: How to create an uncompressed avi file from a matrix of data? PinmemberKiran Satish28-Jan-13 4:42 
AnswerRe: How to create an uncompressed avi file from a matrix of data? PinmemberChris Losinger28-Jan-13 5:10 
AnswerRe: How to create an uncompressed avi file from a matrix of data? PinmemberVaclav_Sal28-Jan-13 9:50 
AnswerRe: How to create an uncompressed avi file from a matrix of data? PinmemberMax_Power_Up26-Feb-13 5:51 
QuestionWaveInOpen() returns error code 11 PinmemberAmbiguousName26-Jan-13 3:14 
AnswerRe: WaveInOpen() returns error code 11 PinmvpRichard MacCutchan26-Jan-13 3:28 
QuestionStuck with function pointers in C and C++ PinmemberSimon Langdon25-Jan-13 0:38 
I'm trying to copy some C code to a C++ class and I've got stuck with a function pointer issue. I've been trying to mess around with calling conventions but I don't want to make my C++ function static and don't want to change the old C code. Thanks for looking.
 

class theClass
{
public:
    int theFunction(int theParam1);
    int anotherFunction(void);
};
 
typedef int (*funcPtr) (int Param1);
 
int theClass::theFunction(int theParam1)
{
    return 0;
}
 
int function(int theParam1)
{
    return 0;
}
 
bool globFunction (funcPtr aFunction, bool someOtherArg)
{
    int anArg = 0;
    int ret = aFunction(anArg);
    return true;
}
 
int theClass::anotherFunction(void)
{
    globFunction (function, false);
 
    globFunction (&theClass::theFunction, true); //  error C2440: 'type cast' : cannot convert from 'int (__thiscall theClass::* )(int)' to 'funcPtr'

    return 0;
}

AnswerRe: Stuck with function pointers in C and C++ PinmvpCPallini25-Jan-13 0:59 
AnswerRe: Stuck with function pointers in C and C++ PinmemberFreak3025-Jan-13 1:08 
GeneralRe: Stuck with function pointers in C and C++ PinmemberSimon Langdon25-Jan-13 1:41 
GeneralRe: Stuck with function pointers in C and C++ PinmemberStefan_Lang29-Jan-13 0:02 
GeneralRe: Stuck with function pointers in C and C++ PinmemberSimon Langdon29-Jan-13 0:38 
GeneralRe: Stuck with function pointers in C and C++ PinmemberStefan_Lang29-Jan-13 4:31 
GeneralRe: Stuck with function pointers in C and C++ PinmvpCPallini25-Jan-13 2:04 
GeneralRe: Stuck with function pointers in C and C++ PinmemberFreak3027-Jan-13 23:30 
AnswerRe: Stuck with function pointers in C and C++ PinmemberStephen Hewitt27-Jan-13 4:40 
QuestionUSB Device Path Handle Problem Pinmemberyogeshs24-Jan-13 21:21 
AnswerRe: USB Device Path Handle Problem PinmemberVaclav_Sal28-Jan-13 10:08 
QuestionHow to create a button on the right of the screen in mfc.? Pinmembermbatra3124-Jan-13 19:53 
AnswerRe: How to create a button on the right of the screen in mfc.? PinmvpRichard MacCutchan24-Jan-13 22:47 
GeneralRe: How to create a button on the right of the screen in mfc.? Pinmembermbatra3127-Jan-13 19:39 
GeneralRe: How to create a button on the right of the screen in mfc.? PinmvpRichard MacCutchan27-Jan-13 22:36 
GeneralRe: How to create a button on the right of the screen in mfc.? Pinmembermbatra3128-Jan-13 0:07 
AnswerRe: How to create a button on the right of the screen in mfc.? PinmemberIain Clarke, Warrior Programmer24-Jan-13 23:13 
GeneralRe: How to create a button on the right of the screen in mfc.? Pinmembermbatra3127-Jan-13 20:11 
AnswerRe: How to create a button on the right of the screen in mfc.? PinmemberAlbert Holguin25-Jan-13 7:47 
QuestionCall CListCtrl::GetItemCount() in work thread proble. Pingroupyu-jian24-Jan-13 17:41 
AnswerRe: Call CListCtrl::GetItemCount() in work thread proble. Pinmember«_Superman_»24-Jan-13 18:03 
AnswerRe: Call CListCtrl::GetItemCount() in work thread proble. PinmemberJochen Arndt24-Jan-13 21:00 
GeneralRe: Call CListCtrl::GetItemCount() in work thread proble. Pingroupyu-jian24-Jan-13 21:48 
GeneralRe: Call CListCtrl::GetItemCount() in work thread proble. PinmemberJochen Arndt24-Jan-13 22:18 
GeneralRe: Call CListCtrl::GetItemCount() in work thread proble. Pingroupyu-jian24-Jan-13 23:40 
QuestionOpen cv C++ PinmemberMember 961996424-Jan-13 7:15 
AnswerRe: Open cv C++ Pinmemberjibesh24-Jan-13 7:44 
Questionhow to compress data using zlib? PinmemberIICTECH24-Jan-13 1:04 
AnswerRe: how to compress data using zlib? PinmvpRichard MacCutchan24-Jan-13 1:45 
AnswerRe: how to compress data using zlib? PinmemberAlbert Holguin25-Jan-13 7:51 
QuestionDebugging Dll Pinmembersarfaraznawaz24-Jan-13 0:30 
QuestionDebugging Dll Pinmembersarfaraznawaz24-Jan-13 0:30 
AnswerRe: Debugging Dll PinmemberSivaraman Dhamodharan24-Jan-13 1:26 
GeneralRe: Debugging Dll Pinmembersarfaraznawaz24-Jan-13 2:58 
GeneralRe: Debugging Dll PinmvpRichard MacCutchan24-Jan-13 3:16 
GeneralRe: Debugging Dll Pinmembersarfaraznawaz30-Jan-13 1:25 

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

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


Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 19 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid