锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产亚洲一区二区三区在线观看 ,欧美日韩免费观看一区三区,国产女人aaa级久久久级http://www.shnenglu.com/wanghaiguang/category/19357.html閫嗘按琛岃垷錛屼笉榪涘垯閫zh-cnFri, 10 Oct 2014 06:29:01 GMTFri, 10 Oct 2014 06:29:01 GMT60MFC wcslen鑾峰彇涓枃闀垮害http://www.shnenglu.com/wanghaiguang/archive/2014/10/10/208529.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Fri, 10 Oct 2014 03:53:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2014/10/10/208529.htmlhttp://www.shnenglu.com/wanghaiguang/comments/208529.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2014/10/10/208529.html#Feedback0http://www.shnenglu.com/wanghaiguang/comments/commentRss/208529.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/208529.html涓嶇煡閬撳ぇ瀹舵湁娌℃湁鎴戣繖縐嶄綋楠?澶у鍏堢湅鐪嬩笅闈㈣繖孌典唬鐮?
int fp=_wopen(L"Hello.dat",O_BINARY | O_CREAT | O_TRUNC | O_RDWR);
if(fp==-1) return;
write(fp,L"123涓浗浜?,wcslen(L"123涓浗浜?));
close(fp);

涓婇潰榪欐浠g爜涓嶇煡閬撳ぇ瀹剁湅鍑轟粈涔圔UG鏉ヤ簡.濡傛灉澶у鐪嬩笉鍑烘瘺鐥呬篃涓嶈凍涓烘?鍥犱負榪欐槸鎴戜滑鐨勪範鎯鑷翠簡鎴戜滑鐨勯敊璇駭鐢?


鍏堣鎴戞潵鍒嗘瀽涓涓媤rite鍚?涓嬮潰鏄痺rite鐨勫師鍨?
int write( int handle, const void *buffer, unsigned int count );
鍙傛暟:
handle   宸叉墦寮鎴栧凡鍒涘緩鐨勬枃浠跺彞鏌?/span>
buffer     寰呭啓鍏ョ殑鏁版嵁
count     寰呭啓鍏ョ殑鏁版嵁澶у皬
鐜板湪鍒嗘瀽涓轟粈涔堜笂闈㈢殑閭d唬鐮佹湁bug,鍏跺疄涓昏闂灝卞湪涓涓猙uffer,鍜宑ount.
濡傛灉鎴戜滑鍐欏叆涓涓狝nsi瀛楃涓?涓婇潰鐨勪唬鐮佹敼鎴愮浉搴旂殑褰㈠紡紜疄娌℃湁閿?
浣嗗鏋滄槸鍐欏叆涓涓瀛楃涓?閭d箞涓婇潰鐨勪唬鐮佸氨涓嶄弗鏍?鍘熷洜灝卞湪浜巆ount.

鎴戜滑棣栧厛鐪嬩竴涓媠trlen鍜?/span>wcslen,濡傛灉浣跨敤strlen,涓鑸儏鍐典笅,鎴戜滑鐩存帴浣滀負瀛楃涓茬殑闀垮害,
鑰屼嬌鐢?/span>wcslen,浣犱細鍙戠幇,寰楀嚭鐨勪笉鏄瓧絎︿覆鐨勯暱搴﹁屾槸瀛楃鐨勪釜鏁?

榪欏氨鏄棶棰樼殑鎵鍦?涓鑸儏鍐典笅.char鐨勯暱搴︽槸1,榪欐槸鐢╯izeof(char)榪愮畻鍑烘潵鐨勭粨鏋?
len=strlen(str)*sizeof(char);鑰屾垜浠竴鑸儏鍐典笅,閮藉彧鐢╯trlen(str)鏉ョ瓑浠?榪欏氨鏄鉤鏃剁殑涔犳儻.
姝f槸鐢變簬榪欎釜涔犳儻鎵寮曟潵鐨勯棶棰?榪欎釜涔犳儻騫朵笉閫傜敤浜庡瀛楃涓?鍥犱負wcslen(str)*sizeof(wchar_t)騫朵笉絳変簬wcslen(strl).榪欏氨鏄範鎯墍寮曡搗鐨勯敊璇?

璇村埌榪欓噷鎴戞兂澶у閮芥槑鐧戒簡.鎴戝湪榪欓噷鎶婅繖縐嶄範鎯О涔嬩負涓嶈壇涔犳儻.鎵浠ュぇ瀹朵互鍚庡湪璁$畻瀛楃涓查暱搴︾殑鏃跺?鍗冧竾涓嶈兘綆鑰岀畝涔?涓瀹氳len=strlen(str)*sizeof(char),len=wcslen(str)*sizeof(wchar_t).
涓嶈鍐嶇姱榪欑涔犳儻鎬х殑浣庣駭閿欒.

鏈枃杞嚜錛?a >http://blog.csdn.net/aylixuan/article/details/6130820

]]>
MFC璁劇疆榧犳爣婊戣疆鍝嶅簲http://www.shnenglu.com/wanghaiguang/archive/2014/05/08/206864.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Thu, 08 May 2014 08:33:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2014/05/08/206864.htmlhttp://www.shnenglu.com/wanghaiguang/comments/206864.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2014/05/08/206864.html#Feedback0http://www.shnenglu.com/wanghaiguang/comments/commentRss/206864.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/206864.html榧犳爣婊氳疆娑堟伅浼間箮鍙細鍙戠粰褰撳墠鑾峰緱鐒︾偣鐨勭獥鍙o紝鎵浠ュ綋瀛愮獥浣撴病鏈夌劍鐐規椂鏄敹涓嶅埌婊氳疆娑堟伅鐨勶紝鏀跺埌娑堟伅鐨勫彲鑳芥槸鐖剁獥鍙c?/p>

瑙e喅錛氭坊鍔犻紶鏍囧崟鍑葷浉搴斿嚱鏁幫紝鍦ㄥ搷搴斿嚱鏁頒腑娣誨姞SetFoucs();涓鍙ワ紝榪欐牱寮哄埗璁劇疆鐒︾偣緇欏瓙紿楀彛錛岀劧鍚庡啀婊氬姩榧犳爣婊氳疆錛屽瓙紿椾綋灝辮兘鏀跺埌婊氳疆娑堟伅浜嗐?/p>

 

闂緇х畫錛屽綋瀛愮獥鍙d笂鏈夊叾浠栧彲浠ヨ幏寰楃劍鐐圭殑鎺т歡鏃訛紝姣斿涓嬫媺鍒楄〃錛岃繖鏃跺湪紿楀彛鍑芥暟涓墽琛孲etFoucs();鐒︾偣浼氳嚜鍔ㄨ窇鍒伴偅涓帶浠朵笂鍘伙紝瀛愮獥鍙e悓鏍鋒敹涓嶅埌婊氳疆娑堟伅銆?/p>

瑙e喅錛氬湪鎵цSetFoucs();璇彞鍓嶅厛Disable瀛愮獥浣撲笂鐨勬墍鏈夋帶浠訛紝鐒跺悗鎵цSetFoucs();錛屽啀Enanle鎵鏈夋帶浠訛紝榪欐椂鐒︾偣鎵嶄細鍦ㄥ瓙紿楀彛涓娿?br />
鏈枃杞嚜錛?a style="font-family: verdana, 'courier new'; font-size: 14px; line-height: 21.111112594604492px;">http://blog.csdn.net/vanship/article/details/4119246



]]>
MFC 澶氭枃妗g晫闈㈢鐢ㄥ叧闂佹渶澶у寲鎸夐挳http://www.shnenglu.com/wanghaiguang/archive/2014/03/25/206331.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Tue, 25 Mar 2014 10:37:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2014/03/25/206331.htmlhttp://www.shnenglu.com/wanghaiguang/comments/206331.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2014/03/25/206331.html#Feedback0http://www.shnenglu.com/wanghaiguang/comments/commentRss/206331.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/206331.html

鍦?WM_CREATE 娑堟伅澶勭悊紼嬪簭涓殑 MDI 瀛愭鏋剁獥鍙?錛圕MDIChildWnd 媧劇敓綾伙級 紱佺敤鍦ㄥ叧闂寜閽嬌鐢ㄤ笅闈㈢殑浠g爜錛?/p>

CMenu *pSysMenu = GetSystemMenu(FALSE); 
ASSERT(pSysMenu 
!= NULL); 
VERIFY(pSysMenu
->RemoveMenu(SC_CLOSE, MF_BYCOMMAND));

姝ゆ椂鐨勬渶澶с佹渶灝忓寲銆?span style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 22px; white-space: normal;">榪樺師鎸夐挳涔熸秷澶變笉瑙併傞氳繃鍦?/span>PreCreateWindow鍑芥暟涓慨鏀規潵瀹炵幇鏄劇ず鏈澶с佹渶灝忓寲銆?/span>榪樺師鎸夐挳銆?/span>
cs.style += WS_MINIMIZEBOX|WS_SIZEBOX; 



]]>
MFC 瀛愬璇濇涓庣埗瑙嗗浘浼犻掕嚜瀹氫箟娑堟伅http://www.shnenglu.com/wanghaiguang/archive/2014/03/07/206090.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Fri, 07 Mar 2014 07:01:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2014/03/07/206090.htmlhttp://www.shnenglu.com/wanghaiguang/comments/206090.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2014/03/07/206090.html#Feedback0http://www.shnenglu.com/wanghaiguang/comments/commentRss/206090.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/206090.html瑙嗗浘綾昏皟鐢ㄩ潪妯℃佸璇濇椂錛屽浣曢攢姣佸垎閰嶇殑鍐呭瓨

綆瑕佹楠わ細

1銆?/span>瑙嗗浘綾誨湪璋冪敤闈炴ā鎬佸璇濇鏃訛紝灝嗚嚜韜殑鎸囬拡浼犻掔粰闈炴ā鎬佸璇濇銆?/span>
2銆?/span>褰撻潪妯℃佸璇濇緇撴潫鏃訛紝鍚戣鍥劇被鍙戦佽嚜瀹氫箟娑堟伅錛岀敱鑷畾涔夋秷鎭鐞嗗嚱鏁版潵閲婃斁鍐呭瓨銆?/span>

鍏蜂綋浠g爜姝ラ錛?/strong>

1銆?/span>瀹氫箟鑷畾涔夋秷鎭?nbsp; #define WM_RELEASEPLAYSOUNDDC (WM_USER+1001)
2銆?/span>淇敼闈炴ā鎬佸璇濇綾葷殑鏋勯犲嚱鏁幫紝渚夸簬灝嗚鍥炬寚閽堜紶閫掕繘鍘匯?/span>

闈炴ā鎬佸璇濇.h鏂囦歡涓?/span>

class CTestDialog : public CDialog
{
    DECLARE_DYNAMIC(CPlaySound)

public:
    //CTestDialog (CWnd* pParent = NULL);   // standard constructor
    CTestDialog (CView* pParent);   // standard constructor
    virtual ~CTestDialog ();
    CView *pView;

// Dialog Data
    enum { IDD = IDD_TEST_DIALOG };

protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

    DECLARE_MESSAGE_MAP()
public:
    virtual BOOL OnInitDialog();
    afx_msg LRESULT OnNcHitTest(CPoint point);

};

闈炴ā鎬佸璇濇.cpp鏂囦歡涓?/span>
IMPLEMENT_DYNAMIC(CTestDialog, CDialog)
//CTestDialog::CTestDialog(CWnd* pParent /*=NULL*/)
CTestDialog::CTestDialog(CView* pParent)
    : CDialog(CTestDialog::IDD, pParent)
{
    pView = pParent;
}

3銆佸湪闈炴ā鎬佸璇濇緇撴潫鐨勬椂鍊欏彂閫佽嚜瀹氫箟娑堟伅
void CTestDialog::OnBnClickedBtnClose()
{
    // TODO: Add your control notification handler code here
    pView->PostMessage(WM_RELEASEPLAYSOUNDDC, 0, 0);
    OnOK();
}

4銆佸湪瑙嗗浘綾?/span>.h鏂囦歡涓紝澧炲姞瀹氫箟錛?/span>
afx_msg LRESULT OnReleaseDialog(WPARAM wparam,LPARAM lparam);

5銆佸湪瑙嗗浘綾?/span>.cpp鏂囦歡涓紝澧炲姞娑堟伅鏄犲皠閮ㄥ垎錛?/span>
ON_MESSAGE(WM_DIALOGOK,OnDialogOk)

6銆佸湪瑙嗗浘綾?/span>.cpp鏂囦歡涓?/span>瀹氫箟娑堟伅澶勭悊鍑芥暟鐨勫疄鐜幫細

LRESULT CTestView::OnReleaseDialog(WPARAM wparam,LPARAM lparam)
{
    if (m_pPlaySound != NULL)
    {
        delete m_pPlaySound;
        m_pPlaySound = NULL;
    }

    return 0;
}


]]>
MFC BMP鏂囦歡杞琂PEG鏂囦歡http://www.shnenglu.com/wanghaiguang/archive/2014/01/09/205258.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Thu, 09 Jan 2014 06:30:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2014/01/09/205258.htmlhttp://www.shnenglu.com/wanghaiguang/comments/205258.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2014/01/09/205258.html#Feedback0http://www.shnenglu.com/wanghaiguang/comments/commentRss/205258.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/205258.html2.鍦ㄤ綘灝嗚浣跨敤GDI+鐨勫伐紼嬩腑錛屽畬鎴愬垵濮嬪寲宸ヤ綔錛?br />鍦?/span>StdAfx.h涓姞鍏?/span>

#define ULONG_PTR unsigned long
#include <Gdiplus.h>
using namespace Gdiplus;

3.鍦?/span>CXApp澶存枃浠朵腑鍔犲叆

ULONG_PTR        m_gdiplusToken;

 4.鍦?BOOL CXApp::InitInstance() 涓坊鍔?/span>

GdiplusStartupInput     m_gdiplusStartupInput;
GdiplusStartup(&m_gdiplusToken&m_gdiplusStartupInput, NULL);

 5.鍦?/span>int CXApp::ExitInstance()鍔犲叆(榪欎釜鏂規硶闇瑕佽嚜宸卞姞鍏?鍦–lassWizard 涓紝娉ㄦ剰鍦–lassName涓夋嫨CXApp,Messages鍒楄〃妗嗕腑閫夋嫨ExitInstance)

Gdiplus::GdiplusShutdown(m_gdiplusToken);

 6.鍦≒roject->stting->Link->Intput->Additional Dependencies涓姞鍏?/span>gdiplus.lib

姝ゆ椂GDI+璁劇疆鎴愬姛銆?br />
鍏蜂綋浠g爜濡備笅錛?br />

