Changeset 119 for trunk/src


Ignore:
Timestamp:
Jun 26, 2008, 6:03:50 PM (17 years ago)
Author:
lpino
Message:

(Menu.java) - Partially implemented WM_DRAWITEM and WM_MEASUREITEM messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Control.java

    r115 r119  
    31493149//      return control.wmDrawChild (wParam, lParam);
    31503150//}
    3151 
     3151//@@TODO(lpino) Finish the implementation of owner draw menu items
    31523152MRESULT WM_DRAWITEM (int mp1, int mp2) {
    3153     System.out.println("Control:WM_DRAWITEM");
    31543153    OWNERITEM struct = new OWNERITEM();
    3155 //CHAR achClass[256]
    3156 //
    3157 //WinQueryClassName(hwnd,sizeof(achClass),achClass);
    3158 //if(WinFindAtom(WinQuerySystemAtomTable(),achClass)
    3159 //   == LOUSHORT(WC_SCROLLBAR))
    3160 //   /* this is a scroll bar */;
    3161 //else
    3162 //   /* this is not a scroll bar */;    if(type == OS.WC_MENU)
    3163 //        System.out.println("IS MENU");
    31643154    OS.objcpy(struct, mp2);
     3155    int length = 16;
     3156    PSZ buffer = new PSZ (length);
     3157    OS.WinQueryClassName(struct.hwnd, length+1, buffer);
     3158    if(buffer.toString().equalsIgnoreCase(PSZ.getAtom (OS.WC_MENU).toString())){
     3159        Decorations shell = menuShell ();
     3160        MenuItem item = shell.findMenuItem (struct.idItem);
     3161        if (item == null) return null;
     3162        return item.wmDrawChild (mp1, mp2);
     3163    }   
     3164//        System.out.println("Control:WM_DRAWITEM - HANDLE ATOM TABLE = " + Integer.toHexString(OS.WinFindAtom(OS.WinQuerySystemAtomTable(), PSZ.getAtom (OS.WC_MENU))));
    31653165      return null;
    31663166}
Note: See TracChangeset for help on using the changeset viewer.