How can i create a pointer to
_class.lpfnWndProc
where the variable lpfnWndProc is of type:
long (__stdcall ** )(struct HWND__ *,unsigned int,unsigned int,long)
?
I've tried a number of approaches and i've hit the wall, can anyone help me? thanks.
How can i create a pointer to
_class.lpfnWndProc
where the variable lpfnWndProc is of type:
long (__stdcall ** )(struct HWND__ *,unsigned int,unsigned int,long)
?
I've tried a number of approaches and i've hit the wall, can anyone help me? thanks.
PHP and XML
Let's talk about SAX
Try something like this:
typedef long **(class::*ppFunction)(struct HWND__ *,unsigned int,unsigned int,long);
ppFunction = &class.lpfnWndProc;
Kuphryn
i believe thats a pointer to a pointer to a function which takes four parameters: a pointer to a HWND__ struct, two unsigned ints, and a long. my question is, WHY do you want a third level of indirection????!?!?!?!?!?
hello, internet!
>>third level of indirection
i'm creating a header file that makes it easier for newb's to code windows, those hungarian variables aren't very descriptive, so i've made pointers like:
WindowInstance * WindowInstanceName=&_class.hInstance;
etc.
plus i personally hate using hungarian
i've gotten the program to work for every one being pointed to except for this one.
PHP and XML
Let's talk about SAX
ok, i can't visually pick this apart right now cause my head is killing me. I get the errors:Code:typedef long **(__stdcall::*WindowsProcedureName)(struct HWND__ *,unsigned int,unsigned int,long); WindowsProcedureName=&_class.lpfnWndProc;
C:\drew\Programming\C++\Open source\An_unbeata4286312182001\Anti_Hungarian\hung arians_suck.cpp(22) : error C2653: '`global namespace'' : is not a class or namespace name
C:\drew\Programming\C++\Open source\An_unbeata4286312182001\Anti_Hungarian\hung arians_suck.cpp(23) : error C2513: 'long **(__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long) ' : no variable declared before '='
C:\drew\Programming\C++\Open source\An_unbeata4286312182001\Anti_Hungarian\hung arians_suck.cpp(48) : error C2275: 'WindowsProcedureName' : illegal use of this type as an expression
C:\drew\Programming\C++\Open source\An_unbeata4286312182001\Anti_Hungarian\hung arians_suck.cpp(22) : see declaration of 'WindowsProcedureName'
C:\drew\Programming\C++\Open source\An_unbeata4286312182001\Anti_Hungarian\hung arians_suck.cpp(85) : error C2541: delete : cannot delete objects that are not pointers
C:\drew\Programming\C++\Open source\An_unbeata4286312182001\Anti_Hungarian\hung arians_suck.cpp(86) : error C2513: 'long **(__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long) ' : no variable declared before '='
Error executing cl.exe.
thanks again everyone
PHP and XML
Let's talk about SAX
What's __stdcall::*WindowsProcedureName?
KuphrynCode:typedef long **(AClass::*WindowsProcedureName)(struct HWND__ *,unsigned int,unsigned int,long); WindowsProcedureName = &_class.lpfnWndProc
ok sorry to sound ignorant, but i haven't used classes much... so that's probably why i'm lost here.
Here's what I've done....still lost mind you, can you please help me out? thanks much.
Code:class AntiHungarian; //below lines are messed up typedef long **(AntiHungarian::*WindowsProcedureName)(struct HWND__ *,unsigned int,unsigned int,long); WindowsProcedureName=&_class.lpfnWndProc;
PHP and XML
Let's talk about SAX
Is the function being pointed to a static member?
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
>>Is the function being pointed to a static member?
I'm trying to create a pointer to a member variable of the
WNDCLASSW struct (well, an instance of that struct i've made called _class).
so it's not a function...I'm thinking perhaps my logic is screwed up that way as well....oh boy i need a vacation.
PHP and XML
Let's talk about SAX