int GetEncoderClsid(const WCHAR* format, CLSID* pClsid)   
{   
UINT num = 0;                     // number of image encoders   
UINT size = 0;                   // size of the image encoder array in bytes   
ImageCodecInfo* pImageCodecInfo = NULL;   
GetImageEncodersSize(&num, &size);   
if(size == 0)   
return -1;     //   Failure   
pImageCodecInfo = (ImageCodecInfo*)(malloc(size));   
if(pImageCodecInfo == NULL)   
return -1;     //   Failure   
GetImageEncoders(num, size, pImageCodecInfo);   
for(UINT j = 0; j < num; ++j)   
{   
if( wcscmp(pImageCodecInfo[j].MimeType, format) == 0 )   
{   
*pClsid = pImageCodecInfo[j].Clsid;   
free(pImageCodecInfo);   
return j;     //   Success   
}           
}   
free(pImageCodecInfo);   
return -1;     //   Failure   
}
void SaveFile(Bitmap* pImage, const wchar_t* pFileName)
{
EncoderParameters encoderParameters;
CLSID jpgClsid
GetEncoderClsid(L"image/jpeg", &jpgClsid);
encoderParameters.Count = 1;
encoderParameters.Parameter[0].Guid = EncoderQuality;
encoderParameters.Parameter[0].Type = EncoderParameterValueTypeLong;
encoderParameters.Parameter[0].NumberOfValues = 1;
// Save the image as a JPEG with quality level 100.
ULONG             quality;
quality = 100;
encoderParameters.Parameter[0].Value = &quality;
Status status = pImage->Save(pFileName, &jpgClsid, &encoderParameters);
if (status != Ok
{
wprintf(L"%d Attempt to save %s failed./n", status, pFileName);
}
}

//璋冪敤鏂瑰紡錛?/span>
Bitmap newbitmap(L"d://d.bmp");//鍔犺澆BMP
const wchar_t *pFileName=L"d://new.jpg";//淇濆瓨璺緞
SaveFile(&newbitmap,pFileName );

鏈枃杞嚜錛?/span>http://blog.csdn.net/highyyy/article/details/6125763

 



]]>
MFC 淇敼鍗曟枃妗f爣棰?/title><link>http://www.shnenglu.com/wanghaiguang/archive/2013/12/13/204764.html</link><dc:creator>鐜嬫搗鍏?/dc:creator><author>鐜嬫搗鍏?/author><pubDate>Fri, 13 Dec 2013 02:28:00 GMT</pubDate><guid>http://www.shnenglu.com/wanghaiguang/archive/2013/12/13/204764.html</guid><wfw:comment>http://www.shnenglu.com/wanghaiguang/comments/204764.html</wfw:comment><comments>http://www.shnenglu.com/wanghaiguang/archive/2013/12/13/204764.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wanghaiguang/comments/commentRss/204764.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wanghaiguang/services/trackbacks/204764.html</trackback:ping><description><![CDATA[<span style="font-family: Verdana; line-height: 26px; background-color: #ffffff; font-size: 12pt;"><strong>涓銆佷慨鏀規爣棰?/strong></span><span style="font-family: Verdana; line-height: 26px; background-color: #ffffff;"><br /></span><span style="font-family: Verdana; line-height: 26px; background-color: #ffffff; font-size: 12pt;">鏂規硶1錛?/span><span style="font-family: Verdana; line-height: 26px; background-color: #ffffff; font-size: 12pt;">鍦–MainFrame涓?/span><span style="color: #0000ff; font-family: Verdana; font-size: 12pt;">PreCreateWindow(CREATESTRUCT& cs)</span><span style="font-family: Verdana; line-height: 26px; background-color: #ffffff; font-size: 12pt;">榪涜鏇存敼</span><span style="font-family: Verdana; line-height: 26px; background-color: #ffffff; font-size: 12pt;">錛屽涓嬶細</span><br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="font-family: Verdana;">BOOL CKTLXSubjectShowFrame::PreCreateWindow(CREATESTRUCT& cs)</span><br /><span style="font-family: Verdana;">{</span><br />    <span style="color: #008000; font-family: Verdana;">//</span><span style="color: #008000; font-family: Verdana;"> TODO: Add your specialized code here and/or call the base class</span><span style="color: #008000; "><br /></span><span style="font-family: Verdana;">    cs.style &=~WS_MAXIMIZEBOX;</span><span style="color: #008000; font-family: Verdana;">//</span><span style="color: #008000; font-family: Verdana;">紱佺敤鏈澶у寲鎸夐挳</span><span style="color: #008000; "><br /></span><span style="font-family: Verdana;">    cs.style &=~WS_SIZEBOX;</span><br />    <span style="color: red; font-family: Verdana;">cs.style </span><span style="color: red; font-family: Verdana;">&=~</span><span style="color: red; font-family: Verdana;">FWS_ADDTOTITLE;</span><br /><br /><span style="font-family: Verdana;">    cs.lpszName = </span><span style="color: #ff0000; font-family: Verdana;">_T(</span><span style="color: #ff0000; font-family: Verdana;">"</span><span style="color: #ff0000; font-family: Verdana;">嫻嬭瘯鏍囬</span><span style="color: #ff0000; font-family: Verdana;">"</span><span style="color: #ff0000; font-family: Verdana;">)</span><span style="color: red; font-family: Verdana;">;</span><br /><span style="font-family: Verdana;">    cs.cx = 970;</span><br /><span style="font-family: Verdana;">    cs.cy = 650;</span><br />    <span style="color: #0000ff; font-family: Verdana;">return</span><span style="font-family: Verdana;"> CXTPFrameWnd::PreCreateWindow(cs);</span><br /><span style="font-family: Verdana;">}</span></div><span style="font-family: Arial; line-height: 26px; background-color: #ffffff;"><br /></span><span style="font-family: Verdana; line-height: 26px; background-color: #ffffff; font-size: 12pt;">鏂規硶2錛氬湪doc綾諱腑</span><span style="font-family: Verdana; line-height: 26px; background-color: #ffffff; color: #0000ff; font-size: 12pt;">OnNewDocument</span><span style="font-family: Verdana; line-height: 26px; background-color: #ffffff; font-size: 12pt;">鍑芥暟淇敼錛屾坊鍔犱慨鏀圭殑鏍囬錛屽涓嬶細</span><br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="font-family: Verdana;">BOOL CKTLXSubjectShowDoc::OnNewDocument()</span><br /><span style="font-family: Verdana;">{</span><br />    <span style="color: #0000ff; font-family: Verdana;">if</span><span style="font-family: Verdana;"> (!CDocument::OnNewDocument())</span><br />        <span style="color: #0000ff; font-family: Verdana;">return</span><span style="font-family: Verdana;"> FALSE;</span><br /><br />    <span style="color: #ff0000; font-family: Verdana;">SetTitle(_T(</span><span style="color: #ff0000; font-family: Verdana;">"</span><span style="color: #ff0000; font-family: Verdana;">嫻嬭瘯鏍囬</span><span style="color: #ff0000; font-family: Verdana;">"</span><span style="color: #ff0000; font-family: Verdana;">));</span><br /><br />    <span style="color: #0000ff; font-family: Verdana;">return</span><span style="font-family: Verdana;"> TRUE;</span><br /><span style="font-family: Verdana;">}</span></div><span style="font-family: Arial; line-height: 26px; background-color: #ffffff;"><br /></span><strong><span style="font-family: Verdana; line-height: 26px; background-color: #ffffff; font-size: 12pt;">浜屻?/span><span style="font-family: Verdana; font-size: 16px; line-height: 20px; background-color: #ffffff;">淇敼鏍囬鍚庡崐閮ㄥ垎</span></strong><span style="font-family: Verdana; line-height: 26px; background-color: #ffffff; font-size: 12pt;"><br /></span><span style="font-family: Verdana; line-height: 26px; background-color: #ffffff; font-size: 12pt;">鍗曟枃妗f爣棰橀氬父浼氭湁涓ら儴鍒嗙粍鎴愶紝渚嬪錛?/span><span style="font-family: Verdana; line-height: 26px; background-color: #ffffff; color: #ff0000; font-size: 12pt;">鏍囬鍚嶇О—宸ョ▼鍚嶇О錛?/span><span style="font-family: Verdana; font-size: 12pt; line-height: 26px; background-color: #ffffff;">淇敼StringTable鐨処DR_MAINFRAME鐨勬爣棰橈紝灝嗙涓涓猏n涔嬪墠鐨勫瓧絎︿覆鏇挎崲涓?/span><p class="MsoNormal" align="left" style="margin: 0cm 0cm 0pt; padding: 0px; font-size: 12px; font-family: Simsun; line-height: 20px; background-color: #ffffff;"></p><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: red;">鏍囬</span>\n\nTestSingleTitle\n\n\nTestSingleTitle.Document\nTestSingleTitle.Document</div><p> <span style="line-height: 20px; font-size: 12pt; font-family: Verdana;"><strong>涓夈佸幓</strong></span><span style="line-height: 20px; font-size: 12pt; font-family: Verdana;"><strong>鎺夋爣棰樼殑鍚庡崐閮ㄥ垎</strong></span></p><p class="MsoNormal" align="left" style="margin: 0cm 0cm 0pt; padding: 0px; font-size: 12px; font-family: Simsun; line-height: 20px; background-color: #ffffff;"><span style="font-family: Verdana; font-size: 12pt;">鏂規硶1錛?/span><span style="font-size: 12pt; font-family: Verdana;">鍦–</span><span style="font-family: Verdana; font-size: 12pt; line-height: 21px; text-indent: 26.66666603088379px;">TestSingleTitle</span><span lang="EN-US" style="font-size: 12pt; font-family: Verdana;">App::InitInstance()</span><span style="font-size: 12pt; font-family: Verdana;">涓皟鐢ㄥ涓嬭鍙?/span><span lang="EN-US" style="font-size: 12pt; font-family: Verdana;">m_pMainWnd->SetWindowText(<span style="font-size: 12pt;">_T(</span><span lang="EN-US" style="font-size: 10pt;"><span style="font-size: 12pt;">"</span></span><span lang="EN-US" style="font-size: 12pt; color: #0000ff;"><strong style="color: #ff0000; text-indent: 26.66666603088379px;">鏍囬</strong></span><span lang="EN-US" style="font-size: 10pt;"><span style="font-size: 12pt;">")</span></span><span lang="EN-US" style="font-size: 12pt;">);</span></span><span style="font-family: Verdana; font-size: 12pt;">鎴栧湪鍏朵粬鍦版柟鐢?span lang="EN-US" style="font-size: 12pt;">(AfxGetMainWnd())->SetWindowText(</span></span><span lang="EN-US" style="font-family: Verdana; font-size: 10pt;"><span style="font-size: 12pt;">_T(</span><span style="font-size: 10pt;"><span style="font-size: 12pt;">"</span></span><span style="font-size: 12pt; color: #0000ff;"><strong style="color: #ff0000; text-indent: 26.66666603088379px;">鏍囬</strong></span><span style="font-size: 12pt;"><span style="color: maroon;">")</span></span></span><span lang="EN-US" style="font-family: Verdana; font-size: 12pt;">);</span><span style="font-family: Verdana; font-size: 12pt;">涔熷彲浠ュ緱鍒扮浉鍚岀殑緇撴灉銆?/span></p><p class="MsoNormal" align="left" style="margin: 0cm 0cm 0pt; padding: 0px; font-size: 12px; font-family: Simsun; line-height: 20px; background-color: #ffffff;"><span style="font-size: 10pt; font-family: 鏂板畫浣?">銆</span></p><p class="MsoNormal" style="margin: 0cm 0cm 0pt; padding: 0px;"><span style="font-size: 12pt; font-family: Verdana; color: #000000;">鏂規硶2錛?/span><span style="font-size: 12pt; font-family: Verdana;">鍙互閫氳繃</span><span style="font-size: 12pt; font-family: Verdana;">鍒╃敤<span lang="EN-US" style="font-family: Verdana; font-size: 12pt;">CWnd::SetWindowText</span></span><span style="font-size: 12pt; font-family: Verdana;">鍗籌細<span lang="EN-US" style="font-family: Verdana; font-size: 12pt;">void SetWindowText( LPCTSTR</span>銆<span lang="EN-US" style="font-family: Verdana; font-size: 12pt;">lpszString );</span></span><span style="font-size: 12pt; font-family: Verdana;">閲嶈澆<span lang="EN-US" style="font-family: Verdana; font-size: 12pt;">CFramWnd</span></span><span style="font-size: 12pt; font-family: Verdana;">綾葷殑<span lang="EN-US" style="font-family: Verdana; font-size: 12pt; color: #0000ff;">OnUpdateFrameTitle</span></span><span style="font-size: 12pt; font-family: Verdana;">鍑芥暟</span></p><p class="MsoNormal" align="left" style="margin: 0cm 0cm 0pt; padding: 0px;"></p><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000ff; font-family: Verdana;">void</span><span style="font-family: Verdana;"> CMainFrame::OnUpdateFrameTitle(BOOL bAddToTitle)</span><br /><span style="font-family: Verdana;">{</span><br />    <span style="color: #008000; font-family: Verdana;">//</span><span style="color: #008000; font-family: Verdana;"> TODO: 鍦ㄦ娣誨姞涓撶敤浠g爜鍜?鎴栬皟鐢ㄥ熀綾匯</span><span style="color: #008000; "><br /></span><span style="font-family: Verdana;">   </span><span style="font-family: Verdana; color: #ff0000;"> SetWindowText(_T(</span><span style="font-family: Verdana; color: #ff0000;">"</span><span style="font-family: Verdana; color: #ff0000;">鏍囬</span><span style="font-family: Verdana; color: #ff0000;">"</span><span style="font-family: Verdana; color: #ff0000;">));</span><br /><span style="font-family: Verdana;">    CFrameWnd::OnUpdateFrameTitle(bAddToTitle);</span><br /><span style="font-family: Verdana;">}</span></div><p> <span style="font-size: 12pt; font-family: Verdana;">鏂規硶</span><span style="font-size: 12pt; font-family: Verdana;">3</span><span style="font-size: 12pt; font-family: Verdana;">錛氬湪</span><span style="font-size: 10pt; font-family: Verdana;"><span lang="EN-US" style="font-size: 12pt;">CMainFrame</span></span><span style="font-size: 12pt; font-family: Verdana;">鐨?span lang="EN-US" style="color: #0000ff; font-size: 12pt;">PreCreateWindow</span></span><span style="font-size: 12pt; font-family: Verdana;">鍑芥暟涓慨鏀圭獥鍙i鏍鹼細</span></p><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="font-family: Verdana;">BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)</span><br /><span style="font-family: Verdana;">{</span><br />          <span style="color: #ff0000; font-family: Verdana;">cs.style </span><span style="color: #ff0000; font-family: Verdana;">&=</span> <span style="color: #ff0000; font-family: Verdana;">~</span><span style="color: #ff0000; font-family: Verdana;">(LONG) FWS_ADDTOTITLE;</span><br />          <span style="color: #0000ff; font-family: Verdana;">return</span><span style="font-family: Verdana;"> CFrameWnd::PreCreateWindow(cs);</span><br /><span style="font-family: Verdana;">}</span></div><img src ="http://www.shnenglu.com/wanghaiguang/aggbug/204764.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wanghaiguang/" target="_blank">鐜嬫搗鍏?/a> 2013-12-13 10:28 <a href="http://www.shnenglu.com/wanghaiguang/archive/2013/12/13/204764.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>MFC PreTranslateMessage(MSG* pMsg)涓皟鐢―oModal()妯℃佺獥鍙i棶棰?/title><link>http://www.shnenglu.com/wanghaiguang/archive/2013/12/05/204603.html</link><dc:creator>鐜嬫搗鍏?/dc:creator><author>鐜嬫搗鍏?/author><pubDate>Thu, 05 Dec 2013 02:58:00 GMT</pubDate><guid>http://www.shnenglu.com/wanghaiguang/archive/2013/12/05/204603.html</guid><wfw:comment>http://www.shnenglu.com/wanghaiguang/comments/204603.html</wfw:comment><comments>http://www.shnenglu.com/wanghaiguang/archive/2013/12/05/204603.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wanghaiguang/comments/commentRss/204603.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wanghaiguang/services/trackbacks/204603.html</trackback:ping><description><![CDATA[<span style="font-size: 12pt;"> 鍦?/span><span style="font-size: 12pt;">PreTranslateMessage(MSG* pMsg)涓皟鐢―oModal()妯℃佺獥鍙e涓嬶細<br /></span><br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--> 1 BOOL CMainDlg::PreTranslateMessage(MSG* pMsg)<br /> 2 {<br /> 3     <span style="color: #008000; ">//</span><span style="color: #008000; "> TODO: Add your specialized code here and/or call the base class</span><span style="color: #008000; "><br /></span> 4     <span style="color: #0000FF; ">if</span> ( pMsg->message == WM_LBUTTONDOWN)<br /> 5     {<br /> 6         GetWindowRect(m_oldRect);<br /> 7         ::SetCapture(<span style="color: #0000FF; ">this</span>->m_hWnd);<br /> 8         m_bCanDrag = TRUE;<br /> 9         m_lastPt = pMsg->pt ;<br />10     }<br />11     <span style="color: #0000FF; ">else</span> <span style="color: #0000FF; ">if</span> ( pMsg->message == WM_LBUTTONUP)<br />12     {<br />13         <span style="color: #0000FF; ">if</span>( m_bCanDrag )<br />14         {<br />15             ::ReleaseCapture();<br />16             m_bCanDrag = FALSE;<br />17             GetWindowRect(m_newRect);<br />18             <span style="color: #0000FF; ">if</span> (m_oldRect.EqualRect(m_newRect))<br />19             {<br />20                 <span style="color: #ff00ff;">GetMainItemID(pMsg);</span><span style="color: #008000; ">//</span><span style="color: #008000; ">璋冪敤瀵硅瘽妗嗗嚱鏁?/span><span style="color: #008000; "><br /></span>21<span style="color: #ff0000;">                 </span><span style="color: #339966;">//</span><span style="color: #339966;">return</span><span style="color: #339966;"> TRUE;</span><br />22             }<br />23         }<br />24     } <br />25     <span style="color: #0000FF; ">else</span> <span style="color: #0000FF; ">if</span>( pMsg->message == WM_MOUSEMOVE)<br />26     {<br />27         <span style="color: #0000FF; ">if</span>( m_bCanDrag )<br />28         {<br />29             CRect rc;<br />30             GetWindowRect(&rc);<br />31             rc.OffsetRect( pMsg->pt.x - m_lastPt.x , pMsg->pt.y - m_lastPt.y  ) ;<br />32             m_lastPt = pMsg->pt;<br />33             <span style="color: #0000FF; ">this</span>->MoveWindow( rc );<br />34         }<br />35     }<br />36 <br />37     <span style="color: #0000FF; ">return</span> CDialog::PreTranslateMessage(pMsg);<br />38 }<br /><br />39  <span style="color: #0000FF; ">void</span> CMainDlg::GetMainItemID(MSG* pMsg)<br />40 {<br />41     <span style="color: #0000FF; ">if</span> (pMsg->hwnd == GetDlgItem( IDC_BTN_MYCOMPUTER )->m_hWnd)<br />42     {<br />43       <span style="color: #ff00ff;"> CTestDlg dlg;</span><br />44        <span style="color: #ff00ff;">dlg.DoModal();</span><br />45     }<br />46 }</div><br /><span style="font-size: 12pt;">鍐嶅崟鍑誨璇濇涓婄殑鎸夐挳鏃跺彂閫佹柇璦涓柇錛屽叿浣撲綅緗涓嬶細</span><br /><img src="http://www.shnenglu.com/images/cppblog_com/wanghaiguang/domal.jpg" width="788" height="548" alt="" /><br /><br /><div><strong style="font-size: 14pt;">::IsWindow(m_hWnd)<br /><br /></strong></div><div style="clear: both; font-size: 0px; line-height: 0; height: 0px; visibility: visible; font-family: arial, 瀹嬩綋, sans-serif; background-color: #ffffff;"></div><div style="font-family: arial, 瀹嬩綋, sans-serif; line-height: 24px; color: #333333; margin-bottom: 5px; text-indent: 2em;">鍑芥暟鍔熻兘錛氳鍑芥暟紜畾緇欏畾鐨?a target="_blank" style="text-decoration: none; color: #136ec2;">紿楀彛鍙ユ焺</a>鏄惁鏍囪瘑涓涓凡瀛樺湪鐨勭獥鍙c?/div><div style="font-family: arial, 瀹嬩綋, sans-serif; line-height: 24px; color: #333333; margin-bottom: 5px; text-indent: 2em;">鍑芥暟鍘熷瀷錛欱OOL IsWindow錛圚WND hWnd錛夛紱</div><div style="font-family: arial, 瀹嬩綋, sans-serif; line-height: 24px; color: #333333; margin-bottom: 5px; text-indent: 2em;">鍙傛暟錛?/div><div style="font-family: arial, 瀹嬩綋, sans-serif; line-height: 24px; color: #333333; margin-bottom: 5px; text-indent: 2em;">hWnd:琚祴璇曠獥鍙g殑鍙ユ焺銆?/div><div style="font-family: arial, 瀹嬩綋, sans-serif; line-height: 24px; color: #333333; margin-bottom: 5px; text-indent: 2em;">榪斿洖鍊鹼細濡傛灉<a target="_blank" style="text-decoration: none; color: #136ec2;">紿楀彛鍙ユ焺</a>鏍囪瘑浜嗕竴涓凡瀛樺湪鐨勭獥鍙o紝榪斿洖鍊間負闈為浂錛涘鏋滅獥鍙e彞鏌勬湭鏍囪瘑涓涓凡瀛樺湪紿楀彛錛岃繑鍥炲間負闆躲?/div><br /><span style="color: #ff0000; font-size: 12pt;">鍙兘鍘熷洜錛?/span><span style="color: #333333; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 24px; background-color: #f5f5f5; font-size: 12pt;">鍦≒reTranslateMessage閲岀殑鑾峰彇瀵瑰簲m_hWnd錛?/span><span style="font-size: 12pt;">DoModal()妯℃佸璇濇閫鍑哄悗錛?/span><span style="color: #333333; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 24px; background-color: #f5f5f5; font-size: 12pt;">m_hWnd</span><span style="color: #333333; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 24px; background-color: #f5f5f5; font-size: 12pt;">涓嶆槸鏈夋晥鐨勭獥鍙e彞鏌勩?/span><br /><span style="color: #ff0000; font-size: 12pt;">瑙e喅鍔炴硶錛?/span><span style="font-size: 12pt;">澶勭悊瀹?/span><span style="font-size: 12pt;">WM_LBUTTONUP</span><span style="font-size: 12pt;">鍚庯紝</span><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 24px; background-color: #f5f5f5; font-size: 12pt;">闇瑕佽繑鍥濼RUE銆?/span><img src ="http://www.shnenglu.com/wanghaiguang/aggbug/204603.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wanghaiguang/" target="_blank">鐜嬫搗鍏?/a> 2013-12-05 10:58 <a href="http://www.shnenglu.com/wanghaiguang/archive/2013/12/05/204603.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>FTP涓婁紶銆佷笅杞藉強鍏剁浉鍏沖姛鑳界ず渚?/title><link>http://www.shnenglu.com/wanghaiguang/archive/2013/11/19/204327.html</link><dc:creator>鐜嬫搗鍏?/dc:creator><author>鐜嬫搗鍏?/author><pubDate>Tue, 19 Nov 2013 00:54:00 GMT</pubDate><guid>http://www.shnenglu.com/wanghaiguang/archive/2013/11/19/204327.html</guid><wfw:comment>http://www.shnenglu.com/wanghaiguang/comments/204327.html</wfw:comment><comments>http://www.shnenglu.com/wanghaiguang/archive/2013/11/19/204327.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wanghaiguang/comments/commentRss/204327.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wanghaiguang/services/trackbacks/204327.html</trackback:ping><description><![CDATA[<h1><span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900;"><br />FTP</span> Wanderer - <span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900;">FTP</span> Client using WININET<br /><div class="hvzpftn" id="contentdiv" itemprop="articleBody" style="margin: 0px; border: 0px; color: #111111; font-family: 'Segoe UI', Arial, sans-serif; font-size: 14px; font-weight: normal; line-height: normal; background-color: #ffffff;"><ul style="margin: 25px 0px 10px; padding: 0px 0px 0px 40px; border: 0px;"><li style="margin: 0px 0px 6px -40px; padding: 0px 0px 1px 30px; border: 0px; background-image: url(http://s.codeproject.com/images/download24.png); background-attachment: scroll; background-color: transparent; font-weight: bold; list-style-type: none; vertical-align: middle; background-position: 0% 50%; background-repeat: no-repeat no-repeat;"><a style="margin: 0px; padding: 0px; border: 0px; text-decoration: none; color: purple;">Download executable - 105 Kb</a></li><li style="margin: 0px 0px 6px -40px; padding: 0px 0px 1px 30px; border: 0px; background-image: url(http://s.codeproject.com/images/download24.png); background-attachment: scroll; background-color: transparent; font-weight: bold; list-style-type: none; vertical-align: middle; background-position: 0% 50%; background-repeat: no-repeat no-repeat;"><a style="margin: 0px; padding: 0px; border: 0px; text-decoration: none; color: purple;">Download source - 152 Kb</a></li></ul><p><img src="http://www.codeproject.com/KB/IP/ftpwanderer/ftpwanderer.jpg" alt="Sample Image" width="550" height="467" style="margin: 0px; padding: 0px; border: 0px; overflow: auto; max-width: 100%; height: auto;" /></p><h2>Description</h2><p>This article presents a fully functional implementation of a <span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900; font-weight: bold;">FTP</span> client. <span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900; font-weight: bold;">FTP</span> Wanderer is a multithreaded <span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900; font-weight: bold;">FTP</span> client with the look-and-feel of Windows Explorer, and makes moving files between the Internet and your computer as simple as local file manipulation. This application uses WININET API's to handle the <span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900; font-weight: bold;">FTP</span> protocol, and while it's not the most elegant way to connect to a <span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900; font-weight: bold;">FTP</span> server it does the job pretty well.</p><h2><strong>Features list</strong></h2><ul style="margin: 10px 0px; padding: 0px 0px 0px 40px; border: 0px;"><li style="margin: 0px; padding: 0px; border: 0px;">All file transfer requests are handled in the background, so you don't have to wait while files copy to continue browsing the current server. You can even connect to a different server, while file transfers on another server are still in progress.</li><li style="margin: 0px; padding: 0px; border: 0px;">The Transfer Manager shows all file transfers currently in progress plus the ones that are in the queue. You can configure how many transfers are processed simultaneously, so you don't run out of resources.</li><li style="margin: 0px; padding: 0px; border: 0px;"><span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900; font-weight: bold;">FTP</span> Wanderer uses the Windows 9x/NT/XP style list boxes for displaying the contents of remote servers. With all familiar system icons and context menus.</li><li style="margin: 0px; padding: 0px; border: 0px;">You can specify the number of times it should try to connect, and the time delay between connection attempts.</li><li style="margin: 0px; padding: 0px; border: 0px;">Full Drag and Drop support. Simply drag one or more files or even complete folders onto <span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900; font-weight: bold;">FTP</span> Wanderer's file view area to transfer them to the location of the server that is currently connected.</li><li style="margin: 0px; padding: 0px; border: 0px;">Easily configure <span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900; font-weight: bold;">FTP</span> site settings, like username, password, port, initial remote folder, number of retries and default download folder.</li></ul><p>Here's a brief description of some of the important classes of the application:</p><h3>CMainFrame</h3><p>CMainFrame contains most of the code for managing the <span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900; font-weight: bold;">FTP</span> connection. It takes care of connecting to the server; initiate up/downloads and handling other <span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900; font-weight: bold;">FTP</span> related actions.</p><h3>C<span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900;">FTP</span>ListView</h3><p>This is just a <code style="margin: 0px; padding: 0px; border: 0px; color: #990000; font-size: 11pt; font-family: Consolas, 'Courier New', Courier, mono;">CListView</code> derived class that takes care of displaying the files and enabling you to sort them. When the application is busy downloading or sorting a directory listing it can display an animation, just like explorer does.</p><h3>CConnectDlg</h3><p>This class (= Site Manager) enables the user to manage <span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900; font-weight: bold;">FTP</span> sites. You can add/change and delete sites and configure properties such as hostname, port, username and password. The settings of each site are save to disk using serializing.</p><h3>CTransferManagerDlg</h3><p><code style="margin: 0px; padding: 0px; border: 0px; color: #990000; font-size: 11pt; font-family: Consolas, 'Courier New', Courier, mono;">CTransferManagerDlg</code> (= Transfer manager) takes care of queuing the file transfers. It shows all file transfers currently in progress plus the ones that are in the queue. You can configure how many transfers are processed simultaneously, so you don't run out of resources. Each up/download in handled in a separate thread by initiating a<code style="margin: 0px; padding: 0px; border: 0px; color: #990000; font-size: 11pt; font-family: Consolas, 'Courier New', Courier, mono;">CDownloadThread</code> or <code style="margin: 0px; padding: 0px; border: 0px; color: #990000; font-size: 11pt; font-family: Consolas, 'Courier New', Courier, mono;">C<span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900; font-weight: bold;">Upload</span>Thread</code> thread.</p><h3>CDownloadThread</h3><p>Each download is handled in the background using a separate thread. <code style="margin: 0px; padding: 0px; border: 0px; color: #990000; font-size: 11pt; font-family: Consolas, 'Courier New', Courier, mono;">CDownloadThread</code> creates a new connection with the <span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900; font-weight: bold;">FTP</span> server and displays a progress dialog that tells you the status of the file transfer. When the download is completed (or aborted) it notifies the transfer manager so the UI can be updated.</p><h3>C<span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900;">Upload</span>Thread</h3><p>Each <span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900; font-weight: bold;">upload</span> is handled in the background using a separate thread. <code style="margin: 0px; padding: 0px; border: 0px; color: #990000; font-size: 11pt; font-family: Consolas, 'Courier New', Courier, mono;">C<span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900; font-weight: bold;">Upload</span>Thread</code> creates a new connection with the <span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900; font-weight: bold;">FTP</span> server and displays a progress dialog that tells you the status of the file transfer. When the <span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900; font-weight: bold;">upload</span> is completed (or aborted) it notifies the transfer manager so the UI can be updated.</p><h2><strong>To do list:</strong></h2><p>While this application has most of the features you might expect in a <span style="margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: #ff9900; font-weight: bold;">FTP</span> client, there are a few things left to do:</p><ul style="margin: 10px 0px; padding: 0px 0px 0px 40px; border: 0px;"><li style="margin: 0px; padding: 0px; border: 0px;">Drag and drop support out of the file view area to Explorer. I think this one is not that easy, because this would probably 'block' explorer until the file transfer is completed (any suggestions?).</li><li style="margin: 0px; padding: 0px; border: 0px;">Progress indication in the transfer manager. This is not really that hard to do, so this will probably be in the next release.</li><li style="margin: 0px; padding: 0px; border: 0px;">Better asynchrony handling of getting directory listing. The UI now does not respond when downloading a huge directory listing.</li></ul><h2>Contacting the Author</h2>Please send any comments or bug reports to me via <a href="mailto:info@pablovandermeer.nl" style="margin: 0px; padding: 0px; border: 0px; text-decoration: none; color: purple;">email</a>. For any updates to this article, check my site <a style="margin: 0px; padding: 0px; border: 0px; text-decoration: none; color: purple;">here</a>.<h2>Revision history</h2><ul style="margin: 10px 0px; padding: 0px 0px 0px 40px; border: 0px;"><li style="margin: 0px; padding: 0px; border: 0px;">31st July 2002 - Initial revision.</li></ul></div></h1><h2>License</h2><div class="hvzpftn" id="LicenseTerms" style="margin: 0px; border: 0px; color: #111111; font-family: 'Segoe UI', Arial, sans-serif; font-size: 14px; font-weight: normal; line-height: normal; background-color: #ffffff;"><p>This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.</p><p>A list of licenses authors might use can be found <a style="margin: 0px; padding: 0px; border: 0px; text-decoration: none; color: purple;">here<br /><br />鍘熸枃</a>鍦板潃錛?a >http://www.codeproject.com/Articles/2665/FTP-Wanderer-FTP-Client-using-WININET</a></p></div><img src ="http://www.shnenglu.com/wanghaiguang/aggbug/204327.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wanghaiguang/" target="_blank">鐜嬫搗鍏?/a> 2013-11-19 08:54 <a href="http://www.shnenglu.com/wanghaiguang/archive/2013/11/19/204327.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>MFC COMBOX鎺т歡鍙帴鍙楁暟瀛楀拰璁劇疆鏁板瓧鑼冨洿http://www.shnenglu.com/wanghaiguang/archive/2013/09/25/203432.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Wed, 25 Sep 2013 09:39:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2013/09/25/203432.htmlhttp://www.shnenglu.com/wanghaiguang/comments/203432.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2013/09/25/203432.html#Feedback0http://www.shnenglu.com/wanghaiguang/comments/commentRss/203432.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/203432.html鍦∕FC寮鍙戣繃紼嬩腑浣跨敤ComboBox錛屾湁鏃朵細鏍規嵁闇姹傝姹傚彧鑳借緭鍏ユ暟瀛楋紝騫朵笖瑕佹眰鏁板瓧鍦ㄤ竴瀹氱殑鑼冨洿鍐咃紝渚嬪涓涓敤浜庨夋嫨灝忔椂鐨凜omboBox錛屾椂闂磋寖鍥翠負00鍒?3錛岄偅涔堣濡備綍瀹炵幇錛?/span>

