|
@@ -315,18 +315,39 @@ void wglGraphicsWindow::config(void) {
|
|
|
wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
|
|
wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
|
|
|
wc.lpfnWndProc = (WNDPROC) static_window_proc;
|
|
wc.lpfnWndProc = (WNDPROC) static_window_proc;
|
|
|
wc.hInstance = hinstance;
|
|
wc.hInstance = hinstance;
|
|
|
-
|
|
|
|
|
- string windows_icon_filename = get_icon_filename_().to_os_specific();
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ string windows_icon_filename = get_icon_filename_2().to_os_specific();
|
|
|
|
|
+ string windows_cursor_filename = get_cursor_filename_2().to_os_specific();
|
|
|
|
|
+
|
|
|
if(!windows_icon_filename.empty()) {
|
|
if(!windows_icon_filename.empty()) {
|
|
|
// Note: LoadImage seems to cause win2k internal heap corruption (outputdbgstr warnings)
|
|
// Note: LoadImage seems to cause win2k internal heap corruption (outputdbgstr warnings)
|
|
|
// if icon is more than 8bpp
|
|
// if icon is more than 8bpp
|
|
|
|
|
+
|
|
|
|
|
+ // loads a .ico fmt file
|
|
|
wc.hIcon = (HICON) LoadImage(NULL, windows_icon_filename.c_str(), IMAGE_ICON, 0, 0, LR_LOADFROMFILE);
|
|
wc.hIcon = (HICON) LoadImage(NULL, windows_icon_filename.c_str(), IMAGE_ICON, 0, 0, LR_LOADFROMFILE);
|
|
|
|
|
+
|
|
|
|
|
+ if(wc.hIcon==NULL) {
|
|
|
|
|
+ wgldisplay_cat.warning() << "windows icon filename '" << windows_icon_filename << "' not found!!\n";
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
wc.hIcon = NULL; // use default app icon
|
|
wc.hIcon = NULL; // use default app icon
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- wc.hCursor = _hMouseCursor = LoadCursor(NULL, IDC_ARROW);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if(!windows_cursor_filename.empty()) {
|
|
|
|
|
+ // Note: LoadImage seems to cause win2k internal heap corruption (outputdbgstr warnings)
|
|
|
|
|
+ // if icon is more than 8bpp
|
|
|
|
|
+
|
|
|
|
|
+ // loads a .cur fmt file
|
|
|
|
|
+ _hMouseCursor = (HCURSOR) LoadImage(NULL, windows_cursor_filename.c_str(), IMAGE_CURSOR, 0, 0, LR_LOADFROMFILE);
|
|
|
|
|
+
|
|
|
|
|
+ if(_hMouseCursor==NULL) {
|
|
|
|
|
+ wgldisplay_cat.warning() << "windows cursor filename '" << windows_cursor_filename << "' not found!!\n";
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ _hMouseCursor = LoadCursor(NULL, IDC_ARROW);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ wc.hCursor = _hMouseCursor;
|
|
|
wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
|
|
wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
|
|
|
wc.lpszMenuName = NULL;
|
|
wc.lpszMenuName = NULL;
|
|
|
wc.lpszClassName = WGL_WINDOWCLASSNAME;
|
|
wc.lpszClassName = WGL_WINDOWCLASSNAME;
|