Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

metrics.c

Go to the documentation of this file.
00001 /****************************** Module Header ******************************\ 00002 * Module Name: metrics.c 00003 * 00004 * Copyright (c) 1985 - 1999, Microsoft Corporation 00005 * 00006 * History: 00007 \***************************************************************************/ 00008 00009 #include "precomp.h" 00010 #pragma hdrstop 00011 00012 /***************************************************************************\ 00013 * MenuRecalc 00014 * 00015 * Loops through all menus and resets size and item info stuff. That's 00016 * because it is invalid when the menu font changes. 00017 * 00018 * History: 00019 \***************************************************************************/ 00020 void MenuRecalc(void) 00021 { 00022 PMENU lpMenu; 00023 UINT iItem; 00024 PHE pheT; 00025 DWORD i; 00026 00027 /* 00028 * for (ppi = gppiFirst; ppi; ppi = ppi->ppiNext) 00029 * { 00030 * for (pMenu = ppi->lpMenus; TESTFAR(lpMenu); lpMenu = lpMenu->lpMenuNext) 00031 * { 00032 * 00033 * That was the Chicao way of walking the objects. In NT, we 00034 * walk the handle table. 00035 */ 00036 for (pheT = gSharedInfo.aheList, i = 0; i <= giheLast; i++, pheT++) { 00037 00038 if (pheT->bType == TYPE_MENU) { 00039 /* 00040 * Get a pointer to the menu. 00041 */ 00042 lpMenu = (PMENU)pheT->phead; 00043 00044 /* 00045 * Set menu size to 0 so it recalculates later when we go to 00046 * draw it again. 00047 */ 00048 lpMenu->cxMenu = 0; 00049 lpMenu->cyMenu = 0; 00050 00051 /* 00052 * Reset mnemonic underline info 00053 */ 00054 for (iItem = 0; iItem < lpMenu->cItems; iItem++) { 00055 lpMenu->rgItems[iItem].ulX = UNDERLINE_RECALC; 00056 lpMenu->rgItems[iItem].ulWidth = 0; 00057 lpMenu->rgItems[iItem].cxBmp = MNIS_MEASUREBMP; 00058 } 00059 } 00060 } 00061 } 00062 00063 00064 /***************************************************************************\ 00065 * xxxRecreateSmallIcons() 00066 * 00067 * Recreates the class and/or window small icon when the caption height 00068 * changes. This needs to be done in context so that LR_COPYFROMRESOURCE 00069 * can work right. 00070 * 00071 * History: 00072 * 22-Jun-95 BradG Ported from Win95 00073 \***************************************************************************/ 00074 00075 VOID xxxRecreateSmallIcons(PWND pwnd) 00076 { 00077 BOOL fSmQueryDrag; 00078 00079 CheckLock(pwnd); 00080 00081 if (DestroyClassSmIcon(pwnd->pcls)) 00082 xxxCreateClassSmIcon(pwnd->pcls); 00083 00084 fSmQueryDrag = (TestWF(pwnd, WFSMQUERYDRAGICON) != 0); 00085 if (DestroyWindowSmIcon(pwnd) && !fSmQueryDrag) 00086 xxxCreateWindowSmIcon(pwnd, (HICON)_GetProp(pwnd, MAKEINTATOM(gpsi->atomIconProp), PROPF_INTERNAL), TRUE); 00087 }

Generated on Sat May 15 19:40:47 2004 for test by doxygen 1.3.7