浠g爜濡備笅錛?/span>

鍦―ialog.h涓細 
…… 
CComboBox m_cbHour;// 澹版槑CComboBox綾誨瀷浣滀負CDialog綾葷殑鎴愬憳鍙橀噺 
…… 
afx_msg void OnCbnEditchangeCbHour(); 
afx_msg void OnCbnEditupdateCbHour();

鍦―ialog.cpp涓細 
…… 
DDX_Control(pDX, IDC_CB_HOUR, m_cbHour);// 鏁版嵁浜ゆ崲 
…… 
ON_CBN_EDITCHANGE(IDC_CB_HOUR, &CDialog::OnCbnEditchangeCbHour)//娣誨姞娑堟伅鏄犲皠錛岀敤浜嶤ComboBox鍐呭鏀瑰彉涓?nbsp;
ON_CBN_EDITUPDATE(IDC_CB_HOUR, &CCDialog::OnCbnEditupdateCbHour)//娣誨姞娑堟伅鏄犲皠錛岀敤浜嶤ComboBox鍐呭鏇存柊 
…… 
涓嬮潰鏉ュ叿浣撳疄鐜板嚱鏁幫細 
image 
寰幆閬嶅巻CComboBox涓凡緇忚緭鍏ョ殑瀛楃濡傛灉鍙戠幇鍚湁闈炴暟瀛楀垯錛岀疆涓?#8220;00”錛屼嬌鐢ㄥ驚鐜殑鐩殑鏄負浜嗛槻姝㈢敤鎴瘋煩鐫杈擄紙澶ф鍙湁嫻嬭瘯浜哄憳鎵嶄細璺崇潃杈擄級銆?br />
灝唂or寰幆鏀逛負for (int i = 0; i < (strTmp.GetLength()); i++)閬囧埌闈炴暟瀛楀瓧絎﹀氨璁劇疆涓?0錛?/span>

