Changeset 14 for trunk/src/helpers/comctl.c
- Timestamp:
- Dec 9, 2000, 8:19:42 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/comctl.c
r8 r14 53 53 /* 54 54 * Copyright (C) 1997-2000 Ulrich Mller. 55 * This file is part of the XWorkplacesource package.56 * XWorkplaceis free software; you can redistribute it and/or modify55 * This file is part of the "XWorkplace helpers" source package. 56 * This is free software; you can redistribute it and/or modify 57 57 * it under the terms of the GNU General Public License as published 58 58 * by the Free Software Foundation, in version 2 as it comes in the … … 117 117 118 118 /* ****************************************************************** 119 * *120 * Global variables *121 * *119 * 120 * Global variables 121 * 122 122 ********************************************************************/ 123 123 … … 127 127 128 128 /* ****************************************************************** 129 * *130 * "Menu button" control *131 * *129 * 130 * "Menu button" control 131 * 132 132 ********************************************************************/ 133 133 … … 149 149 HWND hwndMenu; 150 150 } MENUBUTTONDATA, *PMENUBUTTONDATA; 151 152 /* 153 *@@ ctlDisplayButtonMenu: 154 * displays the specified menu above the button. 155 * 156 *@@added V0.9.7 (2000-11-29) [umoeller] 157 */ 158 159 VOID ctlDisplayButtonMenu(HWND hwndButton, 160 HWND hwndMenu) 161 { 162 SWP swpButton; 163 POINTL ptlMenu; 164 WinQueryWindowPos(hwndButton, &swpButton); 165 ptlMenu.x = swpButton.x; 166 ptlMenu.y = swpButton.y; 167 168 // ptlMenu now has button coordinates 169 // relative to the button's parent; 170 // convert this to screen coordinates: 171 WinMapWindowPoints(WinQueryWindow(hwndButton, QW_PARENT), 172 HWND_DESKTOP, 173 &ptlMenu, 174 1); 175 176 // now show the menu on top of the button 177 WinPopupMenu(HWND_DESKTOP, // menu parent 178 hwndButton, // owner 179 hwndMenu, 180 (SHORT)(ptlMenu.x), 181 (SHORT)(ptlMenu.y + swpButton.cy - 1), 182 0, // ID 183 PU_NONE 184 | PU_MOUSEBUTTON1 185 | PU_KEYBOARD 186 | PU_HCONSTRAIN 187 | PU_VCONSTRAIN); 188 } 151 189 152 190 /* … … 288 326 // menu successfully loaded: 289 327 // find out where to put it 290 SWP swpButton; 291 POINTL ptlMenu; 292 WinQueryWindowPos(hwndButton, &swpButton); 293 ptlMenu.x = swpButton.x; 294 ptlMenu.y = swpButton.y; 295 296 // ptlMenu now has button coordinates 297 // relative to the button's parent; 298 // convert this to screen coordinates: 299 WinMapWindowPoints(WinQueryWindow(hwndButton, QW_PARENT), 300 HWND_DESKTOP, 301 &ptlMenu, 302 1); 303 304 // now show the menu on top of the button 305 WinPopupMenu(HWND_DESKTOP, // menu parent 306 hwndButton, // owner 307 pmbd->hwndMenu, 308 (SHORT)(ptlMenu.x), 309 (SHORT)(ptlMenu.y + swpButton.cy - 1), 310 0, // ID 311 PU_NONE 312 | PU_MOUSEBUTTON1 313 | PU_KEYBOARD 314 | PU_HCONSTRAIN 315 | PU_VCONSTRAIN); 328 ctlDisplayButtonMenu(hwndButton, 329 pmbd->hwndMenu); 316 330 } // end if (pmbd->hwndMenu) 317 331 else … … 484 498 485 499 /* ****************************************************************** 486 * *487 * Subclassed Static Bitmap Control *488 * *500 * 501 * Subclassed Static Bitmap Control 502 * 489 503 ********************************************************************/ 490 504 … … 788 802 789 803 /* ****************************************************************** 790 * *791 * Icon animation *792 * *804 * 805 * Icon animation 806 * 793 807 ********************************************************************/ 794 808 … … 967 981 968 982 /* ****************************************************************** 969 * *970 * Bitmap functions *971 * *983 * 984 * Bitmap functions 985 * 972 986 ********************************************************************/ 973 987 … … 1050 1064 1051 1065 /* ****************************************************************** 1052 * *1053 * Hotkey entry field *1054 * *1066 * 1067 * Hotkey entry field 1068 * 1055 1069 ********************************************************************/ 1056 1070
Note:
See TracChangeset
for help on using the changeset viewer.