-----------------------------------------------------------------------------*/
| 944 | } |
| 945 | /*-----------------------------------------------------------------------------*/ |
| 946 | HWND |
| 947 | GetMenuControl(HWND hWnd) |
| 948 | { |
| 949 | PNHMenuWindow data; |
| 950 | |
| 951 | data = (PNHMenuWindow) GetWindowLongPtr(hWnd, GWLP_USERDATA); |
| 952 | |
| 953 | /* We may continue getting window messages after a window's WM_DESTROY is |
| 954 | called. We need to handle the case that USERDATA has been freed. */ |
| 955 | if (data == NULL) |
| 956 | return NULL; |
| 957 | |
| 958 | if (data->type == MENU_TYPE_TEXT) { |
| 959 | return GetDlgItem(hWnd, IDC_MENU_TEXT); |
| 960 | } else { |
| 961 | return GetDlgItem(hWnd, IDC_MENU_LIST); |
| 962 | } |
| 963 | } |
| 964 | /*-----------------------------------------------------------------------------*/ |
| 965 | BOOL |
| 966 | onMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam) |
no outgoing calls
no test coverage detected