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

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

?? hideinbmpdlg.cpp

?? 將文件隱藏于位圖
?? CPP
字號:
// HideInBmpDlg.cpp : implementation file
//

#include "stdafx.h"
#include "HideInBmp.h"
#include "HideInBmpDlg.h"
#include "About.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//本程序利用bmp的RGB的低2,1,3位
//10l位圖相對于文件的偏移
//28l像素的位數
//何建敏2000年6月5日
/////////////////////////////////////////////////////////////////////////////
// CHideInBmpDlg dialog

CHideInBmpDlg::CHideInBmpDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CHideInBmpDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CHideInBmpDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
	for(int i=0;i<8;i++)
	{
		mask[i]=1<<i;
	}
}

void CHideInBmpDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CHideInBmpDlg)
	DDX_Control(pDX, IDC_PUPINTOBMP, m_PutIntoBmp);
	DDX_Control(pDX, IDC_GETFROMBMP, m_GetFromBmp);
	DDX_Control(pDX, IDC_ABOUT, m_About);
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CHideInBmpDlg, CDialog)
	//{{AFX_MSG_MAP(CHideInBmpDlg)
	ON_WM_PAINT()
	ON_WM_QUERYDRAGICON()
	ON_BN_CLICKED(IDC_PUPINTOBMP, OnPupintobmp)
	ON_BN_CLICKED(IDC_GETFROMBMP, OnGetfrombmp)
	ON_BN_CLICKED(IDC_ABOUT, OnAbout)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CHideInBmpDlg message handlers

BOOL CHideInBmpDlg::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
    m_About.SetIcon(IDI_ABOUT);
    m_PutIntoBmp.SetIcon(IDI_PUT);
	m_GetFromBmp.SetIcon(IDI_GET);
	// TODO: Add extra initialization here
	
	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 CHideInBmpDlg::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 CHideInBmpDlg::OnQueryDragIcon()
{
	return (HCURSOR) m_hIcon;
}

void CHideInBmpDlg::OnPupintobmp() 
{
	CFileDialog m_Dialog(TRUE,NULL,"*.bmp",NULL,"位圖文件(*.bmp)");
	m_Dialog.DoModal();
	CString FileName,FileName1,FileTitle,FileExt;
	unsigned int file_len=0,pic_offset=0,bmp_len=0,len=0;
	state='r';
	number=0;
	FileName=m_Dialog.GetPathName();
	FileName.ReleaseBuffer();
	CFileDialog m_Dialog1(TRUE,NULL,"*.*",NULL,"所有文件(*.*)");
	m_Dialog1.DoModal();
	FileName1=m_Dialog1.GetPathName();
	FileName1.ReleaseBuffer();
	try
	{
        m_File1.Open(FileName,CFile::modeReadWrite|CFile::typeBinary);
	    m_File1.Seek(28l,0);
		m_File1.Read(&byte_buf,1);
		if(byte_buf!=24)
		{
			m_File1.Close();
			MessageBox("你所選擇的位圖文件不是24位","錯誤",MB_OK|MB_ICONSTOP);
			return;
		}
		m_File1.Seek(10l,0);
		bmp_len=m_File1.GetLength();
		m_File1.Read(&pic_offset,1);
		bmp_len-=pic_offset-1;
		m_File2.Open(FileName1,CFile::modeRead|CFile::typeBinary);
		file_len=m_File2.GetLength();
		if(file_len>=bmp_len/4-45)
		{
			m_File1.Close();
			m_File2.Close();
			MessageBox("你所選擇的位圖不足入下隱藏文件!","錯誤",MB_OK|MB_ICONSTOP);
			return;
		}
		m_File1.Seek(pic_offset,0);
		int len1,len2,len3,len4;
		len1=file_len&0xff;
		len2=(file_len>>8)&0xff;
		len3=(file_len>>16)&0xff;
		len4=(file_len>>24)&0xff;
		Put(len1);
		Put(len2);
		Put(len3);
		Put(len4);
		char *filetitle,*fileext;
		FileTitle=m_Dialog1.GetFileTitle();
		FileExt=m_Dialog1.GetFileExt();
		FileTitle.ReleaseBuffer();
		FileTitle.ReleaseBuffer();
		filetitle=FileTitle.GetBuffer(FileTitle.GetLength());
		fileext=FileExt.GetBuffer(FileExt.GetLength());
		for(int i=0;i<8;i++)
		{
			if(i<FileTitle.GetLength())
			{
				Put(*filetitle);
				filetitle++;
			}
			else
			{
				char temp='*';
				Put(temp);
			}
		}
		for(i=0;i<3;i++)
		{
			if(i<FileExt.GetLength())
			{
				Put(*fileext);
				fileext++;
			}
			else
			{
				char temp='*';
				Put(temp);
			}
		}
		while(len<file_len)
		{
			m_File2.Read(&byte_buf,1);
			Put(byte_buf);
			len++;
		}
		m_File2.Close();
		m_File1.Close();
		CString ok;
		ok.Format("已將%s加入%s",FileName1,FileName);
		MessageBox(ok,"提示",MB_OK);
	}
	catch( CFileException* fe )
	{
		switch(fe->m_cause)
		{
		case CFileException::fileNotFound:
			MessageBox("沒有找到文件,程序不能繼續.","錯誤",MB_OK|MB_ICONERROR);
		default:
			MessageBox("文件錯誤,程序不能繼續.","錯誤",MB_OK|MB_ICONERROR);
		}
		fe->Delete();
	}	
}