image 
褰揅ComboBox鏇存柊鏁版嵁鏃跺垽鏂暟瀛楄寖鍥達紝濡傛灉瓚呰繃杈圭晫錛屽垯璁劇疆鍊間負鏈榪戣竟鐣屽鹼紝鑷蟲涓涓彧鎺ュ彈鍙帶鑼冨洿鏁板瓧鐨凜ComboBox灝卞畬鎴愪簡錛屼絾鏄湪WinCE寮鍙戜腑鍗存湁涓涓棶棰橈紝灝辨槸鎵鏈夌殑姹夊瓧閮借緭涓嶈繘鍘伙紝浣嗘槸“澶?#8221;榪欎釜姹夊瓧鍗磋兘杈撳叆錛屼笉鐭ラ亾榪欐槸涓嶆槸涓涓狟UG錛屽鏋滃湪浠g爜涓“澶?#8221;鍋氱壒鍒垽鏂紝閭h繖孌電▼搴忎篃澶鎬簡錛?br />
鏈枃杞嚜錛?/span>http://blog.csdn.net/wyunteng/article/details/6370882



]]>
MFC瑙e喅璁劇疆鎺т歡鍐呭 鏂囧瓧閲嶅彔闂http://www.shnenglu.com/wanghaiguang/archive/2013/09/24/203402.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Tue, 24 Sep 2013 02:31:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2013/09/24/203402.htmlhttp://www.shnenglu.com/wanghaiguang/comments/203402.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2013/09/24/203402.html#Feedback0http://www.shnenglu.com/wanghaiguang/comments/commentRss/203402.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/203402.html鍦ㄧ敤SetWindowText璁劇疆鎺т歡鍐呭鏃訛紝鏈夋椂鍊欎細鍑哄瓧浣撻噸鍙犻棶棰橈紝璋冪敤嬈℃暟瓚婂錛岄噸鍙犺秺涓ラ噸銆備互涓嬩負瑙e喅鏂規硶銆?br />
鏂規硶涓錛?/span>RedrawWindow()
1 GetDlgItem(IDC_STATIC)->SetWindowText("your string");   
2 GetDlgItem(IDC_STATIC)->GetParent()->RedrawWindow(); 

緙虹偣錛?/span>紿楀彛鍒鋒柊澶綣侊紝涓闂竴闂紝鏁堟灉涓嶅お濂姐?br />
鏂規硶浜岋細灞閮ㄥ埛鏂?/span>
1 void YourDlg::RefreshControl(UINT uCtlID)   
2 {      
3     CRect   rc;      
4     GetDlgItem(uCtlID)->GetWindowRect(&rc);    
5     ScreenToClient(&rc);      
6     InvalidateRect(rc);      
7 }     

鏂規硶涓夛細闅愯棌鍜屾樉紺?/span>
1 GetDlgItem(IDC_STATIC)->ShowWindow(SW_HIDE);
2 GetDlgItem(IDC_STATIC)->ShowWindow(SW_SHOW);



]]>
鍒ゆ柇鏂囦歡CFile宸茬粡鎵撳紑http://www.shnenglu.com/wanghaiguang/archive/2013/09/23/203381.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Mon, 23 Sep 2013 08:46:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2013/09/23/203381.htmlhttp://www.shnenglu.com/wanghaiguang/comments/203381.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2013/09/23/203381.html#Feedback0http://www.shnenglu.com/wanghaiguang/comments/commentRss/203381.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/203381.html

CFile綾葷殑鎴愬憳鍙橀噺錛?/span>

m_hFile錛氳〃紺轟竴涓墦寮鏂囦歡鐨勬搷浣滅郴緇熸枃浠跺彞鏌勩傞氳繃瀵?/span>m_hFile 涓?/span> CFile::hFileNull鐨勬瘮杈冩潵鍒ゆ柇璇ユ枃浠舵槸鍚﹀凡緇忔墦寮銆?br />
紺轟緥浠g爜錛?br />

 1     CString strFilename = _T("D:\\澶у璇枃.docx");
 2     CFile file;
 3     file.Open(strFilename,CFile::modeReadWrite);//
 4     
 6     if (file.m_hFile != CFile::hFileNull)
 7     {
 8         file.Close();
 9     }
10     else
11     {
12         printf("File Already Close \n");
13     }

鏂規硶浜岋細

鍒╃敤file.GetFileName().IsEmpty()鏉ュ垽鏂?br />

紺轟緥浠g爜錛?/span>

 1     CString strFilename = _T("D:\\澶у璇枃.docx");
 2     CFile file;
 3     file.Open(strFilename,CFile::modeReadWrite);//
 4     
 5     if (!file.GetFileName().IsEmpty())
 6     {
 7         file.Close();
 8     }
 9     else
10     {
11         printf("File Already Close \n");
12     }

鏂規硶涓夛細

閫氳繃璁劇疆鎴愬憳鍙橀噺鏉ヨ褰曟枃浠舵槸鍚﹁鎵撳紑銆傚BOOL bIsFileOpen;榛樿鏄?/span>FALSE,

鎵撳紑鎴愬姛錛屾妸瀹冪疆涓?/span>TRUE;鍚﹀垯緗負FALSE;

鐒跺悗鍦ㄧ▼搴忛噷闈㈠垽鏂氨鍙互浜嗐傚叧闂悗緗?/span>bIsFileOpen涓?/span>FALSE,

 



]]>
MFC 瑙e喅榛樿鍥炶濺鎴朎SC浼氬叧闂璇濇鐨勫姙娉?/title><link>http://www.shnenglu.com/wanghaiguang/archive/2013/09/13/203208.html</link><dc:creator>鐜嬫搗鍏?/dc:creator><author>鐜嬫搗鍏?/author><pubDate>Fri, 13 Sep 2013 00:31:00 GMT</pubDate><guid>http://www.shnenglu.com/wanghaiguang/archive/2013/09/13/203208.html</guid><wfw:comment>http://www.shnenglu.com/wanghaiguang/comments/203208.html</wfw:comment><comments>http://www.shnenglu.com/wanghaiguang/archive/2013/09/13/203208.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wanghaiguang/comments/commentRss/203208.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wanghaiguang/services/trackbacks/203208.html</trackback:ping><description><![CDATA[<span style="font-family: 瀹嬩綋; line-height: 25px; background-color: #ffffff; font-size: 12pt;">涓縐嶆柟娉曪細瑙e喅鏂規硶鏄湪CDialog::PreTranslateMessage() 鐨勯噸杞藉嚱鏁頒腑灝咵SC鍜屽洖杞︽寜閿殑娑堟伅澶勭悊鎺?<br /></span><span style="font-family: 瀹嬩綋; line-height: 25px; background-color: #ffffff;"><br /></span><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->BOOL CYourDlg::PreTranslateMessage(MSG* pMsg)   <br />{  <br />    <span style="color: #0000FF; ">if</span>(pMsg->message==WM_KEYDOWN&&pMsg->wParam==VK_RETURN)     <br />        <span style="color: #0000FF; ">return</span> TRUE;  <br />    <span style="color: #0000FF; ">if</span>(pMsg->message==WM_KEYDOWN&&pMsg->wParam==VK_ESCAPE)     <br />        <span style="color: #0000FF; ">return</span> TRUE;  <br />    <span style="color: #0000FF; ">return</span> CDialog::PreTranslateMessage(pMsg);  <br />}  </div><br /><span style="font-size: 12pt;">鍙︿竴縐嶆柟娉曪細</span><span style="color: #333333; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 24px; background-color: #f5f5f5; font-size: 12pt;">涓寮濮嬬殑cancel鎸夋壄涓嶈鍘繪帀錛屽弻鍑誨畠榪涘叆鍛戒護OnCancel(), 鎶奜nCancel()鍘繪帀</span><br style="color: #333333; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 24px; background-color: #f5f5f5;" /><span style="color: #333333; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 24px; background-color: #f5f5f5; font-size: 12pt;">鐩存帴榪斿洖錛岃繖灝辨病闂浜?/span><br style="color: #333333; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 24px; background-color: #f5f5f5;" /><br style="color: #333333; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 24px; background-color: #f5f5f5;" /><span style="color: #333333; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 24px; background-color: #f5f5f5; font-size: 12pt;">濡傛灉浣犲凡緇忔妸鎸夐挳鍒犳帀錛岄偅灝卞緱鎵嬪伐鍔犺繖涓懡浠わ紝浣嗘晥鏋滀竴鏍?/span><br style="color: #333333; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 24px; background-color: #f5f5f5;" /><img src ="http://www.shnenglu.com/wanghaiguang/aggbug/203208.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wanghaiguang/" target="_blank">鐜嬫搗鍏?/a> 2013-09-13 08:31 <a href="http://www.shnenglu.com/wanghaiguang/archive/2013/09/13/203208.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>MFC鑾峰彇緋葷粺褰撳墠鏃墮棿http://www.shnenglu.com/wanghaiguang/archive/2013/08/22/202704.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Thu, 22 Aug 2013 09:36:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2013/08/22/202704.htmlhttp://www.shnenglu.com/wanghaiguang/comments/202704.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2013/08/22/202704.html#Feedback0http://www.shnenglu.com/wanghaiguang/comments/commentRss/202704.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/202704.html1.浣跨敤CTime綾?銆銆

CString str; //鑾峰彇緋葷粺鏃墮棿 銆銆

CTime tm; tm=CTime::GetCurrentTime(); 銆銆

str=tm.Format("鐜板湪鏃墮棿鏄?Y騫?m鏈?d鏃?%X");

MessageBox(str,NULL,MB_OK); 2: 寰楀埌緋葷粺鏃墮棿鏃ユ湡(浣跨敤GetLocalTime) 銆銆

SYSTEMTIME st; 銆銆

CString strDate,strTime; 銆銆

GetLocalTime(&st); 銆銆

strDate.Format("%4d-%2d-%2d",st.wYear,st.wMonth,st.wDay); 銆銆

strTime.Format("%2d:%2d:%2d",st.wHour,st.wMinute,st.wSecond);

 

3.浣跨敤GetTickCount//鑾峰彇紼嬪簭榪愯鏃墮棿 銆銆

long t1=GetTickCount();//紼嬪簭孌靛紑濮嬪墠鍙栧緱緋葷粺榪愯鏃墮棿(ms) 銆銆

Sleep(500); long t2=GetTickCount();//紼嬪簭孌電粨鏉熷悗鍙栧緱緋葷粺榪愯鏃墮棿(ms) 銆銆

str.Format("time:%dms",t2-t1);//鍓嶅悗涔嬪樊鍗?紼嬪簭榪愯鏃墮棿 銆銆

AfxMessageBox(str);//鑾峰彇緋葷粺榪愯鏃墮棿 銆銆

long t=GetTickCount(); 銆銆

CString str,str1; 銆銆

str1.Format("緋葷粺宸茶繍琛?%d鏃?,t/3600000); 銆銆

str=str1; t%=3600000; 銆銆

str1.Format("%d鍒?,t/60000); 銆銆

str+=str1; t%=60000; 銆銆

str1.Format("%d縐?,t/1000); 銆銆

str+=str1; AfxMessageBox(str);

鏈枃杞嚜錛?a style="font-family: verdana, 'courier new'; line-height: 21px;">http://www.cnblogs.com/bigbigtree/archive/2011/12/02/2272066.html



]]>
Word銆丷ichEdit鏂囨湰杞琑TF鏂囦歡錛孯TF鏂囦歡杞琀TMLhttp://www.shnenglu.com/wanghaiguang/archive/2013/08/21/202684.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Wed, 21 Aug 2013 00:53:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2013/08/21/202684.htmlhttp://www.shnenglu.com/wanghaiguang/comments/202684.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2013/08/21/202684.html#Feedback1http://www.shnenglu.com/wanghaiguang/comments/commentRss/202684.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/202684.html1銆丷ichEdit鏂囨湰杞琑TF鏂囦歡


static DWORD CALLBACK MyStreamOutCallback(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
{
    CFile* pFile = (CFile*) dwCookie;
    pFile->Write(pbBuff, cb);
    *pcb = cb;
    return 0;
}

void CKTLXFunction::OnBnClickedIssuePaper()
{
    // TODO: Add your control notification handler code here
    CString sText;
    m_richEdit.GetWindowText(sText);
    if (sText.IsEmpty() && m_sImportPaperPath.IsEmpty())
    {
        AfxMessageBox("鍐呭涓虹┖");
        return;
    }

    CString sImportRtfPath = CCommonFun::GetExecutablePath() + "temp.rtf";
    if (CFileFind().FindFile(sImportRtfPath))
    {
        ::DeleteFile(sImportRtfPath);
    }

    CFile cFile(TEXT(sImportRtfPath), CFile::modeCreate|CFile::modeWrite);
    EDITSTREAM es;
    es.dwCookie = (DWORD) &cFile; //璁劇疆鐢ㄤ緥鍙傛暟,浠ヤ究鍥炶皟鍑芥暟璋冪敤
    es.pfnCallback = MyStreamOutCallback;
    m_richEdit.StreamOut(SF_RTF, es);
}

2銆亀ord鏂囨湰杞琑TF鏂囦歡

    CString  m_sImportRtfPath = CCommonFun::GetExecutablePath() + "temp.rtf";
    if (CFileFind().FindFile(m_sImportRtfPath))
    {
        ::DeleteFile(m_sImportRtfPath);
    }

    _Application WordApp;
    CoInitialize(NULL);
    if(!WordApp.CreateDispatch("Word.Application",NULL))
    {
        LOG("鍒涘緩Word鏈嶅姟澶辮觸!");
        exit(1);
        return FALSE;
    }
    WordApp.SetVisible(FALSE);

    COleVariant vTrue((short)TRUE),vFalse((short)FALSE),vOpt((long)DISP_E_PARAMNOTFOUND, VT_ERROR);

    Documents docs=WordApp.GetDocuments();
    docs.Open(COleVariant("word鏂囦歡璺緞"), vFalse, vFalse, vFalse, COleVariant(""), 
              COleVariant(""), vFalse, COleVariant(""), COleVariant(""),
              COleVariant((short)0),COleVariant("UTF-8") ,vTrue, vFalse, 
              COleVariant((short)0), vFalse, COleVariant(""));

    _Document active_doc; 
    active_doc = WordApp.GetActiveDocument();

    active_doc.SaveAs(COleVariant(m_sImportRtfPath), COleVariant((short)wdFormatRTF), vFalse, 
              COleVariant(""),vFalse, COleVariant(""), vFalse, vTrue, vFalse, vFalse,
              vFalse,COleVariant("936"), vFalse, vFalse, COleVariant((short)0), vFalse);

    WordApp.Quit(vOpt, vOpt, vOpt);
    active_doc.ReleaseDispatch();
    docs.ReleaseDispatch();
  WordApp.ReleaseDispatch(); //閲婃斁瀵硅薄鎸囬拡銆傚垏璁幫紝蹇呴』璋冪敤

3銆丷TF鏂囦歡杞琱tml鏂囦歡

    // 淇濆瓨html鏂囦歡 [8/12/2013 dell]
    _Application WordApp;
    CoInitialize(NULL);
    if(!WordApp.CreateDispatch("Word.Application",NULL))
    {
        //AfxMessageBox("鍒涘緩Word鏈嶅姟澶辮觸!");
        exit(1);
        return FALSE;
    }
    WordApp.SetVisible(FALSE);

    COleVariant vTrue((short)TRUE),vFalse((short)FALSE),vOpt((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
    CString  m_sImportRtfPath = CCommonFun::GetExecutablePath() + "temp.rtf";
    if (!CFileFind().FindFile(m_sImportRtfPath))
    {
        LOG("杞崲html鏂囦歡澶辮觸錛屾病鏈夋壘鍒皉tf鏂囦歡 錛?nbsp;%s", m_sImportRtfPath);
        return FALSE;
    }
    Documents docs=WordApp.GetDocuments();
    docs.Open(COleVariant(m_sImportRtfPath),
        vFalse,vFalse,vFalse,COleVariant(""),COleVariant(""),
        vFalse,COleVariant(""),COleVariant(""),
        COleVariant((short)0),COleVariant("UTF-8")
        ,vTrue,vFalse,COleVariant((short)0),vFalse,
        COleVariant(""));

    _Document active_doc; 
    active_doc = WordApp.GetActiveDocument();

    active_doc.SaveAs(COleVariant("淇濆瓨html鏂囦歡璺緞"), 
        COleVariant((short)wdFormatHTML),
        vFalse, COleVariant(""),vFalse, COleVariant(""),
        vFalse,vTrue,vFalse,vFalse,vFalse,COleVariant("936"),//COleVariant(L"UTF-8")
        vFalse,vFalse,COleVariant((short)0),vFalse);

    WordApp.Quit(vOpt, vOpt, vOpt);
    active_doc.ReleaseDispatch();
    docs.ReleaseDispatch();
    WordApp.ReleaseDispatch(); //閲婃斁瀵硅薄鎸囬拡銆傚垏璁幫紝蹇呴』璋冪敤


鐜嬫搗鍏?/a> 2013-08-21 08:53 鍙戣〃璇勮
]]>Richedit浣跨敤澶у叏http://www.shnenglu.com/wanghaiguang/archive/2013/08/21/202683.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Wed, 21 Aug 2013 00:42:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2013/08/21/202683.htmlhttp://www.shnenglu.com/wanghaiguang/comments/202683.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2013/08/21/202683.html#Feedback0http://www.shnenglu.com/wanghaiguang/comments/commentRss/202683.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/202683.html闃呰鍏ㄦ枃

]]>
MFC璁劇疆鎺т歡鑳屾櫙閫忔槑http://www.shnenglu.com/wanghaiguang/archive/2013/08/18/202616.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Sun, 18 Aug 2013 08:54:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2013/08/18/202616.htmlhttp://www.shnenglu.com/wanghaiguang/comments/202616.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2013/08/18/202616.html#Feedback0http://www.shnenglu.com/wanghaiguang/comments/commentRss/202616.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/202616.html娣誨姞娑堟伅鍝嶅簲WM_CTLCOLOR錛?br />Static浠g爜濡備笅錛?/p>

