#include "openfnm.h" #include <tchar.h> extern CMyOpenFileName g_ofn; BOOL OnPaint(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { HDC hdc; PAINTSTRUCT ps; int nString; const TCHAR* szName; szName = g_ofn.FileName(); nString = 0; while(szName[nString]) ++nString; hdc = BeginPaint(hWnd, &ps); TextOut(hdc, 0, 0, szName, nString); EndPaint(hWnd, &ps); return TRUE; }