亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? exeextractordlg.cpp

?? 能夠生成exe執行文件的vc++源代碼程序
?? CPP
字號:
// ExeExtractorDlg.cpp : implementation file
//
// Part of Sel-extracting Exe creation utility :
//		DO NOT RUN IT DIRECTLY, ExeCreator will create exes based on this ExeExtractor exe
// 
// Written by Kaushal Malhotra (malhotrakaushal@mantraonline.com)
// Copyright (c) 2001
//
// To use this utility, follow these steps:
//   - Run ExeCreator
//   - Add the files you want to include in Exe
//   - If you need another name/path for your Exe change the name in output filed to a desired pathnam
//   - Click Makeexe
//   - Next run the resultant exe and provide a path to place the extracted files
//  
// You can easily port this logic into your own program or if there are a lot of requests
//	I might create a class to isolate the processing part
//
//
// Warning: this code hasn't been subject to a heavy testing, so
// use it on your own risk. The author accepts no liability for the 
// possible damage caused by this code.
//
// Version 1.0  21 Dec 2001
//              Initial release

#include "stdafx.h"
#include "ExeExtractor.h"
#include "ExeExtractorDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CExeExtractorDlg dialog

CExeExtractorDlg::CExeExtractorDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CExeExtractorDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CExeExtractorDlg)
	m_FName = _T("");
	//}}AFX_DATA_INIT
	// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

void CExeExtractorDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CExeExtractorDlg)
	DDX_Control(pDX, IDC_FNAME, m_CtlFName);
	DDX_Text(pDX, IDC_FNAME, m_FName);
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CExeExtractorDlg, CDialog)
	//{{AFX_MSG_MAP(CExeExtractorDlg)
	ON_WM_PAINT()
	ON_WM_QUERYDRAGICON()
	ON_BN_CLICKED(ID_EXTRACTFILE, OnExtractfile)
	ON_BN_CLICKED(IDC_BROWSE, OnBrowse)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CExeExtractorDlg message handlers

BOOL CExeExtractorDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// Set the icon for this dialog.  The framework does this automatically
	//  when the application's main window is not a dialog
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon
	
	return TRUE;  // return TRUE  unless you set the focus to a control
}

// If you add a minimize button to your dialog, you will need the code below
//  to draw the icon.  For MFC applications using the document/view model,
//  this is automatically done for you by the framework.

void CExeExtractorDlg::OnPaint() 
{
	if (IsIconic())
	{
		CPaintDC dc(this); // device context for painting

		SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

		// Center icon in client rectangle
		int cxIcon = GetSystemMetrics(SM_CXICON);
		int cyIcon = GetSystemMetrics(SM_CYICON);
		CRect rect;
		GetClientRect(&rect);
		int x = (rect.Width() - cxIcon + 1) / 2;
		int y = (rect.Height() - cyIcon + 1) / 2;

		// Draw the icon
		dc.DrawIcon(x, y, m_hIcon);
	}
	else
	{
		CDialog::OnPaint();
	}
}

// The system calls this to obtain the cursor to display while the user drags
//  the minimized window.
HCURSOR CExeExtractorDlg::OnQueryDragIcon()
{
	return (HCURSOR) m_hIcon;
}

// Open Brwose for directory dialog box and return the name of directory selected
CString CExeExtractorDlg::BrowseForFolder()
{
	// We're going to use the shell to display a 
	// "Choose Directory" dialog box for the user.

	CString strResult = "";

	LPMALLOC lpMalloc;  // pointer to IMalloc

	if (::SHGetMalloc(&lpMalloc) != NOERROR)
		return strResult; // failed to get allocator  char szDisplayName[_MAX_PATH];

	char szBuffer[_MAX_PATH];
	BROWSEINFO browseInfo;

	browseInfo.hwndOwner = AfxGetMainWnd()->GetSafeHwnd();
	// set root at Desktop
	browseInfo.pidlRoot = NULL; 
	browseInfo.pszDisplayName = szBuffer;
	browseInfo.lpszTitle = "Please choose a folder for extraction";   // passed in
	browseInfo.ulFlags = BIF_RETURNONLYFSDIRS ;   // also passed in
	browseInfo.lpfn = NULL;      // not used
	browseInfo.lParam = 0;      // not used

	LPITEMIDLIST lpItemIDList;

	if ((lpItemIDList = ::SHBrowseForFolder(&browseInfo)) != NULL)
	{
		// Get the path of the selected folder from the
		// item ID list.
		if (::SHGetPathFromIDList(lpItemIDList, szBuffer))
		{
			// At this point, szBuffer contains the path 
			// the user chose.
			if (szBuffer[0] == '\0')
			{
				// SHGetPathFromIDList failed, or
				// SHBrowseForFolder failed.
				AfxMessageBox("Cannot use this path for extraction");
				return strResult;
			}

			// We have a path in szBuffer!
			// Return it.
			strResult = szBuffer;
			return strResult;
		}
		else
		{
			// The thing referred to by lpItemIDList 
			// might not have been a file system object.
			// For whatever reason, SHGetPathFromIDList
			// didn't work!
			AfxMessageBox("Cannot use this path for extraction");
			return strResult; // strResult is empty 
		}
		lpMalloc->Free(lpItemIDList);
		lpMalloc->Release();      
	}
	// If we made it this far, SHBrowseForFolder failed.
	return strResult;
}

