• PUDN用户
    了解作者
  • Visual C++
    开发工具
  • 863KB
    文件大小
  • zip
    文件格式
  • 1
    收藏次数
  • 10 积分
    下载积分
  • 588
    下载次数
  • 2002-01-23 01:33
    上传日期
执行和去除共享软件日期限制的程序
sharewareluncher.zip
  • sharewareluncher
  • dlg_lib
  • dlg.lib
    14.5KB
  • dlg.h
    5.4KB
  • act.bmp
    16.8KB
  • bkg.bmp
    22.8KB
  • send_to_hd.c
    47.5KB
  • TAB.C
    19.9KB
  • clockback.bmp
    23.2KB
  • BACK.BMP
    3.2KB
  • listview.rc
    3KB
  • sharewareluncher.rc
    13.9KB
  • Main.bmp
    186.6KB
  • listrc.h
    760B
  • ver.RC
    1010B
  • sharewareluncher.res
    312.2KB
  • TAB.H
    1.3KB
  • LISTVIEW.C
    12.8KB
  • ver1.RC
    835B
  • 001.ICO
    766B
  • BROWSER.C
    30.3KB
  • time.c
    10.5KB
  • Hand-m.cur
    326B
  • Sharewareluncher.c
    36.1KB
  • sounder.wav
    76.1KB
  • Sharewareluncher.h
    967B
  • resource.h
    1.5KB
  • time1.h
    336B
  • sharewareluncher.exe
    429.5KB
  • Sysbutton.bmp
    300B
  • sharewareluncher.ide
    46KB
  • date.c
    4KB
  • go.wav
    37.9KB
  • num.bmp
    3.5KB
  • sharewareluncher.DSW
    1.7KB
  • addmenu.c
    19.5KB
  • LISTVIEW.H
    145B
  • start.wav
    38.1KB
  • Main1.bmp
    186.6KB
  • www.pudn.com.txt
    218B