HBRUSH CTest1Dlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) 
{
HBRUSH hbr 
= CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
CFont m_font;   //澹版槑鍙橀噺
m_font.CreatePointFont(600,"鍗庢枃琛屾シ"); //璁劇疆瀛椾綋澶у皬鍜岀被鍨?/span>
if(pWnd->GetDlgCtrlID()==IDC_STATIC01)//鍙互鐢?/span>CTLCOLOR_STATIC琛ㄧず闈欐佹帶浠?/span>
{
   pDC
->SelectObject(&m_font);       //璁劇疆瀛椾綋 
   pDC->SetTextColor(RGB(0,0,255)); //璁劇疆瀛椾綋棰滆壊
   pDC->SetBkMode(TRANSPARENT);      //灞炴ц緗負閫忔槑
   return (HBRUSH)::GetStockObject(NULL_BRUSH); //涓嶈繑鍥炵敾鍒?/span>
}
// TODO: Return a different brush if the default is not desired
return hbr;
}

Radio鍜孋heck浠g爜濡備笅
HBRUSH CLoginDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
    //HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
    HBRUSH hbr = ::CreateSolidBrush(#f9f9f9);

    // TODO:  Change any attributes of the DC here

    if (pWnd->GetDlgCtrlID() == IDC_RADIO_REALNAME  ||
        pWnd->GetDlgCtrlID() == IDC_RADIO_ANONYMOUS ||
        pWnd->GetDlgCtrlID() == IDC_CHECK_SELFSELECT)
    {
        pDC->SetBkMode(TRANSPARENT);

        CRect rc;
        pWnd->GetWindowRect(&rc);
        ScreenToClient(&rc);

        CDC* dc = GetDC();
        pDC->BitBlt(0,0,rc.Width(),rc.Height(),dc,rc.left,rc.top,SRCCOPY);    //鎶婄埗紿楀彛鑳屾櫙鍏堢敾鍒版寜閽笂
        ReleaseDC(dc);

        hbr = (HBRUSH) ::GetStockObject(NULL_BRUSH);
    }
}

 



]]>
VS2008涓璬ocsingl.cpp鏂囦歡涓殑ENSURE(strDocName.LoadString(AFX_IDS_UNTITLED))閿欒 http://www.shnenglu.com/wanghaiguang/archive/2013/08/12/202499.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Mon, 12 Aug 2013 09:41:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2013/08/12/202499.htmlhttp://www.shnenglu.com/wanghaiguang/comments/202499.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2013/08/12/202499.html#Feedback0http://www.shnenglu.com/wanghaiguang/comments/commentRss/202499.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/202499.htmlMFC紼嬪簭vs2008緙栬瘧閫氳繃錛岃繍琛屾椂鍑洪敊錛屾棤娉曟墦寮錛屾彁紺篺:\dd\xxxx鐨刣ocsingl.cpp涓殑210琛岋紝鎵懼埌浠ヤ笅浠g爜錛?/span>
void CSingleDocTemplate::SetDefaultTitle(CDocument* pDocument)
{
        CString strDocName;
        if (!GetDocString(strDocName, CDocTemplate::docName) ||
             strDocName.IsEmpty())
        {
                // use generic 'untitled'
                ENSURE(strDocName.LoadString(AFX_IDS_UNTITLED));
        }
     pDocument->SetTitle(strDocName);
}

綰㈣壊琛屽氨鏄嚭閿欏湴鏂癸紝鍘熷洜鏄祫婧愭枃浠跺紩璧鳳紝涓鑸槸浠庤嫳鏂囨垨鍏跺畠璇█鏀規垚綆浣撲腑鏂囪岄犳垚錛屾妸璇█鐩稿叧鏀逛負浠ヤ笅鍑犺
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
#ifdef _WIN32
LANGUAGE 4, 2
#pragma code_page(936)
#endif //_WIN32


]]>
MFC鍒ゆ柇綰跨▼鏄惁瀛樺湪http://www.shnenglu.com/wanghaiguang/archive/2013/07/31/202258.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Wed, 31 Jul 2013 03:37:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2013/07/31/202258.htmlhttp://www.shnenglu.com/wanghaiguang/comments/202258.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2013/07/31/202258.html#Feedback0http://www.shnenglu.com/wanghaiguang/comments/commentRss/202258.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/202258.htmlGetExitCodeThread鍑芥暟鏄幏寰楃嚎紼嬬殑閫鍑虹爜錛?/span> 

鍑芥暟錛?/span> GetExitCodeThread()

鍔熻兘錛氳幏鍙栦竴涓粨鏉熺嚎紼嬬殑榪斿洖鍊?/span>

鍑芥暟鍘熷艦錛?/span> BOOL GetExitCodeThread( HANDLE hThread, LPDWORD lpExitCode);

鍙傛暟錛?/span> hThread 鎸囧悜嬈茶幏鍙栬繑鍥炲肩殑綰跨▼瀵硅薄鐨勫彞鏌?/span>

               lpExitCode 鐢ㄤ簬瀛樺偍綰跨▼鐨勮繑鍥炲?/span>

榪斿洖鍊鹼細鍑芥暟鎵ц鎴愬姛鍒欒繑鍥為潪0鍊鹼紝鍚﹀垯榪斿洖 0錛?/span>FALSE錛?/span>

絎竴涓弬鏁版槸綰跨▼鍙ユ焺錛岀敤 CreateThread 鍒涘緩綰跨▼鏃惰幏寰楀埌銆?/span>

絎簩涓弬鏁版槸涓涓?/span> DWORD鐨勬寚閽堬紝鐢ㄦ埛搴旇浣跨敤涓涓?/span> DWORD 綾誨瀷鐨勫彉閲忓幓鎺ユ敹鏁版嵁錛岃繑鍥炵殑鏁版嵁鏄嚎紼嬬殑閫鍑虹爜錛?/span>
閫氳繃綰跨▼閫鍑虹爜鍙互鍒ゆ柇綰跨▼鏄惁姝e湪榪愯錛岃繕鏄凡緇忛鍑恒傛垨鑰呭彲浠ュ垽鏂嚎紼嬫槸鍚︽槸姝e父閫鍑鴻繕鏄紓甯擱鍑恒?/span>

鎵ц鎴愬姛鏃訛紝瀛樻斁綰跨▼鐨勭姸鎬佺爜錛屽鏋滄槸綰跨▼鐨勮繑鍥炲鹼紝琛ㄧず綰跨▼鎵ц瀹岋紝  濡傛灉綰跨▼娌℃墽琛屽畬錛岃繑鍥?/span>STILL_ACTIVE,濡傛灉綰跨▼鐨勮繑鍥炲煎氨鏄?/span>STILL_ACTIVE錛屽氨鏃犳硶鍒ゆ柇  .


MSDN瑙i噴:

GetExitCodeThread Function

Retrieves the termination status of the specified thread.

 

BOOL WINAPI GetExitCodeThread(   __in           HANDLE hThread,    __out         LPDWORD lpExitCode ); 

Parameters

hThread

A handle to the thread.

The handle must have the THREAD_QUERY_INFORMATION access right. For more information, see Thread Security and Access Rights.

lpExitCode

A pointer to a variable to receive the thread termination status. If the specified thread has not terminated and the function succeeds, the termination status returned is STILL_ACTIVE.

Return Value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

If the thread has terminated and the function succeeds, the termination status returned may be one of the following:

 

  • The exit value specified in the ExitThread or TerminateThread function.
  • The return value from the thread function.
  • The exit value of the thread's process.

Warning  If a thread happens to return STILL_ACTIVE (259) as an error code, applications that test for this value could end up in an infinite loop.


鍙傝冧緥瀛愶細
 1 int main()     
 2 {         
 3     DWORD exitCode1 = 0;     
 4     DWORD exitCode2 = 0;     
 5     DWORD threadId;          
 6   
 7     HANDLE hThrd1 = CreateThread(NULL, 0,   ThreadFunc1, 0, 0, &threadId );  
 9     if (hThrd1)     
10         printf("Thread 1 launched\n");    
11 
13     HANDLE hThrd2 = CreateThread(NULL, 0,  ThreadFunc2, 0, 0, &threadId );     
14     if (hThrd2)     
15         printf("Thread 2 launched\n");    
16 
18     for (;;)      
19     {   
20           printf("Press any key to exit..\n");   
21           getch();   
22           GetExitCodeThread(hThrd1, &exitCode1);   
23           GetExitCodeThread(hThrd2, &exitCode2);   
24           if ( exitCode1 == STILL_ACTIVE )   
25               puts("Thread 1 is still running!");   
26   
27           if ( exitCode2 == STILL_ACTIVE )   
28               puts("Thread 2 is still running!");   
29           if ( exitCode1 != STILL_ACTIVE   && exitCode2 != STILL_ACTIVE )   
30               break;   
31     }   
32   
33     CloseHandle(hThrd1);   
34     CloseHandle(hThrd2);   
35    
36     printf("Thread 1 returned %d\n", exitCode1);   
37     printf("Thread 2 returned %d\n", exitCode2);   
38     return EXIT_SUCCESS;     
39 }    
40   
41 DWORD WINAPI ThreadFunc1(LPVOID n)   
42 {   
43      Sleep((DWORD)n*1000*2);   
44      return (DWORD)n * 10;   
45 } 
46 
48 DWORD WINAPI ThreadFunc2(LPVOID n)   
49 {   
50      Sleep((DWORD)n*1000*2);   
51      return (DWORD)n * 10;   
52 } 


]]>
MFC瀹炵幇鐨?picture control 綾伙紝瀵硅瘽妗嗕笂鏄劇ず鍥劇墖http://www.shnenglu.com/wanghaiguang/archive/2013/07/22/202033.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Mon, 22 Jul 2013 10:09:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2013/07/22/202033.htmlhttp://www.shnenglu.com/wanghaiguang/comments/202033.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2013/07/22/202033.html#Feedback0http://www.shnenglu.com/wanghaiguang/comments/commentRss/202033.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/202033.html

浠ヤ笂鏄簮鐮佸強婕旂ず紼嬪簭涓嬭澆鍦板潃

錛堟枃绔犲師鍦板潃 http://www.codeproject.com/Articles/24969/An-MFC-picture-control-to-dynamically-show-picture錛?/h2>

Introduction 浠嬬粛

榪欑瘒鏂囩珷鎻忚堪鐨勬槸涓涓彲浠ョ敤浜庡湪瀵硅瘽妗嗕笂鏄劇ず鍚勭涓繪祦綾誨瀷鍥劇墖 (濡?BMP, GIF, JPEG...) 鐨?/span>MFC鎺т歡

Background 鑳屾櫙

鎴戣姳浜嗕竴浜涙椂闂村幓鎼滅儲鍙互鐢ㄤ簬鏄劇ず鍥劇墖鐨凪FC鎺т歡, 浣嗗嵈娌℃湁鍙戠幇鍚堥傜殑銆?鎵浠ユ垜鍐沖畾鑷繁鍋氫竴涓交閲忕駭錛岀伒媧誨害楂樼殑鍥劇墖鎺т歡錛圥icture control錛夊幓鏄劇ず鍚勭綾誨瀷鐨勫浘鐗囥?/p>

Using the code 濡備綍浣跨敤

榪欎釜鎺т歡鍐呴儴浣跨敤鐨勬槸GDI+搴擄紝鎵浠ヨ鍦ㄤ嬌鐢ㄦ椂鎶奊diPlus.lib鍔犲叆鍒頒綘鐨勫伐紼嬩腑錛坕nclude libraries錛夈?/span>

浣跨敤榪欎釜鎺т歡鏃訛紝鍏堢敤VC++瀵硅瘽妗嗚璁″櫒鍒涘緩涓涓潤鎬佹枃瀛楁帶浠訛紙static text control錛?/span> 銆備箣鍚庣敤MFC鍚戝涓鴻繖涓帶浠跺垎閰嶄竴涓帶浠跺彉閲忥紝綾誨瀷瀹氫箟涓篊PictureCtrl銆?/p>

鐜板湪浣犲彲浠ョ敤浣犵殑鎺т歡瑁呰澆鏄劇ず鍥劇墖浜嗭紝浣犲彧闇瑕佸湪榪欏嚑涓?code style="color: #990000; font-family: 'Courier New', Courier, mono; font-size: 11pt;">CPictureCtrl::LoadFrom... 鍑芥暟錛?閫夋嫨鍚堥備綘闇瑕佺殑鐨勮繘琛岃皟鐢ㄣ傝杞藉悗鎺т歡浼氳嚜鍔ㄦ洿鏂板茍鏄劇ず鍥劇墖銆?/p>

瑕佹竻闄ゆ帀鎺т歡涓樉紺虹殑鍥劇墖錛岃皟鐢?code style="color: #990000; font-family: 'Courier New', Courier, mono; font-size: 11pt;">CPictureCtrl::FreeImage鍗沖彲銆?/p>

浣犵殑鍥劇墖浼氳鑷姩璋冩暣鍒版帶浠剁殑澶у皬錛岃繖鍙兘浼氭敼鍙樺浘鐗囧師鍏堢殑闀垮姣斾緥銆?/p>

 Collapse | Copy Code
class CPictureCtrl :     
public CStatic
{
public:
   //Constructor
   CPictureCtrl(void);
   //Destructor
   ~CPictureCtrl(void);

public:
   //Loads an image from a file
   BOOL LoadFromFile(CString &szFilePath);
   //Loads an image from an IStream interface
   BOOL LoadFromStream(IStream* piStream);
   //Loads an image from a byte stream;
   BOOL LoadFromStream(BYTE* pData, size_t nSize);
   //Loads an image from a Resource
   // BOOL LoadFromResource(HMODULE hModule, LPCTSTR lpName, LPCTSTR lpType);
   //Overload - Single load function
   BOOL Load(CString &szFilePath);
   BOOL Load(IStream* piStream);
   BOOL Load(BYTE* pData, size_t nSize);
   // BOOL Load(HMODULE hModule, LPCTSTR lpName, LPCTSTR lpType);
   //Frees the image data
   void FreeData();

protected:
   virtual void PreSubclassWindow();
   //Draws the Control
   virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
   virtual BOOL OnEraseBkgnd(CDC* pDC);

private:
   //Internal image stream buffer
   IStream* m_pStream;
   //Control flag if a pic is loaded
   BOOL m_bIsPicLoaded;
   //GDI Plus Token
   ULONG_PTR m_gdiplusToken; };

Points of interest