// Show browse dialog box whenever browse button is clicked
void CExeExtractorDlg::OnBrowse()
{
	CString strFName = CExeExtractorDlg::BrowseForFolder();

	// If any directory is selected update edit box
	if(!strFName.IsEmpty())
	{
		m_FName = strFName;
		UpdateData(FALSE);
		m_CtlFName.SetFocus();
		m_CtlFName.SetSel(0,-1);
	}
}

// Extract the file(s) in resource to the selected directory
void CExeExtractorDlg::OnExtractfile() 
{
	UpdateData();
	// Ensure we have \ at the end
	if(!m_FName.IsEmpty() && m_FName[m_FName.GetLength() - 1] != '\\')
	{
		m_FName += '\\';
		UpdateData(FALSE);
	}

	// Find and Load the resource containing file(s) data
	HRSRC hResLoad = FindResource(AfxGetResourceHandle(),MAKEINTRESOURCE(IDR_IDR_EXE_EXEEXTRACTOR),"IDR_EXE");
	HGLOBAL hResData = LoadResource(AfxGetResourceHandle(),hResLoad);
	LPCSTR data = (LPCSTR)LockResource(hResData);
	LPCSTR prev_data = data;

	// We should have properly loaded the resource
	ASSERT(data != NULL && hResData != NULL);

	// First double word in data contains number of files in resource
	DWORD nFiles = *(DWORD *)data;
	data += sizeof(DWORD);
	for(DWORD nCtr = 0;nCtr < nFiles;++nCtr)
	{
		// Data is pointing to file name, use it with directory selected by user to create the final file name
		CString strFName = m_FName + data;
		data += CString(data).GetLength() + 1;
		FILE* fp = fopen(strFName,"wb");
		// We might not create file if user selected invalid directory
		// We can add some error handling to ensure proper directory is selected but
		//		I guess this solves our purpose at this time
		if(fp == NULL)
		{
			AfxMessageBox("Cannot create file " + strFName);
			return;
		}
		// Data now contains file size in bytes followed by actual file
		fwrite(data + sizeof(UINT),1,*(UINT *)data,fp);
		fclose(fp);
		data = (data + *(UINT *)data) + sizeof(UINT);
	}

	// We should have reached the end of resurce by now
	ASSERT((DWORD)(data - prev_data) == SizeofResource(AfxGetResourceHandle(),hResLoad));

	// Perform cleanup
	FreeResource(hResData);
	CString strMsg;
	strMsg.Format("%d Files successfully extracted.",nFiles);
	AfxMessageBox(strMsg);
	EndDialog(IDOK);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
激情五月婷婷综合网| 2020国产成人综合网| 欧美一区二区三区公司| 日韩午夜精品视频| 久久精品视频免费观看| 国产精品美女一区二区| 亚洲一区二区三区四区的| 天堂一区二区在线| 国产一区不卡在线| av欧美精品.com| 91麻豆精品国产91久久久更新时间| 欧美不卡一二三| 一区二区三区中文在线观看| 青青草97国产精品免费观看无弹窗版| 福利一区二区在线| 国产欧美精品国产国产专区| 中文字幕五月欧美| 日本在线播放一区二区三区| 国产a视频精品免费观看| 欧美视频一区二区三区| 久久人人爽爽爽人久久久| 亚洲永久精品国产| 国产福利一区二区三区在线视频| 在线免费观看不卡av| 久久久噜噜噜久久中文字幕色伊伊| 亚洲尤物视频在线| 韩国欧美一区二区| 国产精品影音先锋| 91年精品国产| 日韩免费高清视频| 亚洲人成影院在线观看| 婷婷丁香久久五月婷婷| 99久久精品一区二区| 日韩一区二区三| 国产欧美日韩精品在线| 日韩成人免费在线| 成人一区二区三区| 精品国一区二区三区| 亚洲视频一区二区免费在线观看| 美女在线一区二区| 在线成人小视频| 亚洲激情校园春色| 成人av动漫在线| www国产精品av| 日韩黄色免费网站| 欧美专区亚洲专区| 综合久久久久久| 成人av在线网站| 国产午夜精品美女毛片视频| 日韩国产高清影视| 色94色欧美sute亚洲线路一ni| 亚洲精品成人悠悠色影视| 天堂va蜜桃一区二区三区| 色999日韩国产欧美一区二区| 99久久免费精品高清特色大片| 7777精品伊人久久久大香线蕉最新版| 一区二区三区在线播放| 欧美喷水一区二区| 91在线国内视频| 亚洲女同一区二区| 国产成人一区在线| 久久久久国产一区二区三区四区| 免费不卡在线观看| 欧美电影一区二区三区| 一区二区三区高清不卡| 97精品国产97久久久久久久久久久久 | 青青草97国产精品免费观看无弹窗版 | 日韩精品一区二区三区在线播放| 亚洲午夜久久久久久久久电影院 | 一区二区三区精品视频| 91年精品国产| 亚洲精品老司机| 99久久精品国产一区| 中文字幕精品在线不卡| 成人黄页毛片网站| 国产精品天天看| 成人午夜激情视频| 国产精品免费视频观看| 成人午夜激情视频| 中文字幕一区二区在线观看| 91亚洲国产成人精品一区二三 | 99精品一区二区| 亚洲欧美一区二区视频| 99在线精品观看| 国产精品成人午夜| 91网页版在线| 一区二区三区中文字幕精品精品 | 亚洲国产一区二区在线播放| 欧洲激情一区二区| 午夜欧美大尺度福利影院在线看| 欧美色手机在线观看| 亚洲va欧美va国产va天堂影院| 欧美精品色综合| 久久超碰97中文字幕| 久久婷婷国产综合精品青草| 一区二区免费在线| 国产中文一区二区三区| 欧美高清在线精品一区| 一本色道久久加勒比精品| 亚洲电影在线播放| 日韩欧美另类在线| 国产91在线看| 亚洲精品日韩一| 91麻豆精品国产91久久久久久久久 | 国产精品99久久久久久有的能看 | 91亚洲男人天堂| 亚洲国产美女搞黄色| 日韩一区二区免费视频| 国产露脸91国语对白| 中文字幕一区二区三区蜜月| 在线观看日韩高清av| 日韩福利视频网| 久久中文字幕电影| 91麻豆123| 青青草国产成人99久久| 欧美国产精品一区二区| 欧美视频在线观看一区| 精品在线免费观看| 亚洲欧洲av另类| 欧美一区二区三区免费在线看| 国产精品亚洲午夜一区二区三区 | 欧美日韩在线一区二区| 免费xxxx性欧美18vr| 国产精品三级av| 制服丝袜在线91| aaa亚洲精品| 日本成人在线视频网站| 国产精品伦一区| 6080yy午夜一二三区久久| 国产福利不卡视频| 亚洲成a人v欧美综合天堂下载| 久久综合九色综合97婷婷女人 | 亚洲最新视频在线观看| 精品少妇一区二区三区免费观看 | 91成人看片片| 久久精品99国产精品日本| 国产精品色一区二区三区| 91精品国产综合久久精品性色| 国产98色在线|日韩| 蜜臀精品一区二区三区在线观看 | 欧亚一区二区三区| 国产成人在线视频播放| 午夜欧美在线一二页| 国产精品久久毛片a| 日韩一区二区三区在线观看| 99国产精品99久久久久久| 久久99精品国产.久久久久| 亚洲综合在线观看视频| 久久精品日产第一区二区三区高清版| 欧美性色黄大片| 99re热这里只有精品视频| 韩国毛片一区二区三区| 亚洲一级电影视频| 中文字幕在线观看一区二区| 欧美成人乱码一区二区三区| 色久综合一二码| 成人性色生活片| 国产综合色视频| 日本一区中文字幕| 一区二区三区精品视频| 专区另类欧美日韩| 国产精品视频一区二区三区不卡| 日韩亚洲欧美中文三级| 欧美色综合网站| 色婷婷综合在线| av不卡一区二区三区| 成人美女在线视频| 国产精品99久久久久久有的能看| 免费在线看一区| 奇米影视7777精品一区二区| 亚洲国产欧美日韩另类综合 | 91福利国产成人精品照片| 福利视频网站一区二区三区| 国产在线精品一区二区不卡了 | 欧美二区在线观看| 91精彩视频在线| 91啪九色porn原创视频在线观看| 成人高清免费观看| 成人一区在线看| 国产成人av电影在线播放| 国产一区二区三区久久悠悠色av| 久久91精品久久久久久秒播| 美腿丝袜亚洲色图| 麻豆精品一区二区三区| 麻豆一区二区在线| 日本不卡视频一二三区| 日韩精彩视频在线观看| 日韩高清一级片| 喷白浆一区二区| 久久99精品国产91久久来源| 国产在线观看一区二区| 国产激情精品久久久第一区二区| 国产成人一级电影| 大胆欧美人体老妇| av在线一区二区三区| 91麻豆国产福利精品| 91久久一区二区| 欧美视频在线播放| 日韩欧美综合在线| 久久这里只有精品首页|