WndProc Within a class
-
Hi Guys , I'm building a class that will help me reduce the code I need to write to get an OGL window up and running , But I've some issue , when I start filling up the Window Class structure , I come to the WNDPROC ,I want to pass the address of a method in the main class , but I get an (error C2440: '=' : cannot convert from 'long (__stdcall OGLWindow::*)(struct HWND__ *,unsigned int,unsigned int,long)' to 'long (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)) ,I wonder if there's some way I can estblish this kind of converstion , or else I'll just have to write the WndProc function seperate from the class , I hope I'm making sense here , thanks in advance for any help
-
Hi Guys , I'm building a class that will help me reduce the code I need to write to get an OGL window up and running , But I've some issue , when I start filling up the Window Class structure , I come to the WNDPROC ,I want to pass the address of a method in the main class , but I get an (error C2440: '=' : cannot convert from 'long (__stdcall OGLWindow::*)(struct HWND__ *,unsigned int,unsigned int,long)' to 'long (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)) ,I wonder if there's some way I can estblish this kind of converstion , or else I'll just have to write the WndProc function seperate from the class , I hope I'm making sense here , thanks in advance for any help
-
Hi Guys , I'm building a class that will help me reduce the code I need to write to get an OGL window up and running , But I've some issue , when I start filling up the Window Class structure , I come to the WNDPROC ,I want to pass the address of a method in the main class , but I get an (error C2440: '=' : cannot convert from 'long (__stdcall OGLWindow::*)(struct HWND__ *,unsigned int,unsigned int,long)' to 'long (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)) ,I wonder if there's some way I can estblish this kind of converstion , or else I'll just have to write the WndProc function seperate from the class , I hope I'm making sense here , thanks in advance for any help
See the article: Use member functions for C-style callbacks and threads - a general solution INTP