|
|
1.1 ! root 1: /***************************************************************************\ ! 2: * GPI.C -- GPI Helper routines ! 3: * Created by Microsoft Corporation, 1989 ! 4: \***************************************************************************/ ! 5: ! 6: ! 7: #define INCL_GPI ! 8: #include "tool.h" ! 9: ! 10: /***************************************************************************\ ! 11: * GetTextExtent helper function ! 12: \***************************************************************************/ ! 13: ! 14: ULONG CALLBACK GetTextExtent(HPS hps, PCH lpstr, int cch) { ! 15: POINTL rgptl[TXTBOX_COUNT]; ! 16: ! 17: if (cch) { ! 18: GpiQueryTextBox(hps, (LONG)cch, lpstr, 5L, rgptl); ! 19: return(MAKEULONG((SHORT)(rgptl[TXTBOX_CONCAT].x - rgptl[TXTBOX_BOTTOMLEFT].x), ! 20: (SHORT)(rgptl[TXTBOX_TOPLEFT].y - rgptl[TXTBOX_BOTTOMLEFT].y))); ! 21: } else ! 22: return(0L); ! 23: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.