内容介绍
#include <user\dlg.h> #include <commctrl.h> #include <shlobj.h> #include "resource.h" #include "sharewareluncher.h" #define DEL_CANCEL 90001 //#define IDC_HAND 99999 //hand cursor typedef struct AAA { LPITEMIDLIST lpi; LPSHELLFOLDER lpsfParent; LPITEMIDLIST lpifq; }TVITEMDATA,*LPTVITEMDATA; typedef struct _STRRET1 { UINT uType; // One of the STRRET_* values union { LPWSTR pOleStr; // OLESTR that will be freed LPSTR pStr; // ANSI string that will be freed (needed?) UINT uOffset; // Offset into SHITEMID char cStr[MAX_PATH]; // Buffer to fill in (ANSI) } ;//DUMMYUNIONNAME; } STRRET1, *LPSTRRET1; typedef struct _FileOp { UINT uOp; BOOL bUpdate; BOOL bNoAsk; BOOL bNoFolder; }DOFILEOP,*LPDOFILEOP; extern HINSTANCE hInst; extern HWND hMainWnd; extern char szRunCommand[300]; extern HBITMAP hbmBkg; HWND hTreeWnd; char szFoldername[MAX_PATH],szDestFolder[MAX_PATH],szShowDest[MAX_PATH]; char szSourceFile[MAX_PATH]; char szThisFolder[MAX_PATH]; //in listview-IDC_SELECTSEND's dir char szForCheck[300]; //restore the szRunCommand NM_TREEVIEW *pNmTv=NULL; DOFILEOP dofileop={FO_COPY,FALSE,FALSE,FALSE}; BOOL bNoMsg=FALSE; BOOL bDelNoAsk=FALSE; HWND hTypeWnd; HWND hBaseWnd=NULL,hExternWnd=NULL; //treeview hwnd and sendproc hwnd RECT CDestRt; //change dest folder rect,in SendProc,for text control "目的文件夹" BOOL bInText=FALSE; //check mouse in text control "目的文件夹"? int nFocused=-1; //for in listview,if "shift" pressed,record the first item; BOOL CALLBACK WINAPI BrowserProc(HWND hWnd,UINT uMsg,UINT wParam,LONG lParam); BOOL CALLBACK WINAPI MsgProc(HWND hWnd,UINT uMsg,UINT wParam,LONG lParam); BOOL CALLBACK WINAPI SendProc(HWND hWnd,UINT uMsg,UINT wParam,LONG lParam); BOOL CALLBACK WINAPI AskDelProc(HWND hWnd,UINT uMsg,UINT wParam,LONG lParam); void FillTreeView(HWND hwndTreeView,LPSHELLFOLDER lpsf,LPITEMIDLIST lpifq, HTREEITEM hParent); BOOL GetName( LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPSTR lpFriendlyName) ; LPITEMIDLIST CopyITEMID( LPMALLOC lpMalloc, LPITEMIDLIST lpi) ; LPITEMIDLIST ConcatPidls( LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) ; LPITEMIDLIST GetFullyQualPidl( LPSHELLFOLDER lpsf, LPITEMIDLIST lpi) ; void GetNormalAndSelectedIcons(LPITEMIDLIST lpifq,LPTV_ITEM lptvitem); int GetIcon( LPITEMIDLIST lpi, UINT uFlags) ; UINT GetSize(LPCITEMIDLIST pidl); LPITEMIDLIST Create(UINT cbSize); LPITEMIDLIST Next(LPCITEMIDLIST pidl); int WINAPI BrowseProc( HWND hwnd, UINT msg, LPARAM lParam, LPARAM lpData); int DelFile(LPSTR szfile); void DoCopy(void); void DoSend(void); void ResetFileOp(void); BOOL DoCheckCommand(void); void ExpandTree(void); void FillList(HWND hWnd); void FillSend(HWND hWnd,LPSTR szFileType); LRESULT NotifyHandler( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); void InitCol(HWND hWnd); void AddListview(HWND hWnd,LPSTR szDisplay,int i); HICON GetFileIcon(LPSTR lpi); void AddFileType(LPSTR s); void RestoreCheckCommand(void); //restore szRunCommand void UpdateDestFolder(void); //listview对话框“目的文件夹” void ChangeShortcut(void) { //MessageBox(GetFocus()," } void DelShortcut(void) { //Errmsg("del link will write later"); } void SendToHD(void) { wsprintf(szForCheck,szRunCommand); if(hBaseWnd==NULL) { if(DialogBox(hInst,MAKEINTRESOURCE(IDD_BROWSER),hMainWnd,(DLGPROC)BrowserProc)) DoCopy(); ResetFileOp(); } else { SetForegroundWindow(hBaseWnd); SendMessage(hBaseWnd,MYWM_ICON,0,0); } } #pragma argsused BOOL CALLBACK WINAPI BrowserProc(HWND hWnd,UINT uMsg,UINT wParam,LONG lParam) { switch(uMsg) { case WM_INITDIALOG: { HIMAGELIST hImageList; LPSHELLFOLDER lpsf = 0 ; SHFILEINFO sfi; HRESULT hr ; hBaseWnd=hWnd; hTreeWnd=GetDlgItem(hWnd,IDC_LISTALL); hImageList = (HIMAGELIST)SHGetFileInfo((LPCSTR)"C:\\", 0, &sfi, sizeof(SHFILEINFO), SHGFI_SYSICONINDEX | SHGFI_SMALLICON) ; if( hImageList) TreeView_SetImageList(hTreeWnd, hImageList, 0) ; hr=SHGetDesktopFolder( &lpsf) ; if( SUCCEEDED(hr)) { TreeView_DeleteAllItems( hTreeWnd); FillTreeView( hTreeWnd, lpsf, NULL, TVI_ROOT) ; ExpandTree(); TreeView_SelectItem(hTreeWnd,TreeView_GetRoot(hTreeWnd));//,TVGN_FIRSTVISIBLE); } if( lpsf) lpsf -> lpVtbl -> Release( lpsf) ; } break ; case MYWM_ICON: //临时借用,该对话框运行时再有"send to sharewareluncher" if(hExternWnd!=NULL) //可更新正运行(如果)的listview对话框内容 { UpdateDestFolder(); SetDlgItemText(hExternWnd,IDC_DESTFOLDER,szDestFolder); PostMessage(hExternWnd,MYWM_ICON,0,0); } break; case WM_COMMAND: switch(LOWORD(wParam)) { case IDOK: if(hExternWnd!=NULL) { SetForegroundWindow(hExternWnd); break; } hBaseWnd=NULL; EndDialog(hWnd,TRUE); return TRUE; case IDCANCEL: if(hExternWnd!=NULL) { SetForegroundWindow(hExternWnd); break; } hBaseWnd=NULL; wsprintf(szDestFolder,"\0"); EndDialog(hWnd,FALSE); return FALSE; case IDHELP: if(hExternWnd!=NULL) { SetForegroundWindow(hExternWnd); break; } if(DialogBox(hInst,MAKEINTRESOURCE(IDD_SENDTO),hMainWnd,(DLGPROC)SendProc)) ;//Errmsg("wait to complete");//DoCopy(); break; case IDC_MOVE: if(IsDlgButtonChecked(hWnd,IDC_MOVE)==BST_CHECKED) { dofileop.uOp=FO_MOVE; if(hExternWnd!=NULL) if(IsDlgButtonChecked(hExternWnd,IDC_MOVE)!=BST_CHECKED) CheckDlgButton(hExternWnd,IDC_MOVE,BST_CHECKED); } else { dofileop.uOp=FO_COPY; if(hExternWnd!=NULL) if(IsDlgButtonChecked(hExternWnd,IDC_MOVE)==BST_CHECKED) CheckDlgButton(hExternWnd,IDC_MOVE,BST_UNCHECKED); } break; case IDC_NOFOLDER: if(IsDlgButtonChecked(hWnd,IDC_NOFOLDER)==BST_CHECKED) { dofileop.bNoFolder=TRUE; if(hExternWnd!=NULL) { CheckDlgButton(hExternWnd,IDC_NOFOLDER,BST_CHECKED); ShowWindow(GetDlgItem(hExternWnd,IDC_DESTFOLDER),SW_HIDE); SendMessage(hExternWnd,WM_COMMAND,MAKELONG((WORD)IDC_NEWFOLDER,(WORD)EN_CHANGE),0); ShowWindow(GetDlgItem(hExternWnd,IDC_DESTFOLDER),SW_SHOW); } } else { dofileop.bNoFolder=FALSE; if(hExternWnd!=NULL) { CheckDlgButton(hExternWnd,IDC_NOFOLDER,BST_UNCHECKED); ShowWindow(GetDlgItem(hExternWnd,IDC_DESTFOLDER),SW_HIDE); SendMessage(hExternWnd,WM_COMMAND,MAKELONG((WORD)IDC_NEWFOLDER,(WORD)EN_CHANGE),0); ShowWindow(GetDlgItem(hExternWnd,IDC_DESTFOLDER),SW_SHOW); } } break; case IDC_UPDATE: if(IsDlgButtonChecked(hWnd,IDC_UPDATE)==BST_CHECKED) { dofileop.bUpdate=TRUE; if(hExternWnd!=NULL) i
评论
    相关推荐