- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
rename.c
资源名称:zipsrc.zip [点击查看]
上传用户:jlteech
上传日期:2007-01-06
资源大小:349k
文件大小:2k
源码类别:
压缩解压
开发平台:
Visual C++
- /* Author Mike White, 1996. Based on original WizUnZip code by
- * Robert Heath.
- */
- #include <stdio.h>
- #include "wiz.h"
- #include "rename.h"
- #include "helpids.h"
- /****************************************************************************
- FUNCTION: RenameProc(HWND, WORD, WPARAM, LPARAM)
- PURPOSE: Processes messages for "Rename" dialog box
- MESSAGES:
- WM_INITDIALOG - initialize dialog box
- WM_COMMAND - Input received
- ****************************************************************************/
- BOOL WINAPI RenameProc(HWND hDlg, WORD wMessage, WPARAM wParam, LPARAM lParam)
- {
- static char __far *lpsz;
- switch (wMessage)
- {
- case WM_INITDIALOG:
- lpsz = (char __far *)lParam;
- wsprintf(lpumb->szBuffer, "Rename %s", (LPSTR)lParam);
- SetDlgItemText(hDlg, IDM_RENAME_TEXT, lpumb->szBuffer);
- wsprintf(lpumb->szBuffer, "%s", (LPSTR)lParam);
- SetDlgItemText(hDlg, IDM_NEW_NAME_TEXT, lpumb->szBuffer);
- CenterDialog(GetParent(hDlg), hDlg); /* center on parent */
- return TRUE;
- case WM_SETFOCUS:
- SetFocus(GetDlgItem(hDlg, IDM_NEW_NAME_TEXT));
- return TRUE;
- case WM_COMMAND:
- switch (LOWORD(wParam))
- {
- case IDM_RENAME_RENAME:
- GetDlgItemText(hDlg, IDM_NEW_NAME_TEXT, lpsz, 80);
- case IDM_RENAME_CANCEL:
- EndDialog(hDlg, wParam);
- break;
- case IDM_RENAME_HELP:
- WinHelp(hDlg,szHelpFileName,HELP_CONTEXT, (DWORD)(HELPID_OVERWRITE));
- }
- return TRUE;
- }
- return FALSE;
- }