void CHideInBmpDlg::Put(char byte_buf)
{
	try{
		m_File1.Read(byte_bufs,5);
		if(state=='r'&&number==0)
		{
			if(byte_buf&mask[0]) byte_bufs[0]|=1;
			else byte_bufs[0]&=0xfe;
			if((byte_buf&mask[1])>>1) byte_bufs[0]|=2;
			else byte_bufs[0]&=0xfd;
			if((byte_buf&mask[2])>>2) byte_bufs[1]|=1;
			else byte_bufs[1]&=0xfe;
			if((byte_buf&mask[3])>>3) byte_bufs[2]|=1;
			else byte_bufs[2]&=0xfe;
			if((byte_buf&mask[4])>>4) byte_bufs[2]|=2;
			else byte_bufs[2]&=0xfd;
			if((byte_buf&mask[5])>>5) byte_bufs[2]|=4;
			else byte_bufs[2]&=0xfb;
			if((byte_buf&mask[6])>>6) byte_bufs[3]|=1;
			else byte_bufs[3]&=0xfe;
			if((byte_buf&mask[7])>>7) byte_bufs[3]|=2;
			else byte_bufs[3]&=0xfd;
			m_File1.Seek(-5l,1);
			m_File1.Write(byte_bufs,5);
			state='g';
			number=0;
			m_File1.Seek(-1l,1);
			return;
		}
		if(state=='g'&&number==0)
		{
			if(byte_buf&mask[0]) byte_bufs[0]|=1;
			else byte_bufs[0]&=0xfe;
			if((byte_buf&mask[1])>>1) byte_bufs[1]|=1;
			else byte_bufs[1]&=0xfe;
			if((byte_buf&mask[2])>>2) byte_bufs[1]|=2;
			else byte_bufs[1]&=0xfd;
			if((byte_buf&mask[3])>>3) byte_bufs[1]|=4;
			else byte_bufs[1]&=0xfb;
			if((byte_buf&mask[4])>>4) byte_bufs[2]|=1;
			else byte_bufs[2]&=0xfe;
			if((byte_buf&mask[5])>>5) byte_bufs[2]|=2;
			else byte_bufs[2]&=0xfd;
			if((byte_buf&mask[6])>>6) byte_bufs[3]|=1;
			else byte_bufs[3]&=0xfe;
			if((byte_buf&mask[7])>>7) byte_bufs[4]|=1;
			else byte_bufs[4]&=0xfe;
			m_File1.Seek(-5l,1);
			m_File1.Write(byte_bufs,5);
			state='b';
			number=1;
			m_File1.Seek(-1l,1);
			return;
		}
		if(state=='b'&&number==1)
		{
			if(byte_buf&mask[0]) byte_bufs[0]|=2;
			else byte_bufs[0]&=0xfd;
			if((byte_buf&mask[1])>>1) byte_bufs[0]|=4;
			else byte_bufs[0]&=0xfb;
			if((byte_buf&mask[2])>>2) byte_bufs[1]|=1;
			else byte_bufs[1]&=0xfe;
			if((byte_buf&mask[3])>>3) byte_bufs[1]|=2;
			else byte_bufs[1]&=0xfd;
			if((byte_buf&mask[4])>>4) byte_bufs[2]|=1;
			else byte_bufs[2]&=0xfe;
			if((byte_buf&mask[5])>>5) byte_bufs[3]|=1;
			else byte_bufs[3]&=0xfe;
			if((byte_buf&mask[6])>>6) byte_bufs[3]|=2;
			else byte_bufs[3]&=0xfd;
			if((byte_buf&mask[7])>>7) byte_bufs[3]|=4;
			else byte_bufs[3]&=0xfb;
			m_File1.Seek(-5l,1);
			m_File1.Write(byte_bufs,5);
			m_File1.Seek(-1l,1);
			state='r';
			number=0;
			return;
		}
	}
	catch( CFileException* fe )
	{
		switch(fe->m_cause)
		{
		case CFileException::fileNotFound:
			MessageBox("沒有找到文件,程序不能繼續.","錯誤",MB_OK|MB_ICONERROR);
		default:
			MessageBox("文件錯誤,程序不能繼續.","錯誤",MB_OK|MB_ICONERROR);
		}
		fe->Delete();
	}	
	return;

}

