Changeset 3153 for trunk/src/user32/win32wbasenonclient.cpp
- Timestamp:
- Mar 18, 2000, 5:13:41 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32wbasenonclient.cpp
r2956 r3153 1 /* $Id: win32wbasenonclient.cpp,v 1.1 6 2000-03-01 13:30:06 sandervlExp $ */1 /* $Id: win32wbasenonclient.cpp,v 1.17 2000-03-18 16:13:39 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 (non-client methods) … … 490 490 { 491 491 /* Check if there is an user icon */ 492 HICON hSysIcon = hIconSm; 493 if(!hSysIcon) hSysIcon = (HICON) GetClassLongA(Win32Hwnd,GCL_HICONSM); 494 495 /* If there is an icon associated with the window OR */ 496 /* If there is no hIcon specified and this is not a modal dialog, */ 497 /* there is a system menu icon. */ 498 if((hSysIcon != 0) || (!(dwStyle & DS_MODALFRAME))) 492 if (IconForWindow(ICON_SMALL)) 499 493 rect.left += GetSystemMetrics(SM_CYCAPTION) - 1; 500 494 } … … 644 638 else r = *rect; 645 639 646 hSysIcon = hIconSm; 647 648 /* if no small icon and no large icon, use class small icon */ 649 if (!hSysIcon && !hIcon) 650 hSysIcon = (HICON) GetClassLongA(Win32Hwnd, GCL_HICONSM); 651 652 /* otherwise use the large icon */ 653 if (!hSysIcon) hSysIcon = hIcon; 654 655 /* if all else fails, use the application icon. */ 656 if(!hSysIcon) hSysIcon = (HICON) GetClassLongA(Win32Hwnd, GCL_HICON); 657 658 /* If there is no hIcon specified or this is not a modal dialog, */ 659 /* get the default one. */ 660 if(hSysIcon == 0) 661 if (!(dwStyle & DS_MODALFRAME)) 662 hSysIcon = LoadImageA(0, MAKEINTRESOURCEA(OIC_ODINICON), IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR); 640 hSysIcon = IconForWindow(ICON_SMALL); 641 663 642 //CB: todo: add icons (including Odin icon) to user32.rc 664 643 if (hSysIcon) … … 1406 1385 1407 1386 if (!win32wnd) return 0; 1408 1409 /* Get small icon. */ 1410 HICON hAppIcon = win32wnd->GetSmallIcon(); 1411 1412 /* if no small icon and no large icon, use class small icon */ 1413 if (!hAppIcon && !win32wnd->GetIcon()) 1414 hAppIcon = (HICON) GetClassLongA(hwnd, GCL_HICONSM); 1415 1416 /* otherwise use the large icon it */ 1417 if (!hAppIcon) hAppIcon = win32wnd->GetIcon(); 1418 1419 /* if all else fails, use the application icon. */ 1420 if(!hAppIcon) hAppIcon = (HICON) GetClassLongA(hwnd, GCL_HICON); 1421 1422 DrawIconEx (hdc, pt.x, pt.y, hAppIcon, GetSystemMetrics(SM_CXSMICON), 1387 1388 DrawIconEx (hdc, pt.x, pt.y, win32wnd->IconForWindow(ICON_SMALL), 1389 GetSystemMetrics(SM_CXSMICON), 1423 1390 GetSystemMetrics(SM_CYSMICON), 0, 0, DI_NORMAL); 1424 1391 }
Note:
See TracChangeset
for help on using the changeset viewer.