榪欎釜鎺т歡鏄熀浜?nbsp;CStatic control 璁捐鐨勶紙鍩虹被浣跨敤鐨勬槸CStatic錛?/span>銆傛墍浠ヤ綘鍙互浣跨敤CStatic control鐨勫悇縐嶅姛鑳?/span>錛屼絾瀹冨茍涓嶄細鏄劇ず浠諱綍鏂囧瓧銆傚GDI+搴撶殑浣跨敤浣垮叾鍙互鏀寔鍚勭涓繪祦綾誨瀷鐨勫浘鐗囥?/span>

History 鍘嗗彶

  • 1.0 - Initial release.
  • 1.1 - A bug when drawing the control without a loaded image was corrected.
  • 1.2 - A bug when drawing the control was corrected.

    Loading an image from a resource is disabled due to problems recognizing it correctly as an image.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

TEiseler

Tester / Quality Assurance

Germany Germany

Member
 

鏈枃杞嚜錛?a style="font-family: verdana, 'courier new'; line-height: 21px;">http://blog.csdn.net/cashey1991/article/details/7516996

]]>
鍔ㄦ佸垱寤鴻鍥炬椂鍊?AfxCheckDialogTemplate鎵ц鍑洪敊http://www.shnenglu.com/wanghaiguang/archive/2013/05/31/200722.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Fri, 31 May 2013 09:02:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2013/05/31/200722.htmlhttp://www.shnenglu.com/wanghaiguang/comments/200722.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2013/05/31/200722.html#Feedback0http://www.shnenglu.com/wanghaiguang/comments/commentRss/200722.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/200722.html

鍔ㄦ佸垱寤鴻鍥炬椂鍊?/span> AfxCheckDialogTemplate鎵ц鍑洪敊

鍦?/span>mfc鐨?/span>sdi鏋舵瀯涓紝鍑嗗澶氬仛鍑犱釜瑙嗗浘錛岃瘯鍥劇被緇ф壙鑷?/span>formview錛屼絾鍦ㄥ姩鎬佸垱寤鴻鍥劇殑鏃跺欏嚭浜嗛敊璇紝AfxCheckDialogTemplate鎵ц鍑洪敊銆傚悗鏉ラ氳繃鎼滅儲鍙戠幇cformview綾誨叧鑱斿璇濇鏃跺欙紝璧勬簮蹇呴』鍏峰child灞炴с?/span>

1.CFormView綾誨叧鑱旂殑瀵硅瘽妗嗚祫婧愬繀欏誨叿鏈?/span>Child灞炴с?/span>

鐢?/span>CFormView媧劇敓鐨勭被錛屽彲浠ュ叧鑱斾竴涓璇濇璧勬簮銆備絾璇ュ璇濇璧勬簮蹇呴』鍦ㄥ睘鎬ц瀹氫腑Style閫夊畾[Child]灞炴э紝鍚﹀垯鐨勮瘽錛?/span>
浠g爜鍙互緙栬瘧錛屼絾Debug榪愯浼氭姤鍛婁竴涓柇璦閿欒錛岃窡韙唬鐮侊紝鏂█鍦細

#ifdef _DEBUG

    // dialog template must exist and be invisible with WS_CHILD set
    if (!_AfxCheckDialogTemplate(m_lpszTemplateName, TRUE))
    {
        ASSERT(FALSE);          // invalid dialog template name
        PostNcDestroy();        // cleanup if Create fails too soon
        return FALSE;
    }

#endif //_DEBUG

2.CFormView姣旇緝鐗規畩錛屾槸涓涓埗紿椾綋宓屽浜嗕竴涓瓙紿椾綋錛屾墍浠ワ紝
CFormView綾葷殑媧劇敓綾葷殑瀹炰緥涓嶅搷搴?/span>WM_CLOSE娑堟伅錛屼粎浠呭搷搴?/span>WM_DESTROY娑堟伅銆?/span>
鍙﹀錛岃嫢瑕佺敤浠g爜鍏抽棴褰撳墠View,涔熶笉鑳界洿鎺ワ細PostMessage(WM_CLOSE,0,0);
鑰屽繀欏誨厛鑾峰彇鐖剁獥浣撶殑鎸囬拡錛岀劧鍚庡鐖剁獥浣撳彂閫?/span>WM_CLOSE娑堟伅鎵嶈錛屽儚榪欐牱錛?/span>
GetParent()-&gt;PostMessage(WM_CLOSE,0,0);
鎵嶈兘澶熻揪鍒扮洰鐨勩?/span>
銆婃繁鍏ユ祬鍑?/span>MFC銆嬬鍏珷461欏靛浘8-1娓呮鍦拌鏄庝簡榪欑鎯呭喌錛?/span>View紿楀彛鏄?/span>CChildFrame紿楀彛鐨勫瓙紿楀彛銆?/span>



]]>
MFC鎷栧姩鏃犳爣棰樼獥鍙?/title><link>http://www.shnenglu.com/wanghaiguang/archive/2013/05/30/200689.html</link><dc:creator>鐜嬫搗鍏?/dc:creator><author>鐜嬫搗鍏?/author><pubDate>Thu, 30 May 2013 00:35:00 GMT</pubDate><guid>http://www.shnenglu.com/wanghaiguang/archive/2013/05/30/200689.html</guid><wfw:comment>http://www.shnenglu.com/wanghaiguang/comments/200689.html</wfw:comment><comments>http://www.shnenglu.com/wanghaiguang/archive/2013/05/30/200689.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wanghaiguang/comments/commentRss/200689.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wanghaiguang/services/trackbacks/200689.html</trackback:ping><description><![CDATA[鎷栧姩鏃犳爣棰樼殑紿楀彛鍙互閲嶈澆<span style="color: #333333; font-family: arial, 'courier new', courier, 瀹嬩綋, monospace; line-height: 24px; white-space: pre-wrap;"></span><span style="color: #333333; font-family: arial, 'courier new', courier, 瀹嬩綋, monospace; line-height: 24px; white-space: pre-wrap;">WM_LBUTTONDOWN錛屾坊鍔犲涓嬩唬鐮侊細</span><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->SendMessage(WM_SYSCOMMAND,0xF012,0);</div> 鎴?br /><div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->PostMessage (WM_NCLBUTTONDOWN , HTCAPTION , MAKELPARAM(point.x , point. y ));</div><img src ="http://www.shnenglu.com/wanghaiguang/aggbug/200689.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wanghaiguang/" target="_blank">鐜嬫搗鍏?/a> 2013-05-30 08:35 <a href="http://www.shnenglu.com/wanghaiguang/archive/2013/05/30/200689.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>MFC璁劇疆閫忔槑搴?/title><link>http://www.shnenglu.com/wanghaiguang/archive/2013/05/29/200672.html</link><dc:creator>鐜嬫搗鍏?/dc:creator><author>鐜嬫搗鍏?/author><pubDate>Wed, 29 May 2013 03:18:00 GMT</pubDate><guid>http://www.shnenglu.com/wanghaiguang/archive/2013/05/29/200672.html</guid><wfw:comment>http://www.shnenglu.com/wanghaiguang/comments/200672.html</wfw:comment><comments>http://www.shnenglu.com/wanghaiguang/archive/2013/05/29/200672.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wanghaiguang/comments/commentRss/200672.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wanghaiguang/services/trackbacks/200672.html</trackback:ping><description><![CDATA[<span style="font-family: Verdana; font-size: 12pt;">浠g爜紺轟緥錛?/span><br /><div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000ff; font-family: Verdana;">#define</span><span style="font-family: Verdana;"> LWA_COLORKEY 0x00000001         </span><span style="color: #008000; font-family: Verdana;">//</span><span style="color: #008000; font-family: Verdana;">鏂瑰紡</span><br /><span style="color: #0000ff; font-family: Verdana;">#define</span><span style="font-family: Verdana;"> WS_EX_LAYERED 0x00080000 </span><br /><br /><span style="font-family: Verdana;">typedef BOOL (WINAPI *lpfnSetLayeredWindowAttributes)(HWND hWnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags); </span><br /><span style="font-family: Verdana;">lpfnSetLayeredWindowAttributes SetLayeredWindowAttributes; </span><br /><br /><span style="color: #008000; font-family: Verdana;">//</span><span style="color: #008000; font-family: Verdana;">璁劇疆鎴愯竟緙橀忔槑 </span><br /><span style="font-family: Verdana;">COLORREF maskColor=#000000;</span><br /><br /><span style="font-family: Verdana;">HMODULE hUser32 = GetModuleHandle("user32.dll"); </span><span style="color: #008000; font-family: Verdana;">//</span><span style="color: #008000; font-family: Verdana;">鍔犺澆鍔ㄦ侀摼鎺ュ簱</span><span style="color: #008000; "><br /></span><span style="font-family: Verdana;">SetLayeredWindowAttributes = (lpfnSetLayeredWindowAttributes)GetProcAddress(hUser32,"SetLayeredWindowAttributes"); </span><br /><br /><span style="color: #008000; font-family: Verdana;">//</span><span style="color: #008000; font-family: Verdana;">鍙栧緱SetLayeredWindowAttributes鍑芥暟鎸囬拡 </span><br /><span style="color: #008000; font-family: Verdana;">//</span><span style="color: #008000; font-family: Verdana;">涓虹獥鍙e姞鍏S_EX_LAYERED鎵╁睍灞炴?/span><span style="color: #008000; "><br /></span><span style="font-family: Verdana;">SetWindowLong(</span><span style="color: #0000ff; font-family: Verdana;">this</span><span style="font-family: Verdana;">->GetSafeHwnd(), GWL_EXSTYLE, GetWindowLong(GetSafeHwnd(), GWL_EXSTYLE)^WS_EX_LAYERED); </span><br /><br /><span style="color: #008000; font-family: Verdana;">//</span><span style="color: #008000; font-family: Verdana;">璋冪敤SetLayeredWinowAttributes鍑芥暟</span><span style="color: #008000; "><br /></span><span style="font-family: Verdana;">SetLayeredWindowAttributes(</span><span style="color: #0000ff; font-family: Verdana;">this</span><span style="font-family: Verdana;">->GetSafeHwnd(), maskColor, 192, LWA_COLORKEY); </span><br /><br /><span style="font-family: Verdana;">FreeLibrary(hUser32);   </span><span style="color: #008000; font-family: Verdana;">//</span><span style="color: #008000; font-family: Verdana;">閲婃斁鍔ㄦ侀摼鎺ュ簱</span></div><br /><span times="" new="" roman";="" mso-hansi-font-family:"="" roman";color:black;"="" style="line-height: 25px; color: #333333; background-color: #ffffff; font-family: Verdana; font-size: 12pt;">浠ヤ笂浠g爜鍔犲叆</span><span style="line-height: 25px; font-family: Verdana; background-color: #ffffff; font-size: 12pt;">OnInitDialog()</span><span times="" new="" roman";mso-hansi-font-family:"="" roman";="" color:black;"="" style="line-height: 25px; color: #333333; background-color: #ffffff; font-family: Verdana; font-size: 12pt;">涓紝鍏朵腑</span><span style="line-height: 25px; font-family: Verdana; background-color: #ffffff; font-size: 12pt;"> SetLayeredWindowAttributes(this->GetSafeHwnd(), maskColor, 192, LWA_COLORKEY); </span><span times="" new="" roman";="" mso-hansi-font-family:"="" roman";color:black;"="" style="line-height: 25px; color: #333333; background-color: #ffffff; font-family: Verdana; font-size: 12pt;">閲岋紝</span><span style="line-height: 25px; font-family: Verdana; background-color: #ffffff; font-size: 12pt;">maskColor</span><span times="" new="" roman";mso-hansi-font-family:"="" roman";color:black;"="" style="line-height: 25px; color: #333333; background-color: #ffffff; font-family: Verdana; font-size: 12pt;">涓哄皢榪涜閫忔槑澶勭悊鐨勯鑹詫紝</span><span style="line-height: 25px; font-family: Verdana; background-color: #ffffff; font-size: 12pt;"> 192</span><span times="" new="" roman";mso-hansi-font-family:"="" roman";="" color:black;"="" style="line-height: 25px; color: #333333; background-color: #ffffff; font-family: Verdana; font-size: 12pt;">涓洪忔槑搴︼紝</span><span style="line-height: 25px; font-family: Verdana; background-color: #ffffff; font-size: 12pt;"> LWA_COLORKEY</span><span times="" new="" roman";""="" "="" roman";color:black;"="" style="line-height: 25px; color: #333333; background-color: #ffffff; font-family: Verdana; font-size: 12pt;">涓洪忔槑鏂瑰紡銆?/span><span style="line-height: 25px; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #ffffff;"><br /><br /></span><span times="" new="" roman";="" mso-hansi-font-family:"="" roman";color:black;"="" style="line-height: 25px; color: #333333; background-color: #ffffff; font-family: Verdana; font-size: 12pt;">鑻ヨ閫忔槑鏁翠釜瀵硅瘽妗嗭紝鍒?/span><span style="line-height: 25px; font-family: Verdana; background-color: #ffffff; font-size: 12pt;">LWA_COLORKEY=2;<br /></span><span times="" new="" roman";="" mso-hansi-font-family:"="" roman";color:black;"="" style="line-height: 25px; color: #333333; background-color: #ffffff; font-family: Verdana; font-size: 12pt;">鑻ヨ瀵歸夊畾棰滆壊閫忔槑錛屽垯</span><span style="line-height: 25px; font-family: Verdana; background-color: #ffffff; font-size: 12pt;">LWA_COLORKEY=1;</span><br />   <br /><span style="font-family: Verdana; font-size: 12pt;">鏈枃杞嚜錛?/span><a ><span style="font-family: Verdana; font-size: 12pt;">http://chenjiuliang.blog.163.com/blog/static/36572155201151735735374/</span></a><img src ="http://www.shnenglu.com/wanghaiguang/aggbug/200672.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wanghaiguang/" target="_blank">鐜嬫搗鍏?/a> 2013-05-29 11:18 <a href="http://www.shnenglu.com/wanghaiguang/archive/2013/05/29/200672.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>MFC璁劇疆瀵硅瘽妗嗚儗鏅浘鐗?/title><link>http://www.shnenglu.com/wanghaiguang/archive/2013/05/29/200671.html</link><dc:creator>鐜嬫搗鍏?/dc:creator><author>鐜嬫搗鍏?/author><pubDate>Wed, 29 May 2013 03:02:00 GMT</pubDate><guid>http://www.shnenglu.com/wanghaiguang/archive/2013/05/29/200671.html</guid><wfw:comment>http://www.shnenglu.com/wanghaiguang/comments/200671.html</wfw:comment><comments>http://www.shnenglu.com/wanghaiguang/archive/2013/05/29/200671.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wanghaiguang/comments/commentRss/200671.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wanghaiguang/services/trackbacks/200671.html</trackback:ping><description><![CDATA[<span style="font-family: Verdana; font-size: 12pt;">1銆佸鍏itmap璧勬簮鍥劇墖錛?/span><br /><span style="font-family: Verdana; font-size: 12pt;">2銆侀噸杞絎M_PAINT ——></span><span style="color: #454545; font-family: Verdana; background-color: #ffffff; font-size: 12pt;">void CXXXDlg::OnPaint()<br /></span><span style="font-family: Verdana; font-size: 12pt;">3銆佹坊鍔犲涓嬩唬鐮侊細<br /></span><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->    CRect   rect;   <br />    GetClientRect(&rect);   <br />    CDC   dcMem;   <br />    dcMem.CreateCompatibleDC(&dc);   <br />    CBitmap   bmpBackground;   <br />    bmpBackground.LoadBitmap(IDB_BITMAP_TOOL);   <span style="color: #008000; ">//</span><span style="color: #008000; ">IDB_BITMAP_TOOL鏄綘鑷繁鐨勫浘瀵瑰簲鐨処D </span><span style="color: #008000; "><br /></span><br />    BITMAP   bitmap;   <br />    bmpBackground.GetBitmap(&bitmap);   <br />    CBitmap   *pbmpOld=dcMem.SelectObject(&bmpBackground);   <br />    dc.StretchBlt(0,0,rect.Width(),rect.Height(),&dcMem,0,0,   <br />        bitmap.bmWidth,bitmap.bmHeight,SRCCOPY);   </div><span style="font-family: Verdana; font-size: 12pt;"><br />鍏朵粬鏂規硶錛?br />閲嶅啓WM_ERASEBKGND娑堟伅<br /></span><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->BOOL CxxDialog::OnEraseBkgnd(CDC* pDC) <br />{<br />   <span style="color: #008000; ">//</span><span style="color: #008000; "> CDialog::OnEraseBkgnd(pDC);</span><span style="color: #008000; ">//</span><span style="color: #008000; ">蹇樿瑕佷笉瑕佹墽琛岀埗綾葷殑榪欎釜浜?</span><span style="color: #008000; "><br /></span>    CDC  memdc;<br />    memdc.CreateCompatibleDC(pDC);<br />    CBitmap bmp;<br />    CBitmap *pOldBmp;<br />    BITMAP bm;<span style="color: #008000; ">//</span><span style="color: #008000; ">鐢ㄦ潵淇濆瓨鍥劇墖鐨勯暱瀹界瓑淇℃伅</span><span style="color: #008000; "><br /></span><br />    bmp.LoadBitmap(IDB_BITMAP1);<br />    bmp.GetBitmap(&bm);<br /><br />    <span style="color: #008000; ">//</span><span style="color: #008000; ">灝嗗浘鐗囬夎繘緙撳啿鍖?/span><span style="color: #008000; "><br /></span>    pOldBmp = (CBitmap *)memdc.SelectObject(&bmp);<br /><br />    <span style="color: #008000; ">//</span><span style="color: #008000; ">濡傛灉鍥劇墖璺熷璇濇鐨勫鎴峰尯涓鏍峰ぇ錛岀洿鎺ョ敤BitBlt灝卞彲浠?br />    </span><span style="color: #008000; ">//</span><span style="color: #008000; ">pDC->BitBlt(0, 0, rcWnd.Width(), rcWnd.Height(), &memdc, 0, 0, SRCCOPY);<br /><br />    </span><span style="color: #008000; ">//</span><span style="color: #008000; ">濡傛灉鍥劇墖姣斿璇濇鐨勮儗鏅皬錛屽氨瑕佺敤StrechBlt鏉ユ媺浼稿浘鐗?/span><span style="color: #008000; "><br /></span>    pDC->StrechBlt(0, 0, rcWnd.Width, rcWnd.Height(), &memdc, 0, 0, bm.bmWidth,bm.bmHeight, SRCCOPY);<br /><br />   <span style="color: #008000; ">//</span><span style="color: #008000; ">閲婃斁DC</span><span style="color: #008000; "><br /></span>    memdc.SelectObject(pOldBmp);<br />    memdc.DeleteDC();<br /><br />    <span style="color: #0000FF; ">return</span> TRUE; <br />}</div><span style="font-family: Verdana; font-size: 12pt;"><br />鍏朵粬鏂規硶錛?/span><a >http://blog.csdn.net/ply421600/article/details/6692967</a><span style="font-family: Verdana; font-size: 12pt;"><br /></span><img src ="http://www.shnenglu.com/wanghaiguang/aggbug/200671.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wanghaiguang/" target="_blank">鐜嬫搗鍏?/a> 2013-05-29 11:02 <a href="http://www.shnenglu.com/wanghaiguang/archive/2013/05/29/200671.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Base64緙栬В鐮?C++鐗?http://www.shnenglu.com/wanghaiguang/archive/2013/03/20/198626.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Wed, 20 Mar 2013 06:00:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2013/03/20/198626.htmlhttp://www.shnenglu.com/wanghaiguang/comments/198626.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2013/03/20/198626.html#Feedback0http://www.shnenglu.com/wanghaiguang/comments/commentRss/198626.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/198626.html
#include <string>
using namespace std;

