Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4039223

JDK1.1: the "AWT_ICON" resource, if provided, should be used as the default icon

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • 1.1.3
    • 1.1
    • client-libs
    • b01
    • x86
    • windows_95
    • Not verified

    Description

      If an icon resource named "AWT_ICON" is provided in the current executable, then it should be used as the default icon. If not provided, then use the Windows default. There is code in the AwtFrame::SetIcon() that follows this convention, but this is chunk of code is only executed if SetIcon is called, in which case, the default is not intended to be used.

      I have a fix below for this and would be happy to putback thru the DevPro VMGate.

      ------- awt_Component.cpp -------
      *** /tmp/da000oP Wed Dec 31 16:00:00 1969
      --- awt_Component.cpp Sat Mar 15 14:16:55 1997
      ***************
      *** 165,171 ****
                wc.cbClsExtra = 0;
                wc.cbWndExtra = 0;
                wc.hInstance = ::GetModuleHandle(NULL);
      ! wc.hIcon = NULL;
                wc.hCursor = NULL;
                wc.hbrBackground = NULL;
                wc.lpszMenuName = NULL;
      --- 165,171 ----
                wc.cbClsExtra = 0;
                wc.cbWndExtra = 0;
                wc.hInstance = ::GetModuleHandle(NULL);
      ! wc.hIcon = AwtToolkit::GetInstance().GetAwtIcon();
                wc.hCursor = NULL;
                wc.hbrBackground = NULL;
                wc.lpszMenuName = NULL;

      ------- awt_Toolkit.cpp -------
      *** /tmp/da000oT Wed Dec 31 16:00:00 1969
      --- awt_Toolkit.cpp Sat Mar 15 14:12:50 1997
      ***************
      *** 198,204 ****
            wc.cbClsExtra = 0;
            wc.cbWndExtra = 0;
            wc.hInstance = ::GetModuleHandle(NULL);
      ! wc.hIcon = NULL;
            wc.hCursor = NULL;
            wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
            wc.lpszMenuName = NULL;
      --- 198,204 ----
            wc.cbClsExtra = 0;
            wc.cbWndExtra = 0;
            wc.hInstance = ::GetModuleHandle(NULL);
      ! wc.hIcon = GetInstance().GetAwtIcon();
            wc.hCursor = NULL;
            wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
            wc.lpszMenuName = NULL;
      ***************
      *** 555,561 ****
        
        HICON AwtToolkit::GetAwtIcon()
        {
      ! return ::LoadIcon(GetModuleHandle(), "AWT_ICON");
        }
        
        // Enable VC++ 4.X heap checking
      --- 555,561 ----
        
        HICON AwtToolkit::GetAwtIcon()
        {
      ! return ::LoadIcon(::GetModuleHandle(NULL), "AWT_ICON");
        }
        
        // Enable VC++ 4.X heap checking

      Attachments

        Activity

          People

            tballsunw Tom Ball (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: