Changes in trunk/bitmap.cpp [11:28]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bitmap.cpp
r11 r28 19 19 20 20 // ** CaptureWindow ******************************************************* /*FOLD00*/ 21 21 #include <ctype.h> 22 22 #define MAX_WAIT 15 23 23 … … 36 36 37 37 // wait for the selected window to rise to the surface 38 if ( (hwndParent != HWND_DESKTOP) &&f)38 if (f) 39 39 { 40 40 WinSetWindowPos (hwndParent, HWND_TOP, 0,0, 0,0, SWP_ZORDER); … … 149 149 sizeof (aptl) / sizeof (POINTL), /* Number of points in aptl */ 150 150 aptl, ROP_SRCCOPY, BBO_IGNORE); 151 SaveBitmap (hbm, hpsMem, sWidth, sHeight, bmp.cBitCount); 151 152 SWCNTRL swctl; 153 PID pid; 154 TID tid; 155 BOOL screen = FALSE, region = FALSE; 156 CHAR title[11]; 157 158 if (!f) { 159 //hwndParent = WinQueryFocus(HWND_DESKTOP); 160 if (hwndParent == hwndFrame) { 161 hwndParent = WinQueryWindow(hwndFrame, QW_NEXTTOP ); 162 } 163 screen = TRUE; 164 if (prcl) 165 region = TRUE; 166 } 167 168 int rc = WinQueryWindowProcess(hwndParent, &pid, &tid); 169 if (WinQuerySwitchEntry(WinQuerySwitchHandle(hwndParent, pid), 170 &swctl)) 171 WinQuerySwitchEntry(WinQuerySwitchHandle(NULLHANDLE, pid), 172 &swctl); 173 174 char buffer[MAXNAMEL+4]; 175 int length = strlen( swctl.szSwtitle ); 176 strcpy(buffer, swctl.szSwtitle); 177 char *p; 178 p = buffer; 179 for (int i = 0; i < (length < 11 ? length : 11); i++) { 180 if ( ispunct( *p ) || *p == '\\' || isblank( *p )) { 181 *p = '_'; 182 } 183 p++; 184 } 185 186 if (region) 187 snprintf( title, length < 8 ? length + 3 : 11, "SR%s", buffer); 188 else if (screen) 189 snprintf( title, length < 8 ? length + 3 : 11, "SC%s", buffer); 190 else 191 snprintf( title, length < 8 ? length + 3 : 11, "WD%s", buffer); 192 193 SaveBitmap (hbm, hpsMem, sWidth, sHeight, bmp.cBitCount, title); 152 194 153 195 // re-associate the previous bit map and the memory presentation space
Note:
See TracChangeset
for help on using the changeset viewer.