CALLBACK
-
l a u r e n wrote: callback functions are static functions in your code callback functions are not static functions... It is defined as follows
#define CALLBACK __stdcall
MSN Messenger. prakashnadar@msn.com
-
l a u r e n wrote: callback functions are static functions in your code callback functions are not static functions... It is defined as follows
#define CALLBACK __stdcall
MSN Messenger. prakashnadar@msn.com
Think twice, what about in C++? Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318
-
-
Think twice, what about in C++? Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318
Well i did do some RnD before posting tht , as long as it is VC++ i dont think its a static function unless i missed something. or you could show me something that says its static.
MSN Messenger. prakashnadar@msn.com
-
Think twice, what about in C++? Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318
Rickard Andersson19 wrote: Think twice surely in VC++ CALLBACK is not a static function at all. and Rickard Andersson19 wrote: what about in C++? Is VC++ not C++ ?? so really i dont know which C++ compiler you are talking about, but in VC++ callback is not a static function, its only a calling convention.
MSN Messenger. prakashnadar@msn.com
-
Rickard Andersson19 wrote: Think twice surely in VC++ CALLBACK is not a static function at all. and Rickard Andersson19 wrote: what about in C++? Is VC++ not C++ ?? so really i dont know which C++ compiler you are talking about, but in VC++ callback is not a static function, its only a calling convention.
MSN Messenger. prakashnadar@msn.com
Mr.Prakash wrote: Is VC++ not C++ ?? :sigh: VC++ is a compiler. C++ is a language. In C++ (the language) you must declare a method as
static
before you can use as a callback. Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318 -
A
CALLBACK
function is a function in your code that Windows calls to tell you about an event or an item of interest. Here is an example. The Windows API functionEnumWindows
enumerates the top-level windows. You pass it a pointer to aCALLBACK
function. Windows calls that function once for each top-level window:BOOL CALLBACK MyFunction(HWND hwnd,LPARAM lParam)
{
//...
return TRUE;
}// somewhere else in your code:
EnumWindows(MyFunction,0);
The function
MyFunction
is a callback function. When you callEnumWindows
, Windows will callMyFunction
for each top-level window in the system.
Software Zen:
delete this;
-
Mr.Prakash wrote: Is VC++ not C++ ?? :sigh: VC++ is a compiler. C++ is a language. In C++ (the language) you must declare a method as
static
before you can use as a callback. Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318Rickard Andersson19 wrote: VC++ is a compiler. C++ is a language. VC++ compiles code writen in C++ so If you write something in C++ that VC++ cannot compile then its not a VC++ code. what ever that meant. using static functions as callback is one thing and in VC++ CALLBACK is different not callback but CALLBACK (something the original poster has asked the question about). I hope now its clear.
MSN Messenger. prakashnadar@msn.com
-
Rickard Andersson19 wrote: VC++ is a compiler. C++ is a language. VC++ compiles code writen in C++ so If you write something in C++ that VC++ cannot compile then its not a VC++ code. what ever that meant. using static functions as callback is one thing and in VC++ CALLBACK is different not callback but CALLBACK (something the original poster has asked the question about). I hope now its clear.
MSN Messenger. prakashnadar@msn.com
Mr.Prakash wrote: VC++ compiles code writen in C++ so If you write something in C++ that VC++ cannot compile then its not a VC++ code. what ever that meant. You can write C code. And
LRESULT CALLBACK Name(...)
is a callback declaration of a C function callback, not C++. lauren said it's a static function, and because this is a (V)C++ forum C++ is the first hand language so a callback function is a static function (member function actually). Mr.Prakash wrote: and in VC++ CALLBACK is different not callback but CALLBACK (something the original poster has asked the question about). I hope now its clear. if so, lauren explained what a callback was? not the defination ofCALLBACK
... Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318 -
Mr.Prakash wrote: VC++ compiles code writen in C++ so If you write something in C++ that VC++ cannot compile then its not a VC++ code. what ever that meant. You can write C code. And
LRESULT CALLBACK Name(...)
is a callback declaration of a C function callback, not C++. lauren said it's a static function, and because this is a (V)C++ forum C++ is the first hand language so a callback function is a static function (member function actually). Mr.Prakash wrote: and in VC++ CALLBACK is different not callback but CALLBACK (something the original poster has asked the question about). I hope now its clear. if so, lauren explained what a callback was? not the defination ofCALLBACK
... Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318Rickard Andersson19 wrote: if so, lauren explained what a callback was? not the defination of CALLBACK... lauren said its a static function, which is wrong(it can be a static function but not neccessary). lauren said what is callback function, that is correct. no wonder the author of the post had given a low grade to that ans.
MSN Messenger. prakashnadar@msn.com
-
Rickard Andersson19 wrote: if so, lauren explained what a callback was? not the defination of CALLBACK... lauren said its a static function, which is wrong(it can be a static function but not neccessary). lauren said what is callback function, that is correct. no wonder the author of the post had given a low grade to that ans.
MSN Messenger. prakashnadar@msn.com
Mr.Prakash wrote: lauren said its a static function, which is wrong In C++ it's not. Mr.Prakash wrote: lauren said what is callback function, that is correct. What do you mean? Your English is almost impossible to understand sometimes. Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318
-
A
CALLBACK
function is a function in your code that Windows calls to tell you about an event or an item of interest. Here is an example. The Windows API functionEnumWindows
enumerates the top-level windows. You pass it a pointer to aCALLBACK
function. Windows calls that function once for each top-level window:BOOL CALLBACK MyFunction(HWND hwnd,LPARAM lParam)
{
//...
return TRUE;
}// somewhere else in your code:
EnumWindows(MyFunction,0);
The function
MyFunction
is a callback function. When you callEnumWindows
, Windows will callMyFunction
for each top-level window in the system.
Software Zen:
delete this;