void CHideInBmpDlg::OnGetfrombmp() 
{
	try
	{
		CFileDialog m_Dialog(TRUE,NULL,"*.bmp",NULL,"位圖文件(*.bmp)");
		m_Dialog.DoModal();
		CString FilePath,FileTitle,FileExt;
		state='r';
    	number=0;
		FilePath=m_Dialog.GetPathName();
		FilePath.ReleaseBuffer();
		unsigned int bmp_len=0,pic_offset=0,len=0,file_len=0;
		char tag;
		m_File1.Open(FilePath,CFile::modeRead|CFile::typeBinary);
		m_File1.Seek(28l,0);
		m_File1.Read(&tag,1);
		if(tag!=24)
		{
			m_File1.Close();
			MessageBox("你所選擇的位圖文件不是24位","錯誤",MB_OK|MB_ICONSTOP);
			return;			
		}
        m_File1.Seek(10l,0);
		m_File1.Read(&pic_offset,1);
		m_File1.Seek(pic_offset,0);
		int len1,len2,len3,len4;
		len1=Get();
		len2=Get();
		len3=Get();
		len4=Get();
		file_len=len1+(len2<<8)+(len3<<16)+(len4<<24);
		for(int i=0;i<8;i++)
		{
			char temp;
			temp=Get();
			if(temp!='*')
				FileTitle+=temp;
		}
		for(i=0;i<3;i++)
		{
			char temp;
			temp=Get();
			if(temp!='*')
				FileExt+=temp;
		}
		FilePath=m_Dialog.GetPathName();
		int le=FilePath.GetLength();
		for(i=0;i<=le-1;i++)
		{
			if(FilePath.Right(1)!="\\") FilePath.Delete(le-1-i,1);
			else break;
		}
		FilePath+=FileTitle;
		FilePath+=".";
		FilePath+=FileExt;
		m_File2.Open(FilePath,CFile::modeCreate|CFile::typeBinary|CFile::modeWrite);
		while(len<file_len)
		{
			char temp;
			temp=Get();
			m_File2.Write(&temp,1);
			len++;
		}
		m_File1.Close();
		m_File2.Close();
		CString String;
		String.Format("已將%s從位圖文件中取出",FilePath);
		MessageBox(String,"提示",MB_OK);
	}
	catch( CFileException* fe )
	{

		switch(fe->m_cause)
		{
		case CFileException::fileNotFound:
			MessageBox("沒有找到文件,程序不能繼續.","錯誤",MB_OK|MB_ICONERROR);
		default:
			MessageBox("文件錯誤,程序不能繼續.","錯誤",MB_OK|MB_ICONERROR);
		}
		fe->Delete();
	}	
	return;
	
}

