Jishua
August 1st, 2009, 04:34 PM
I've googled to find an answer and have found some advice to override certain methods.
However, the code I'm modifying doesn't seem to be class based. I think so because I can't find anything like "class xxx.." anywhere at the top of this *.cpp file.
The WinProc function is defined like this if that helps:
LRESULT WINAPI WinProc(HWND, UINT, WPARAM, LPARAM);
then
long PASCAL WinProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {...}
I know that if I check whether the message is WM_CLOSE in this one and do stuff, it'll close the window anyway.
I'm sorry, I don't really get how all of the code I'm modifying works, so I might not have inluded all necessary information in this description.
How can I still prevent the window from getting closed when I don't want it to?
How can I still override a function here or do something similar?
I've tried "BOOL DestroyWindow(HWND hWnd) {...}", but it gets me "error C2373: redefinition; different type modifiers" and "error C2491: definition of dllimport function not allowed".
However, the code I'm modifying doesn't seem to be class based. I think so because I can't find anything like "class xxx.." anywhere at the top of this *.cpp file.
The WinProc function is defined like this if that helps:
LRESULT WINAPI WinProc(HWND, UINT, WPARAM, LPARAM);
then
long PASCAL WinProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {...}
I know that if I check whether the message is WM_CLOSE in this one and do stuff, it'll close the window anyway.
I'm sorry, I don't really get how all of the code I'm modifying works, so I might not have inluded all necessary information in this description.
How can I still prevent the window from getting closed when I don't want it to?
How can I still override a function here or do something similar?
I've tried "BOOL DestroyWindow(HWND hWnd) {...}", but it gets me "error C2373: redefinition; different type modifiers" and "error C2491: definition of dllimport function not allowed".