Click here to Skip to main content
15,900,649 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem using CArray Pin
d00_ape30-Oct-03 1:14
sussd00_ape30-Oct-03 1:14 
GeneralRe: Problem using CArray Pin
David Crow30-Oct-03 3:26
David Crow30-Oct-03 3:26 
GeneralRe: Problem using CArray Pin
d00_ape30-Oct-03 10:19
sussd00_ape30-Oct-03 10:19 
Generaltime function Pin
diana_artatak30-Oct-03 0:10
diana_artatak30-Oct-03 0:10 
GeneralRe: time function Pin
vcplusplus30-Oct-03 2:49
vcplusplus30-Oct-03 2:49 
Generalfont question Pin
namdans29-Oct-03 23:52
namdans29-Oct-03 23:52 
GeneralRe: font question Pin
David Crow30-Oct-03 3:32
David Crow30-Oct-03 3:32 
GeneralRe: font question Pin
Andy Latham14-Nov-03 0:25
Andy Latham14-Nov-03 0:25 
GeneralThreads .... Pin
Suhail Yousaf29-Oct-03 23:32
Suhail Yousaf29-Oct-03 23:32 
GeneralRe: Threads .... Pin
Anthony_Yio30-Oct-03 0:38
Anthony_Yio30-Oct-03 0:38 
GeneralRe: Threads .... Pin
vcplusplus30-Oct-03 2:57
vcplusplus30-Oct-03 2:57 
GeneralRe: Threads .... Pin
David Crow30-Oct-03 3:34
David Crow30-Oct-03 3:34 
GeneralActivating / Deactivating menus and toolbars Pin
Florin Ochiana29-Oct-03 23:14
Florin Ochiana29-Oct-03 23:14 
GeneralNetwork packets sniffer Pin
Anonymous29-Oct-03 23:08
Anonymous29-Oct-03 23:08 
GeneralRe: Network packets sniffer Pin
Joao Vaz29-Oct-03 23:41
Joao Vaz29-Oct-03 23:41 
GeneralTricky C++ question Pin
YaronNir29-Oct-03 22:57
YaronNir29-Oct-03 22:57 
GeneralRe: Tricky C++ question Pin
Ian Darling29-Oct-03 23:10
Ian Darling29-Oct-03 23:10 
GeneralRe: Tricky C++ question Pin
YaronNir29-Oct-03 23:12
YaronNir29-Oct-03 23:12 
GeneralRe: Tricky C++ question Pin
Juan Antonio Bermejo29-Oct-03 23:19
Juan Antonio Bermejo29-Oct-03 23:19 
GeneralRe: Tricky C++ question Pin
YaronNir29-Oct-03 23:23
YaronNir29-Oct-03 23:23 
GeneralRe: Tricky C++ question Pin
YaronNir29-Oct-03 23:26
YaronNir29-Oct-03 23:26 
GeneralRe: Tricky C++ question Pin
Juan Antonio Bermejo29-Oct-03 23:32
Juan Antonio Bermejo29-Oct-03 23:32 
GeneralRe: Tricky C++ question Pin
YaronNir29-Oct-03 23:38
YaronNir29-Oct-03 23:38 
GeneralRe: Tricky C++ question Pin
Juan Antonio Bermejo30-Oct-03 21:21
Juan Antonio Bermejo30-Oct-03 21:21 
This is sintactically correct:

class CBDRMainDlg;

typedef void (CBDRMainDlg::* DlgMethod)(void);

class CBDRMainDlg
{

public:
void Add(DlgMethod method)
{


};
void ClearIt()
{
printf("Clear It");
};
};

int main(int argc, char* argv[])
{
CBDRMainDlg dlg;

dlg.Add(CBDRMainDlg::ClearIt);

return 0;
}


... but i can't figure out how to call the method inside 'Add' since the compiler needs to push the this pointer in the stack before make the calling. It is possible using inline asm but i think that is not the best solution...

Why do you want to call methods this way? I think you can do that using virtual methods...






GeneralSysIPAddress32 in VC++ 5.0 Pin
Phil.Benson29-Oct-03 22:44
professionalPhil.Benson29-Oct-03 22: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.