int CHideInBmpDlg::Get()
{
	try
	{
		m_File1.Read(&byte_bufs,5);
		byte_buf=0;
		if(state=='r'&&number==0)
		{
			if(byte_bufs[0]&1==1)      byte_buf|=mask[0];
			if((byte_bufs[0]>>1)&1==1) byte_buf|=mask[1];
			if(byte_bufs[1]&1==1)      byte_buf|=mask[2];
			if(byte_bufs[2]&1==1)      byte_buf|=mask[3];
			if((byte_bufs[2]>>1)&1==1) byte_buf|=mask[4];
			if((byte_bufs[2]>>2)&1==1) byte_buf|=mask[5];
			if(byte_bufs[3]&1==1)      byte_buf|=mask[6];
			if((byte_bufs[3]>>1)&1==1) byte_buf|=mask[7];
			m_File1.Seek(-1l,1);
			state='g';
			number=0;
			return byte_buf;
		}
		if(state=='g'&&number==0)
		{
			if(byte_bufs[0]&1==1)      byte_buf|=mask[0];
			if(byte_bufs[1]&1==1)      byte_buf|=mask[1];
			if((byte_bufs[1]>>1)&1==1) byte_buf|=mask[2];
			if((byte_bufs[1]>>2)&1==1) byte_buf|=mask[3];
			if(byte_bufs[2]&1==1)      byte_buf|=mask[4];
			if((byte_bufs[2]>>1)&1==1) byte_buf|=mask[5];
			if(byte_bufs[3]&1==1)      byte_buf|=mask[6];
			if(byte_bufs[4]&1==1)      byte_buf|=mask[7];
			m_File1.Seek(-1l,1);
			state='b';
			number=1;
			return byte_buf;
		}
		if(state=='b'&&number==1)
		{
			if((byte_bufs[0]>>1)&1==1) byte_buf|=mask[0];
			if((byte_bufs[0]>>2)&1==1) byte_buf|=mask[1];
			if(byte_bufs[1]&1==1)      byte_buf|=mask[2];
			if((byte_bufs[1]>>1)&1==1) byte_buf|=mask[3];
			if(byte_bufs[2]&1==1)      byte_buf|=mask[4];
			if(byte_bufs[3]&1==1)      byte_buf|=mask[5];
			if((byte_bufs[3]>>1)&1==1) byte_buf|=mask[6];
			if((byte_bufs[3]>>2)&1==1) byte_buf|=mask[7];
			m_File1.Seek(-1l,1);
			state='r';
			number=0;
			return byte_buf;
		}
	}
	catch( CFileException* fe )
	{
		switch(fe->m_cause)
		{
		case CFileException::fileNotFound:
			MessageBox("沒有找到文件,程序不能繼續.","錯誤",MB_OK|MB_ICONERROR);
		default:
			MessageBox("文件錯誤,程序不能繼續.","錯誤",MB_OK|MB_ICONERROR);
		}
		fe->Delete();
	}	    
	return 0;
}