class ZBase64
{
public:
    /*緙栫爜
    DataByte
        [in]杈撳叆鐨勬暟鎹暱搴?浠ュ瓧鑺備負鍗曚綅
    
*/
    string Encode(const unsigned char* Data,int DataByte);
    /*瑙g爜
    DataByte
        [in]杈撳叆鐨勬暟鎹暱搴?浠ュ瓧鑺備負鍗曚綅
    OutByte
        [out]杈撳嚭鐨勬暟鎹暱搴?浠ュ瓧鑺備負鍗曚綅,璇蜂笉瑕侀氳繃榪斿洖鍊艱綆?br />        杈撳嚭鏁版嵁鐨勯暱搴?br />    
*/
    string Decode(const char* Data,int DataByte,int& OutByte);
};

.cpp鏂囦歡錛?br />
#include "stdAfx.h"
#include "ZBase64.h"

string ZBase64::Encode(const unsigned char* Data,int DataByte)
{
    //緙栫爜琛?/span>
    const char EncodeTable[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    //榪斿洖鍊?/span>
    string strEncode;
    unsigned char Tmp[4]={0};
    int LineLength=0;
    for(int i=0;i<(int)(DataByte / 3);i++)
    {
        Tmp[1] = *Data++;
        Tmp[2] = *Data++;
        Tmp[3] = *Data++;
        strEncode+= EncodeTable[Tmp[1] >> 2];
        strEncode+= EncodeTable[((Tmp[1] << 4) | (Tmp[2] >> 4)) & 0x3F];
        strEncode+= EncodeTable[((Tmp[2] << 2) | (Tmp[3] >> 6)) & 0x3F];
        strEncode+= EncodeTable[Tmp[3] & 0x3F];
        if(LineLength+=4,LineLength==76) {strEncode+="\r\n";LineLength=0;}
    }
    //瀵瑰墿浣欐暟鎹繘琛岀紪鐮?/span>
    int Mod=DataByte % 3;
    if(Mod==1)
    {
        Tmp[1] = *Data++;
        strEncode+= EncodeTable[(Tmp[1] & 0xFC) >> 2];
        strEncode+= EncodeTable[((Tmp[1] & 0x03) << 4)];
        strEncode+= "==";
    }
    else if(Mod==2)
    {
        Tmp[1] = *Data++;
        Tmp[2] = *Data++;
        strEncode+= EncodeTable[(Tmp[1] & 0xFC) >> 2];
        strEncode+= EncodeTable[((Tmp[1] & 0x03) << 4) | ((Tmp[2] & 0xF0) >> 4)];
        strEncode+= EncodeTable[((Tmp[2] & 0x0F) << 2)];
        strEncode+= "=";
    }
    
    return strEncode;
}

string ZBase64::Decode(const char* Data,int DataByte,int& OutByte)
{
    //瑙g爜琛?/span>
    const char DecodeTable[] =
    {
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// '+'
, 0, 0,
// '/'
, 53, 54, 55, 56, 57, 58, 59, 60, 61, // '0'-'9'
, 0, 0, 0, 0, 0, 0,
, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, // 'A'-'Z'
, 0, 0, 0, 0, 0,
, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, // 'a'-'z'
    };
    //榪斿洖鍊?/span>
    string strDecode;
    int nValue;
    int i= 0;
    while (i < DataByte)
    {
        if (*Data != '\r' && *Data!='\n')
        {
            nValue = DecodeTable[*Data++] << 18;
            nValue += DecodeTable[*Data++] << 12;
            strDecode+=(nValue & 0x00FF0000) >> 16;
            OutByte++;
            if (*Data != '=')
            {
                nValue += DecodeTable[*Data++] << 6;
                strDecode+=(nValue & 0x0000FF00) >> 8;
                OutByte++;
                if (*Data != '=')
                {
                    nValue += DecodeTable[*Data++];
                    strDecode+=nValue & 0x000000FF;
                    OutByte++;
                }
            }
            i += 4;
        }
        else// 鍥炶濺鎹㈣,璺寵繃
        {
            Data++;
            i++;
        }
     }
    return strDecode;
}

浣跨敤紺轟緥錛堢粨鍚圕xImage搴擄級錛?/span>
CString CScanDlg::EncodeImage()
{//瀵瑰浘鐗囪繘琛孊ase64緙栫爜
    ZBase64 zBase;
    //鍥劇墖緙栫爜
    CxImage  image;   // 瀹氫箟涓涓狢xImage瀵硅薄    
    image.Load(this->m_strImgPath, CXIMAGE_FORMAT_JPG);   //鍏堣杞絡pg鏂囦歡,闇瑕佹寚瀹氭枃浠剁被鍨?/span>
    long size=0;//寰楀埌鍥懼儚澶у皬
    BYTE* buffer=0;//瀛樺偍鍥懼儚鏁版嵁鐨勭紦鍐?/span>
    image.Encode(buffer,size,CXIMAGE_FORMAT_JPG);//鎶奿mage瀵硅薄涓殑鍥懼儚浠ype綾誨瀷鏁版嵁copy鍒癰uffer
    string strTmpResult=zBase.Encode(buffer,size);
    CString result;
    result = strTmpResult.c_str();
    return result;
}

void CScanDlg::DecodeImageData(CString strData)
{//瀵笲ase64緙栫爜榪囩殑鏁版嵁瑙g爜騫舵樉紺哄師鍥劇墖

    ZBase64 zBase;
    int OutByte=0;
    string strTmpResult=zBase.Decode(strData,strData.GetLength(),OutByte);
    int i,len = strTmpResult.length();
    BYTE *buffer = new BYTE[len];
    for (i=0;i<len;++i)
    {
        buffer[i] = strTmpResult[i];
    }
    CxImage image(buffer,len,CXIMAGE_FORMAT_JPG);//鎶婂唴瀛樼紦鍐瞓uffer涓殑鏁版嵁鏋勯犳垚Image瀵硅薄
    delete [] buffer;
    CDC* hdc = m_picture.GetDC();
    m_bitmap = image.MakeBitmap(hdc->m_hDC);
    HBITMAP h0ldBmp = m_picture.SetBitmap(m_bitmap);
    if(h0ldBmp) DeleteObject(h0ldBmp);
    if(hdc->m_hDC) m_picture.ReleaseDC(hdc);
    if(m_bitmap) DeleteObject(m_bitmap);
}

鏈枃杞嚜錛歨ttp://www.cnblogs.com/phinecos/archive/2008/10/10/1308272.html

]]>
VS2008鎵撳紑璧勬簮鏂囦歡鏃舵樉紺鴻娌℃湁瀹夎榪欎釜ActiveX鎺т歡 "{648A5600-2C6E-101B-82B6-000000000014http://www.shnenglu.com/wanghaiguang/archive/2013/03/20/198617.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Wed, 20 Mar 2013 02:23:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2013/03/20/198617.htmlhttp://www.shnenglu.com/wanghaiguang/comments/198617.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2013/03/20/198617.html#Feedback0http://www.shnenglu.com/wanghaiguang/comments/commentRss/198617.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/198617.html鎵嬪姩娉ㄥ唽錛?/strong>

      澶у鐭ラ亾錛屽綋鎴戜滑瀹夎VC++6.0/VB6.0鏃訛紝濡傛灉閫夋嫨浜咥CtiveX鎺т歡欏癸紙鑷畾涔夊畨瑁咃級錛孧SComm鎺т歡灝變細鑷姩瀹夎鍦ㄨ綆楁満涓婁簡錛屽茍鍦ㄧ郴緇熸枃浠跺す涓嬪浜?涓枃浠訛細Mscomm.srg, Mscomm32.ocx,Mscomm32.dep

銆銆娉ㄦ剰錛屾搷浣滅郴緇熶笉鍚岋紝鍒欑郴緇熸枃浠跺す涓嶅悓錛?/span>
銆銆銆銆銆銆銆Win98:    windows/system
銆銆銆銆銆銆銆Win2000:  winnt/system32

     閭d箞鐢ㄤ簡MSComm鎺т歡鐨勭▼搴忓湪鍙戝竷鏃舵垨鑰呭湪VS2008寮鍙戠幆澧冧笅濡備綍鏉ユ敞鍐孧SComm鎺т歡鍛紵鍙戝竷紼嬪簭鏃跺彲浠ョ敤瀹夎紼嬪簭錛屾垜浠繖閲屼笉浠嬬粛錛屽彧璋堣皥濡備綍鎵嬪伐鏉ユ敞鍐屽畨瑁匨SComm鎺т歡銆?/span>

銆銆絎竴姝ワ細灝哅scomm.srg, Mscomm32.ocx,Mscomm32.dep涓変釜鏂囦歡澶嶅埗鍒扮郴緇熸枃浠跺す涓傝娉ㄦ剰鐨勬槸錛孧SComm鎺т歡鏄鎺堟潈鐨勶紝鎵浠ュ繀欏誨皢鍏朵嬌鐢?#8220;鎵х収”Licence 鍦ㄦ敞鍐岃〃涓櫥璁版敞鍐岋紝涓嬩竴姝ュ氨鏄敞鍐屾柟娉曘傝嚦浜庝負浠涔堣榪欐牱鍋氾紝鍙互鐪嬬湅涓嬮潰鐨勭綉欏碉細http://support.microsoft.com/support/kb/articles/q151/7/71.asp

銆銆

銆銆絎簩姝ワ細鐢╓indows涓嬬殑娉ㄥ唽宸ュ叿regsvr32娉ㄥ唽璇CX鎺т歡錛岀偣鍑?#8220;寮濮?#8221;->"榪愯"錛屽啀鍦ㄤ腑濉叆錛堝亣璁炬搷浣滃畨瑁呭湪C鐩橈紝WIN2000錛夛細

      Regsvr32  C:\winnt\system32\Mscomm32.ocx

   銆絎笁姝ワ細鍦ㄦ敞鍐岃〃涓墜宸ユ柊寤轟竴涓富閿」錛氬厛鍦ㄧ偣鍑?#8220;寮濮?#8221;->"榪愯"錛屽啀鍦ㄤ腑濉叆regedit鍛戒護鎵撳紑娉ㄥ唽琛紝鎵懼埌HKEY_CLASSES_ROOT\Licenses錛屽湪鍏朵腑娣誨姞涓婚敭
4250E830-6AC2-11cf-8ADB-00AA00C00905銆騫跺皢鍐呭璁劇疆涓猴細

銆銆銆銆銆銆銆kjljvjjjoquqmjjjvpqqkqmqykypoqjquoun

銆銆銆錛堟敞錛氳繖欏瑰唴瀹逛篃鍙互鐢ㄨ浜嬫湰紼嬪簭鎵撳紑Mscomm.srg鏂囦歡鐪嬪埌錛?/span>

銆銆鍦╒C錛堝寘鎷琕C.NET錛変腑搴旂敤錛屾垜宸茬粡浠嬬粛澶氭浜嗭紝榪欓噷鍐嶈璇村湪Delphi涓殑搴旂敤錛氳繘鍏elphi鐜涓紝閫夋嫨鑿滃崟鍛戒護錛欳omponent->Import ActiveX Control,鍦ㄥ垪琛ㄤ腑鍙互鐪嬪埌Microsoft Comm Control錛寁ersion 6.0, 閫変腑鍚庣偣鍑籌nstall鎸夐挳,灝卞畬鎴愬畨瑁呫傚湪ActiveX鎺т歡欏典笂鍙互鐪嬪埌MSComm鎺т歡鐨勭數璇濆浘鏍囥?br />
浠ヤ笂杞嚜錛?/span>http://www.gjwtech.com/scomm/manaualregistermscomm.htm


