CreateWindowEx causes application crash.
-
Hi, I am facing a crash while calling the function CreateWindowEx , Here is the code piece i am using. WNDCLASSEX WndClassEx; memset( &WndClassEx, 0, sizeof(WNDCLASSEX) ); WndClassEx.lpfnWndProc = AVThreadMessageProcedure; WndClassEx.hInstance = (HINSTANCE)g_hModule; WndClassEx.lpszClassName = AVTHREAD_WINDOW_CLASS; WndClassEx.hIcon = hIcon; WndClassEx.hIconSm = hIconSmall; WndClassEx.cbSize = sizeof(WndClassEx); CreateWindowEx( 0, AVTHREAD_WINDOW_CLASS, L "", 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, (HINSTANCE)g_hModule,(LPVOID)this ); Here I am passing the pointer of the calling class in last argument. Application is not crashing always but some time it crashed at this point. Can you please give some idea about what wrong i am doing here. Thanks in advance.
Birajendu SonicWALL Bangalore India
-
Hi, I am facing a crash while calling the function CreateWindowEx , Here is the code piece i am using. WNDCLASSEX WndClassEx; memset( &WndClassEx, 0, sizeof(WNDCLASSEX) ); WndClassEx.lpfnWndProc = AVThreadMessageProcedure; WndClassEx.hInstance = (HINSTANCE)g_hModule; WndClassEx.lpszClassName = AVTHREAD_WINDOW_CLASS; WndClassEx.hIcon = hIcon; WndClassEx.hIconSm = hIconSmall; WndClassEx.cbSize = sizeof(WndClassEx); CreateWindowEx( 0, AVTHREAD_WINDOW_CLASS, L "", 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, (HINSTANCE)g_hModule,(LPVOID)this ); Here I am passing the pointer of the calling class in last argument. Application is not crashing always but some time it crashed at this point. Can you please give some idea about what wrong i am doing here. Thanks in advance.
Birajendu SonicWALL Bangalore India
-
Where is the RegisterClassEx() called? :confused:
-
Hi, I am facing a crash while calling the function CreateWindowEx , Here is the code piece i am using. WNDCLASSEX WndClassEx; memset( &WndClassEx, 0, sizeof(WNDCLASSEX) ); WndClassEx.lpfnWndProc = AVThreadMessageProcedure; WndClassEx.hInstance = (HINSTANCE)g_hModule; WndClassEx.lpszClassName = AVTHREAD_WINDOW_CLASS; WndClassEx.hIcon = hIcon; WndClassEx.hIconSm = hIconSmall; WndClassEx.cbSize = sizeof(WndClassEx); CreateWindowEx( 0, AVTHREAD_WINDOW_CLASS, L "", 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, (HINSTANCE)g_hModule,(LPVOID)this ); Here I am passing the pointer of the calling class in last argument. Application is not crashing always but some time it crashed at this point. Can you please give some idea about what wrong i am doing here. Thanks in advance.
Birajendu SonicWALL Bangalore India
Could you tell us the exact error message ? Where does it crash exactly ? Try to use your debugger to collect more information.
Cédric Moonen Software developer
Charting control [v2.0] OpenGL game tutorial in C++ -
Yeah, ofcourse that is being called successfully with out any error.
Birajendu SonicWALL Bangalore India