/************************************************* * tgtproc.c * * * * Copyright (C) 1992-1999 Microsoft Inc. * * * *************************************************/ #include "chnuconv.h" #include "resource.h" INT_PTR TargetTabProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam ) { TCHAR szBuffer[MAX_PATH]; int i; switch( message ) { case WM_INITDIALOG: { RECT rcTab; //GetTab window size // first get the size of the tab control if (GetWindowRect( hMainTabControl, &rcTab )){ // adjust it to compensate for the tabs TabCtrl_AdjustRect( hMainTabControl, FALSE , &rcTab); // convert the screen coordinates to client coordinates MapWindowPoints( HWND_DESKTOP, GetParent(hMainTabControl), (LPPOINT)&rcTab, 2); } SetWindowPos(hWnd, HWND_TOP, rcTab.left, rcTab.top, rcTab.right - rcTab.left, rcTab.bottom - rcTab.top, SWP_NOACTIVATE ); LoadString(_hModule, IDS_BUT_SAVEAS, szBuffer, EXTENSION_LENGTH); SetDlgItemText(hWnd,IDC_OPENORSAVEAS, szBuffer); LoadString(_hModule, IDS_BUT_TOCLIPBOARD,szBuffer,EXTENSION_LENGTH); SetDlgItemText(hWnd, IDC_PASTEORCOPY, szBuffer); for (i=0;i