鑷姩娉ㄥ唽錛?/strong>
     
      榪愯闄勪歡涓殑“娉ㄥ唽.cmd”瀹屾垚鑷姩娉ㄥ唽 MSComm鎺т歡銆?/span>  MSComm
       



]]>
VS2008 涓媏rror PRJ0003 : Error spawning 'cmd.exe'鐨勮В鍐蟲柟娉?/title><link>http://www.shnenglu.com/wanghaiguang/archive/2013/03/07/198255.html</link><dc:creator>鐜嬫搗鍏?/dc:creator><author>鐜嬫搗鍏?/author><pubDate>Thu, 07 Mar 2013 02:49:00 GMT</pubDate><guid>http://www.shnenglu.com/wanghaiguang/archive/2013/03/07/198255.html</guid><wfw:comment>http://www.shnenglu.com/wanghaiguang/comments/198255.html</wfw:comment><comments>http://www.shnenglu.com/wanghaiguang/archive/2013/03/07/198255.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wanghaiguang/comments/commentRss/198255.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wanghaiguang/services/trackbacks/198255.html</trackback:ping><description><![CDATA[<span style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; text-indent: 20px; background-color: #ffffff;"></span><span style="font-family: Verdana; font-size: 12pt; line-height: 19px; text-indent: 20px; background-color: #ffffff; color: #0000ff;">鏂規硶1錛?br /></span><span style="font-family: Verdana; font-size: 12pt; line-height: 19px; text-indent: 20px; background-color: #ffffff;"><br /></span><span style="font-family: Verdana; font-size: 12pt; line-height: 19px; text-indent: 20px; background-color: #ffffff;">In the Options go into Projects and Solutions -> VC++ Directories page and place this rows:<br /><br /></span><span style="font-family: Verdana; font-size: 12pt; line-height: 19px; text-indent: 20px; background-color: #ffffff;">$(SystemRoot)\System32<br /></span><span style="background-color: #ffffff; font-family: Verdana; font-size: 12pt; line-height: 19px; text-indent: 20px;">$(SystemRoot)<br /></span><span style="background-color: #ffffff; font-family: Verdana; font-size: 12pt; line-height: 19px; text-indent: 20px;">$(SystemRoot)\System32\wbem<br /></span><span style="background-color: #ffffff; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; text-indent: 20px;"><br /></span><span style="font-family: Verdana; font-size: 12pt; line-height: 16px; background-color: #ffffff;">閫傜敤VC8鐨勫悇縐嶅伐紼嬮」鐩紙鍖呮嫭縐誨姩璁懼鐨勯」鐩級錛屽鏋滃湪鍔犱簡浠ュ悗榪樺嚭鐜拌繖鏍風殑閿欒鎻愮ず錛屽皢涓婇潰鐨勪笁鍙ュ垹闄ゆ帀錛岄噸鏂板姞涓嬈″氨鍙互銆?br /><br /></span><span style="font-size: 12pt; font-family: Verdana; color: #0000ff;">鏂規硶2錛?/span><br /><br /><span style="font-family: Verdana; font-size: 12pt; line-height: 16px; background-color: #ffffff;">鍦╒isual Studio涓紝閫夋嫨宸ュ叿->閫夐」->宸ョ▼鍜岃В鍐蟲柟妗?>VC++鐩綍 </span><br style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; background-color: #ffffff;" /><span style="font-family: Verdana; font-size: 12pt; line-height: 16px; background-color: #ffffff;">鐐瑰嚮涓婃柟鐨勫儚鏂囦歡澶圭殑鎸夐挳-鏂板緩琛岋紝鐒跺悗鍦ㄧ┖鐧藉娣誨姞cmd.exe鎵鍦ㄧ殑鐩綍C:\Windows\System32\ 錛堝鏋滀綘鏄粯璁よ鍦–鐩樼殑璇濓級鐐瑰嚮紜畾錛屽氨OK浜嗐?nbsp;</span><br style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; background-color: #ffffff;" /><br style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; background-color: #ffffff;" /><span style="font-family: Verdana; font-size: 12pt; line-height: 16px; background-color: #ffffff;">In VS, go to </span><br style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; background-color: #ffffff;" /><br style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; background-color: #ffffff;" /><span style="font-family: Verdana; font-size: 12pt; line-height: 16px; background-color: #ffffff;">tools>options>projects and solutions>VC++ Directories </span><br style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; background-color: #ffffff;" /><br style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; background-color: #ffffff;" /><span style="font-family: Verdana; font-size: 12pt; line-height: 16px; background-color: #ffffff;">click the little folder button (new line) then in the new line that appears put: <br /><br /></span><span style="font-size: 12pt; font-family: Verdana;">鏈枃杞嚜錛?/span><span style="font-size: 12pt; font-family: Verdana;">http://www.shnenglu.com/zhangyq/archive/2009/02/16/73940.html</span><img src ="http://www.shnenglu.com/wanghaiguang/aggbug/198255.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wanghaiguang/" target="_blank">鐜嬫搗鍏?/a> 2013-03-07 10:49 <a href="http://www.shnenglu.com/wanghaiguang/archive/2013/03/07/198255.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>MFC媯嫻嬬綉緇滆繛鎺ュ拰ping IP鍦板潃http://www.shnenglu.com/wanghaiguang/archive/2013/03/01/198157.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Fri, 01 Mar 2013 07:51:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2013/03/01/198157.htmlhttp://www.shnenglu.com/wanghaiguang/comments/198157.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2013/03/01/198157.html#Feedback0http://www.shnenglu.com/wanghaiguang/comments/commentRss/198157.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/198157.html浠g爜紺轟緥錛?br />
#include <Sensapi.h>
#pragma comment(lib, "Sensapi.lib")
BOOL CheckNetIsOK(const CString sUpdateIP)
{
    //Judge Network is Connected
    int nCount = 1;
    do 
    {
        DWORD dw;
        if( IsNetworkAlive(&dw))
        {
            break;
        }
        else
        {
            Sleep(10000);
            CString sNetWorkConnect;
            sNetWorkConnect.Format("絎?d嬈$綉緇滄湭鎴愬姛榪炴帴, 10縐掑悗閲嶈瘯", nCount);
            m_recvCtrl.SetWindowText(sNetWorkConnect);
            nCount++ ;
        }
    } while (nCount <4);

    if (nCount == 4)
    {
        m_recvCtrl.SetWindowText("緗戠粶榪炴帴澶辮觸, 鍏辨嫻?0縐?);
        return FALSE;
    }

    DWORD n = CCommonFun::WinExecAndWait32(_T("ping.exe"), sUpdateIP + " -n 2"/*sCmdPara*/, NULL, 10000);
    if (n == 0)
    {
        return TRUE;
    }
    else
    {
        CString sNetWorkConnect;
        sNetWorkConnect.Format("緗戠粶榪炴帴姝e父, Ping:%s 澶辮觸, 璇鋒嫻嬫IP瀵瑰簲鐨勬湇鍔″櫒鏄惁姝e父宸ヤ綔", sUpdateIP);
        m_recvCtrl.SetWindowText(sNetWorkConnect);
        return FALSE;
    }
}



]]>
MFC CEdit鏄劇ず榪藉姞淇℃伅http://www.shnenglu.com/wanghaiguang/archive/2013/03/01/198156.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Fri, 01 Mar 2013 07:50:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2013/03/01/198156.htmlhttp://www.shnenglu.com/wanghaiguang/comments/198156.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2013/03/01/198156.html#Feedback0http://www.shnenglu.com/wanghaiguang/comments/commentRss/198156.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/198156.html
    int LineNum=m_recvCtrl.GetLineCount();
    if(LineNum > 100)                                // 瓚呰繃鏈澶т俊鎭樉紺鴻鏁?/span>
    {
        m_recvCtrl.SetSel(0, -1);
        m_recvCtrl.Clear();                            // 娓呯┖緙栬緫妗?/span>
    }    

    CTime RevTime = CTime::GetCurrentTime();
    CString Temp = RevTime.Format("[%Y/%m/%d %H:%M:%S]: ");

    CString strEdit;    
    m_recvCtrl.GetWindowText(strEdit);   
    m_recvCtrl.SetSel(strEdit.GetLength(), strEdit.GetLength());  
    m_recvCtrl.ReplaceSel(Temp + sText + "\n");


]]>
鏌ユ壘CString閲岄潰鍑虹幇鏌愪釜瀛楃鐨勬鏁?http://www.shnenglu.com/wanghaiguang/archive/2013/02/19/197935.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Tue, 19 Feb 2013 06:34:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2013/02/19/197935.htmlhttp://www.shnenglu.com/wanghaiguang/comments/197935.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2013/02/19/197935.html#Feedback1http://www.shnenglu.com/wanghaiguang/comments/commentRss/197935.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/197935.html1銆?/span>Replace鍑芥暟鏇挎崲鏌ユ壘

Replace鍑芥暟榪斿洖鍊鹼細榪斿洖琚浛鎹㈢殑瀛楃鏁般傚鏋滆繖涓瓧絎︿覆娌℃湁鏀瑰彉鍒欒繑鍥為浂銆?/span>

CString sTest="aabbccaadd";
int nCount=s.Replace("a","a");

nCount
灝辨槸浣犵殑鎯寵鐨勫?br />
CString::Replace
int Replace( TCHAR chOld, TCHAR chNew );
int Replace( LPCTSTR lpszOld, LPCTSTR lpszNew );

Return Value
The number of replaced instances of the character. Zero if the string isn't changed.


2銆?/span>鏍囧噯鍑芥暟 count_if

#include <iostream>
#include <string>
#include <functional>
#include <algorithm>
using namespace std;

int main( void )
{
    const string a = " 12113";
    cout << count_if( a.begin(), a.end(), bind2nd(equal_to<char>(),'1') ) << endl;

    return 0;
}

CString涔熶竴鏍鳳紝浣嗗畠娌℃湁鏍囧噯鐨勮凱浠e櫒錛屽洜姝ら渶瑕佸啓鎴?/span>
count_if( (LPCTSTR)a, (LPCTSTR)a+a.GetLength(), bind2nd(equal_to<TCHAR>(),_T('鏌愬瓧絎?)) )

]]>
MFC鑾峰彇紓佺洏絀洪棿淇℃伅http://www.shnenglu.com/wanghaiguang/archive/2013/01/16/197324.html鐜嬫搗鍏?/dc:creator>鐜嬫搗鍏?/author>Wed, 16 Jan 2013 09:00:00 GMThttp://www.shnenglu.com/wanghaiguang/archive/2013/01/16/197324.htmlhttp://www.shnenglu.com/wanghaiguang/comments/197324.htmlhttp://www.shnenglu.com/wanghaiguang/archive/2013/01/16/197324.html#Feedback0http://www.shnenglu.com/wanghaiguang/comments/commentRss/197324.htmlhttp://www.shnenglu.com/wanghaiguang/services/trackbacks/197324.html紺轟緥浠g爜錛?/span>
DWORD CCommonFun::GetDesignatedDiskFreeSpace(const CString &szPath)
{
    DWORD dwTotalDiskSpace,dwFreeDiskSpace,dwUsedDiskSpace;    

    ULARGE_INTEGER uiFreeBytesAvailableToCaller;
    ULARGE_INTEGER uiTotalNumberOfBytes;
    ULARGE_INTEGER uiTotalNumberOfFreeBytes;

    if(GetDiskFreeSpaceEx(szPath, &uiFreeBytesAvailableToCaller,
        &uiTotalNumberOfBytes,
        &uiTotalNumberOfFreeBytes))
    {
        dwTotalDiskSpace = (DWORD)(uiTotalNumberOfBytes.QuadPart / 1024 / 1024);
        dwFreeDiskSpace  = (DWORD)(uiFreeBytesAvailableToCaller.QuadPart >> 20);
        dwUsedDiskSpace     = dwTotalDiskSpace - dwFreeDiskSpace;
        TRACE("紜洏%s::鎬葷┖闂?dMB, 宸茬敤%dMB, 鍙敤%dMB\n", szPath,
            dwTotalDiskSpace, dwUsedDiskSpace, dwFreeDiskSpace);

        return dwFreeDiskSpace;
    }

    return -1;
}


]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
      <noscript id="pjuwb"></noscript>
            <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
              <dd id="pjuwb"></dd>
              <abbr id="pjuwb"></abbr>
              久久久久久久久久久久久女国产乱| 国产农村妇女精品| 在线亚洲精品福利网址导航| 日韩午夜高潮| 亚洲一区亚洲二区| 久久aⅴ国产欧美74aaa| 久久久免费精品| 欧美激情在线狂野欧美精品| 国产精品免费网站| 亚洲第一黄网| 亚洲一区二区三区涩| 久久久国产亚洲精品| 欧美高清在线精品一区| 一本色道久久综合亚洲二区三区 | 亚洲在线第一页| 欧美亚洲一区在线| 亚洲成色777777在线观看影院| 亚洲电影自拍| 亚洲欧美日韩另类| 欧美成人中文| 国产永久精品大片wwwapp| 亚洲精品社区| 久久精品人人做人人爽电影蜜月| 欧美激情aaaa| 性做久久久久久| 欧美精品情趣视频| 樱桃视频在线观看一区| 亚洲欧美视频| 亚洲精品国产拍免费91在线| 久久精品在线视频| 国产精品久久久久天堂| 亚洲国产欧美在线人成| 久久久www成人免费精品| 日韩视频在线免费| 免费在线播放第一区高清av| 国产日韩在线看片| 噜噜噜噜噜久久久久久91 | 国产精品成人在线| 136国产福利精品导航网址| 性久久久久久久| 亚洲另类一区二区| 欧美成人亚洲成人日韩成人| 国产亚洲激情在线| 欧美伊久线香蕉线新在线| aaa亚洲精品一二三区| 欧美精品福利在线| 亚洲精品一区在线| 亚洲国产高清一区二区三区| 久久久免费精品视频| 国产一区二区三区在线观看免费视频 | 亚洲三级免费| 欧美激情亚洲视频| 美女国内精品自产拍在线播放| 国产综合在线看| 久久国产精品99精品国产| 亚洲亚洲精品三区日韩精品在线视频| 欧美日韩国产美女| 一本色道精品久久一区二区三区| 亚洲二区视频| 欧美连裤袜在线视频| 一区二区三区欧美激情| 99国产麻豆精品| 国产精品女主播一区二区三区| 午夜精品久久久久久久久久久久| 亚洲网站在线看| 国产乱码精品一区二区三区忘忧草| 亚洲视频自拍偷拍| 亚洲一级二级| 黑丝一区二区| 欧美国产一区在线| 欧美人妖另类| 欧美在线视频二区| 久久久噜噜噜久久| 亚洲精品网址在线观看| 日韩午夜精品| 国产日韩欧美综合一区| 男人天堂欧美日韩| 欧美日韩系列| 久久久久久久高潮| 欧美刺激午夜性久久久久久久| 中日韩在线视频| 亚洲欧美综合网| 在线播放国产一区中文字幕剧情欧美| 欧美激情中文字幕一区二区| 欧美午夜激情视频| 久热re这里精品视频在线6| 欧美精品乱码久久久久久按摩| 亚洲免费伊人电影在线观看av| 欧美一区免费视频| 亚洲美女福利视频网站| 久久精品视频一| 欧美国产在线观看| 欧美一级成年大片在线观看| 久久亚洲一区二区| 午夜精品福利一区二区蜜股av| 久久精品在线| 亚洲一区二区三区在线看| 欧美伊久线香蕉线新在线| 9久草视频在线视频精品| 欧美一区二区在线观看| 亚洲视频福利| 欧美成人中文| 美女视频黄 久久| 国产精品丝袜xxxxxxx| 欧美激情一区二区| 狠狠噜噜久久| 亚洲欧美国产一区二区三区| 日韩视频一区二区| 久久精品最新地址| 午夜亚洲精品| 亚洲欧美日韩精品综合在线观看| 亚洲女同精品视频| 亚洲精品一区二区三区婷婷月| 亚洲已满18点击进入久久| 最新中文字幕亚洲| 久久精品水蜜桃av综合天堂| 午夜一级久久| 国产精品二区二区三区| 亚洲精品久久视频| 亚洲日本久久| 老司机午夜精品| 另类春色校园亚洲| 国内外成人免费激情在线视频网站 | 欧美好骚综合网| 嫩模写真一区二区三区三州| 国产精品毛片a∨一区二区三区| 亚洲经典在线| 日韩一区二区免费高清| 欧美aa国产视频| 欧美激情导航| 亚洲激情在线观看| 六月丁香综合| 亚洲国产精品免费| 99精品视频免费观看| 欧美国产高潮xxxx1819| 欧美jizz19性欧美| 亚洲国产小视频在线观看| 蜜臀va亚洲va欧美va天堂| 欧美成人网在线| 亚洲美女黄网| 国产精品激情偷乱一区二区∴| 亚洲另类视频| 亚洲欧美日韩一区二区三区在线| 欧美色精品在线视频| 亚洲视频精选在线| 久久成人一区| 亚洲第一精品夜夜躁人人躁| 蜜桃av综合| 99精品欧美一区| 久久精品国产亚洲一区二区三区| 国产一区观看| 欧美电影打屁股sp| 一本一本久久| 久久久国产精品一区| 亚洲风情在线资源站| 亚洲国产精品传媒在线观看 | 久久精品国产欧美亚洲人人爽| 久久资源在线| 亚洲精品综合在线| 欧美午夜电影完整版| 欧美一区二区视频观看视频| 你懂的国产精品| 亚洲一区二区三区三| 狠狠操狠狠色综合网| 欧美日本一区| 欧美亚洲免费| 亚洲国产欧美日韩另类综合| 亚洲在线中文字幕| 在线精品亚洲| 国产精品久久久久久久app| 久久国内精品自在自线400部| 欧美韩日一区| 欧美淫片网站| 中文av一区二区| 亚洲福利视频网站| 国产精品萝li| 欧美精品一区二区三区久久久竹菊 | 日韩午夜电影在线观看| 国产欧美日韩精品专区| 欧美韩日一区| 久久精品五月| 亚洲欧美日本日韩| 亚洲日本在线观看| 免费观看国产成人| 久久激情五月丁香伊人| 亚洲网站在线| 99国产精品99久久久久久粉嫩| 国产一区二区剧情av在线| 欧美亚一区二区| 欧美激情综合在线| 欧美1区2区视频| 久久影院午夜片一区| 欧美一级淫片播放口| 一本色道久久综合亚洲精品不 | 亚洲精品系列| 亚洲国产精品久久久| 黄色成人精品网站| 国产人成精品一区二区三| 国产精品二区影院| 欧美日韩国产片|