void CHideInBmpDlg::OnAbout() 
{
	CAbout m_about;
	m_about.DoModal();
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩av网站免费在线| 精品久久久三级丝袜| 国产精品对白交换视频 | 色美美综合视频| 国产欧美va欧美不卡在线 | 亚洲第一av色| 91高清在线观看| 亚洲免费看黄网站| 97国产精品videossex| 91精品在线一区二区| 亚洲国产日韩a在线播放性色| 欧美亚洲免费在线一区| 亚洲综合免费观看高清在线观看| 97国产一区二区| 亚洲精品成人悠悠色影视| 91黄色小视频| 亚洲最大成人网4388xx| 欧美精品一卡二卡| 蜜臀av性久久久久蜜臀aⅴ四虎 | 国产**成人网毛片九色 | 国产精品丝袜在线| 成人成人成人在线视频| 国产精品入口麻豆原神| 91啪亚洲精品| 亚洲第一搞黄网站| 欧美大白屁股肥臀xxxxxx| 久久99精品久久久久| 国产目拍亚洲精品99久久精品| 免费三级欧美电影| 日韩欧美一级二级| 成人一区二区三区在线观看| 亚洲人成网站精品片在线观看| 91小视频在线免费看| 亚洲va欧美va人人爽午夜| 精品蜜桃在线看| 成人精品国产一区二区4080| 亚洲色图欧美偷拍| 欧美综合天天夜夜久久| 欧美a级一区二区| 久久久久88色偷偷免费 | 99久久综合国产精品| 国产精品久久久久精k8| 欧美亚洲日本一区| 国内久久婷婷综合| 一区二区三区日韩欧美精品 | 一区二区三区蜜桃网| 欧美精品v日韩精品v韩国精品v| 视频一区视频二区在线观看| 久久综合色天天久久综合图片| 成人午夜激情影院| 午夜电影一区二区三区| 欧美韩国日本不卡| 欧美肥妇bbw| 国产麻豆视频一区二区| 一区二区三区美女视频| 欧美日韩不卡视频| 日本中文一区二区三区| 中文字幕一区av| 日韩欧美高清在线| 色一区在线观看| 国产福利一区在线观看| 亚洲综合成人在线视频| 国产视频一区不卡| 91超碰这里只有精品国产| 成人高清视频在线| 久久国产剧场电影| 亚洲一二三专区| 国产精品久久久久久久久免费相片 | 国产欧美在线观看一区| 欧美精品久久久久久久多人混战| 成a人片国产精品| 国内精品国产三级国产a久久| 国产精品国产三级国产a| 欧美不卡激情三级在线观看| 欧美中文字幕一二三区视频| 成人在线综合网站| 亚洲一级电影视频| 亚洲欧美电影一区二区| 国产精品拍天天在线| 日韩免费观看高清完整版| 91官网在线观看| a美女胸又www黄视频久久| 久久99精品久久久久久| 日本不卡视频在线观看| 五月天一区二区| 亚洲精品视频一区二区| 久久久久久久综合色一本| 91精品国产综合久久精品| 欧美精品一二三区| 欧美日韩一区二区三区四区| 91视频在线观看| 99久久精品国产观看| 92国产精品观看| 成人高清av在线| 成+人+亚洲+综合天堂| 91丨porny丨中文| 欧美高清性hdvideosex| 欧美va天堂va视频va在线| 国产网红主播福利一区二区| 国产精品久久久一本精品| 亚洲自拍都市欧美小说| 欧美aa在线视频| 高清国产一区二区| 91久久人澡人人添人人爽欧美| 欧美性猛交xxxx乱大交退制版| 欧美电影影音先锋| 国产欧美日韩视频在线观看| 中文字幕在线一区| 视频一区在线播放| 国产91在线观看丝袜| 色综合天天综合色综合av| 欧美久久久久免费| 久久久久国产精品麻豆| 亚洲一区自拍偷拍| 久久国产福利国产秒拍| 成人h精品动漫一区二区三区| 在线观看一区二区精品视频| 欧美成人综合网站| 亚洲理论在线观看| 国产乱子轮精品视频| 91理论电影在线观看| 精品久久久三级丝袜| 亚洲综合在线免费观看| 国产福利一区二区三区视频 | 成人h动漫精品| 欧美日韩你懂得| 欧美国产一区在线| 奇米一区二区三区av| 色综合久久久久综合99| 久久综合九色综合97婷婷女人| 一区二区三区在线免费视频| 国产成人精品亚洲777人妖| 5566中文字幕一区二区电影 | 欧美一区二区久久| 一区二区三区在线视频观看| 国产精品亚洲专一区二区三区 | 国产精品影音先锋| 欧美精品一二三| 亚洲免费观看高清完整版在线观看熊| 麻豆精品在线播放| 欧美三级韩国三级日本三斤| 自拍偷拍亚洲激情| 国产精品影视网| 日韩精品一区二区三区在线观看| 亚洲精品国产视频| 成人av免费网站| 久久久精品欧美丰满| 精品伊人久久久久7777人| 欧美日韩激情一区| 亚洲国产乱码最新视频| 91视视频在线直接观看在线看网页在线看| 久久久久久日产精品| 久久精品国产99久久6| 91精品国产综合久久福利软件 | 日韩一区二区三区在线观看| 夜夜亚洲天天久久| 色屁屁一区二区| 中文字幕中文在线不卡住| 国产成a人亚洲精品| 久久精品夜色噜噜亚洲a∨| 久久机这里只有精品| 日韩精品专区在线影院重磅| 日本成人在线不卡视频| 欧美男女性生活在线直播观看| 一区二区三区高清在线| 日本韩国欧美在线| 一区二区三区电影在线播| 91麻豆国产福利在线观看| 亚洲精品精品亚洲| 欧美性受极品xxxx喷水| 亚洲成a人片在线不卡一二三区| 欧美性高清videossexo| 亚洲一区二区成人在线观看| 欧美日韩一区二区三区四区| 天天综合天天做天天综合| 欧美二区三区91| 精品亚洲成a人在线观看| 精品区一区二区| 国产精品中文欧美| 中文字幕一区二区三区不卡| 色综合久久六月婷婷中文字幕| 一区二区免费看| 欧美一区二区在线视频| 久久国产生活片100| 国产亚洲精品aa午夜观看| 成人午夜免费电影| 亚洲午夜av在线| 日韩精品一区二区三区swag| 激情av综合网| 综合久久给合久久狠狠狠97色 | 久久久久久久久伊人| 国产a级毛片一区| 亚洲欧美偷拍卡通变态| 9191精品国产综合久久久久久| 激情成人综合网| 亚洲免费观看高清完整版在线观看| 欧美日韩电影在线| 国产制服丝袜一区| 一区二区三区在线观看欧美| 国产欧美日本一区视频|