- 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源码
getdir.c
资源名称:zipsrc.zip [点击查看]
上传用户:jlteech
上传日期:2007-01-06
资源大小:349k
文件大小:2k
源码类别:
压缩解压
开发平台:
Visual C++
- /*
- Copyright (C) 1996 Mike White
- Permission is granted to any individual or institution to use, copy, or
- redistribute this software so long as all of the original files are included,
- that it is not sold for profit, and that this copyright notice is retained.
- */
- #include <windows.h>
- #include <stdio.h>
- #include "wiz.h"
- #ifdef __BORLANDC__
- #include <dir.h>
- #else
- #include <direct.h>
- #endif
- #include "helpids.h"
- char szRefDir[PATH_MAX];
- /****************************************************************************
- FUNCTION: GetDirProc(HWND, unsigned, WPARAM, LPARAM)
- PURPOSE: Processes messages for "Set Reference Dir Procedure for
- Update Archive" dialog box
- MESSAGES:
- WM_INITDIALOG - initialize dialog box
- WM_COMMAND - Input received
- ****************************************************************************/
- #ifdef __BORLANDC__
- #pragma warn -par
- #pragma warn -aus
- #endif
- BOOL WINAPI
- GetDirProc(HWND hwndDlg, WORD wMessage, WPARAM wParam, LPARAM lParam)
- {
- HWND hTemp;
- switch (wMessage) {
- case WM_INITDIALOG:
- hTemp = GetDlgItem(hwndDlg, lst1);
- WinAssert(hTemp);
- EnableWindow(hTemp, FALSE);
- ShowWindow(hTemp, SW_HIDE);
- hTemp = GetDlgItem(hwndDlg, edt1);
- WinAssert(hTemp);
- EnableWindow(hTemp, FALSE);
- ShowWindow(hTemp, SW_HIDE);
- szRefDir[0] = '';
- CenterDialog(GetParent(hwndDlg), hwndDlg); /* center on parent */
- break;
- case WM_COMMAND:
- switch (LOWORD(wParam)) {
- case IDC_SET_REF:
- getcwd(szRefDir, PATH_MAX);
- SetWindowText(GetDlgItem(hwndDlg, IDC_REF_DIR), szRefDir);
- break;
- case IDC_FREE_REF:
- szRefDir[0] = '';
- SetWindowText(GetDlgItem(hwndDlg, IDC_REF_DIR), szRefDir);
- break;
- case IDCANCEL:
- szRefDir[0] = '';
- EndDialog(hwndDlg, FALSE);
- break;
- case IDOK:
- EndDialog(hwndDlg, TRUE);
- break;
- }
- default:
- break;
- }
- return FALSE;
- }
- #ifdef __BORLANDC__
- #pragma warn .aus
- #pragma warn .par
- #endif