• <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>
            面對(duì)現(xiàn)實(shí),超越自己
            逆水行舟,不進(jìn)則退
            posts - 269,comments - 32,trackbacks - 0
            拖動(dòng)無(wú)標(biāo)題的窗口可以重載WM_LBUTTONDOWN,添加如下代碼:
            SendMessage(WM_SYSCOMMAND,0xF012,0);

            PostMessage (WM_NCLBUTTONDOWN , HTCAPTION , MAKELPARAM(point.x , point. y ));
            posted @ 2013-05-30 08:35 王海光 閱讀(736) | 評(píng)論 (0)編輯 收藏
            代碼示例:
            #define LWA_COLORKEY 0x00000001         //方式
            #define WS_EX_LAYERED 0x00080000 

            typedef BOOL (WINAPI *lpfnSetLayeredWindowAttributes)(HWND hWnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags); 
            lpfnSetLayeredWindowAttributes SetLayeredWindowAttributes; 

            //設(shè)置成邊緣透明 
            COLORREF maskColor=#000000;

            HMODULE hUser32 = GetModuleHandle("user32.dll"); //加載動(dòng)態(tài)鏈接庫(kù)
            SetLayeredWindowAttributes = (lpfnSetLayeredWindowAttributes)GetProcAddress(hUser32,"SetLayeredWindowAttributes"); 

            //取得SetLayeredWindowAttributes函數(shù)指針 
            //為窗口加入WS_EX_LAYERED擴(kuò)展屬性
            SetWindowLong(this->GetSafeHwnd(), GWL_EXSTYLE, GetWindowLong(GetSafeHwnd(), GWL_EXSTYLE)^WS_EX_LAYERED); 

            //調(diào)用SetLayeredWinowAttributes函數(shù)
            SetLayeredWindowAttributes(this->GetSafeHwnd(), maskColor, 192, LWA_COLORKEY); 

            FreeLibrary(hUser32);   //釋放動(dòng)態(tài)鏈接庫(kù)

            以上代碼加入OnInitDialog()中,其中 SetLayeredWindowAttributes(this->GetSafeHwnd(), maskColor, 192, LWA_COLORKEY); 里,maskColor為將進(jìn)行透明處理的顏色, 192為透明度, LWA_COLORKEY為透明方式。

            若要透明整個(gè)對(duì)話框,則LWA_COLORKEY=2;
            若要對(duì)選定顏色透明,則LWA_COLORKEY=1;
               
            本文轉(zhuǎn)自:http://chenjiuliang.blog.163.com/blog/static/36572155201151735735374/
            posted @ 2013-05-29 11:18 王海光 閱讀(1760) | 評(píng)論 (0)編輯 收藏
            1、導(dǎo)入Bitmap資源圖片,
            2、重載WM_PAINT ——>void CXXXDlg::OnPaint()
            3、添加如下代碼:
                CRect   rect;   
                GetClientRect(&rect);   
                CDC   dcMem;   
                dcMem.CreateCompatibleDC(&dc);   
                CBitmap   bmpBackground;   
                bmpBackground.LoadBitmap(IDB_BITMAP_TOOL);   //IDB_BITMAP_TOOL是你自己的圖對(duì)應(yīng)的ID 

                BITMAP   bitmap;   
                bmpBackground.GetBitmap(&bitmap);   
                CBitmap   *pbmpOld=dcMem.SelectObject(&bmpBackground);   
                dc.StretchBlt(0,0,rect.Width(),rect.Height(),&dcMem,0,0,   
                    bitmap.bmWidth,bitmap.bmHeight,SRCCOPY);   

            其他方法:
            重寫(xiě)WM_ERASEBKGND消息
            BOOL CxxDialog::OnEraseBkgnd(CDC* pDC) 
            {
               // CDialog::OnEraseBkgnd(pDC);//忘記要不要執(zhí)行父類(lèi)的這個(gè)了.
                CDC  memdc;
                memdc.CreateCompatibleDC(pDC);
                CBitmap bmp;
                CBitmap *pOldBmp;
                BITMAP bm;//用來(lái)保存圖片的長(zhǎng)寬等信息

                bmp.LoadBitmap(IDB_BITMAP1);
                bmp.GetBitmap(&bm);

                //將圖片選進(jìn)緩沖區(qū)
                pOldBmp = (CBitmap *)memdc.SelectObject(&bmp);

                //如果圖片跟對(duì)話框的客戶(hù)區(qū)一樣大,直接用BitBlt就可以
                
            //pDC->BitBlt(0, 0, rcWnd.Width(), rcWnd.Height(), &memdc, 0, 0, SRCCOPY);

                
            //如果圖片比對(duì)話框的背景小,就要用StrechBlt來(lái)拉伸圖片
                pDC->StrechBlt(0, 0, rcWnd.Width, rcWnd.Height(), &memdc, 0, 0, bm.bmWidth,bm.bmHeight, SRCCOPY);

               //釋放DC
                memdc.SelectObject(pOldBmp);
                memdc.DeleteDC();

                return TRUE; 
            }

            其他方法:
            http://blog.csdn.net/ply421600/article/details/6692967
            posted @ 2013-05-29 11:02 王海光 閱讀(3650) | 評(píng)論 (1)編輯 收藏
                 摘要: 1、NameNode啟動(dòng)加載元數(shù)據(jù)情景分析
            NameNode函數(shù)里調(diào)用FSNamesystemm讀取dfs.namenode.name.dir和dfs.namenode.edits.dir構(gòu)建FSDirectory。
            FSImage類(lèi)recoverTransitionRead和saveNameSpace分別實(shí)現(xiàn)了元數(shù)據(jù)的檢查、加載、內(nèi)存合并和元數(shù)據(jù)的持久化存儲(chǔ)。
            saveNameSpace將元數(shù)據(jù)寫(xiě)入到磁盤(pán),具體操作步驟:首先將current目錄重命名為lastcheckpoint.tmp;然后在創(chuàng)建新的current目錄,并保存文件;最后將lastcheckpoint.tmp重命名為privios.checkpoint.
            checkPoint的過(guò)程:Secondary NameNode會(huì)通知nameNode產(chǎn)生一個(gè)edit log文件edits.new,之后所有的日志操作寫(xiě)入到edits.new文件中。接下來(lái)Secondary NameNode會(huì)從namenode下載fsimage和edits文件,進(jìn)行合并產(chǎn)生新的fsimage.ckpt;然后Seco  閱讀全文
            posted @ 2013-05-24 15:29 王海光 閱讀(470) | 評(píng)論 (0)編輯 收藏
                 摘要: 1、元數(shù)據(jù)(Metadata):維護(hù)HDFS文件系統(tǒng)中文件和目錄的信息,分為內(nèi)存元數(shù)據(jù)和元數(shù)據(jù)文件兩種。NameNode維護(hù)整個(gè)元數(shù)據(jù)。  閱讀全文
            posted @ 2013-05-24 15:18 王海光 閱讀(1015) | 評(píng)論 (0)編輯 收藏
            1、今天調(diào)試一個(gè)demo,發(fā)現(xiàn)如下錯(cuò)誤。

            1>  系統(tǒng)找不到指定的文件。
            1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: The command "copy D:\WL_SDK_LAN_C++_20130521\demo\c++\Debug\Sample.exe D:\YuanTuo_1\wulianSDK\wulian_sdk_sample\SDK\Sample.exe
            1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :VCEnd" exited with code 1.

            可以修改下面屬性:


             

            2、VS2010編譯錯(cuò)誤:

            fatal error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x

            fatal error C1189: #error :  This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher is recommended.


            下面是徹底解決方法:
            在工程的stdafx.h中添加(如有類(lèi)似語(yǔ)句,需注釋掉)
            #ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.
            #define WINVER 0x0501 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
            #endif

            #ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later.
            #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
            #endif

            #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
            #define _WIN32_WINDOWS 0x0501 // Change this to the appropriate value to target Windows Me or later.
            #endif

            #ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
            #define _WIN32_IE 0x0601 // Change this to the appropriate value to target IE 5.0 or later.
            #endif
            posted @ 2013-05-22 17:57 王海光 閱讀(3302) | 評(píng)論 (0)編輯 收藏
            默認(rèn)情況下,Windows的Notepad把文件保存為ANSI格式,在這種情況,設(shè)定不同encoding有不同的結(jié)果:
               encoding="GB2312" ,正常顯示;
               encoding="UTF-8"   ,出錯(cuò),提示文本內(nèi)容中發(fā)現(xiàn)無(wú)效字符 ;

            把xml文件在notepad另包存為UTF-8格式,
               encoding="GB2312" ,出錯(cuò),提示不支持從當(dāng)前編碼到指定編碼的切換;
               encoding="UTF-8"   ,正常;
            例外:不設(shè)置encoding的值,默認(rèn)就是UTF-8,所以把這種情況歸入U(xiǎn)TF-8的情況.
            posted @ 2013-05-22 15:24 王海光 閱讀(410) | 評(píng)論 (0)編輯 收藏
                 摘要: 如何復(fù)制第5行到第10行并粘貼到第12行之后?方法1: 光標(biāo)放到第五行, 輸入:y6y 光標(biāo)放到第12行, 輸入:p 方法2: 命令行模式下輸入 :5,10 co 12 方法3: 我一般都是 先移到第五行 d6 p 再移到12行  p 延伸一下, 有時(shí)候不想費(fèi)勁看多少行或復(fù)制大量行時(shí),可以使用標(biāo)簽來(lái)替代 光標(biāo)移到起始行,輸入ma 光標(biāo)移到結(jié)束行,輸入mb 光標(biāo)移到粘貼行,輸入mc...  閱讀全文
            posted @ 2013-05-09 09:44 王海光 閱讀(3156) | 評(píng)論 (0)編輯 收藏
                 摘要:  Ctrl+Alt+F7和startx 進(jìn)入圖形界面 cat /etc/issue      查看ubuntu版本號(hào) cat /etc/lsb-release 查看ubuntu版本號(hào) uname –a 或uname -r查看內(nèi)核版本  top      查看CPU和內(nèi)存...  閱讀全文
            posted @ 2013-05-06 16:29 王海光 閱讀(512) | 評(píng)論 (0)編輯 收藏
                 摘要: 本人用的版本:ubuntu10.04 .4,hadoop 1.0.4最近一直在自學(xué)Hadoop,今天花點(diǎn)時(shí)間搭建一個(gè)開(kāi)發(fā)環(huán)境,并整理成文。首先要了解一下Hadoop的運(yùn)行模式:?jiǎn)螜C(jī)模式(standalone)       單機(jī)模式是Hadoop的默認(rèn)模式。當(dāng)首次解壓Hadoop的源碼包時(shí),Hadoop無(wú)法了解硬件安裝環(huán)境,便保守地選擇了最小配置。在這種默認(rèn)模...  閱讀全文
            posted @ 2013-05-06 15:14 王海光 閱讀(604) | 評(píng)論 (0)編輯 收藏
            僅列出標(biāo)題
            共27頁(yè): First 4 5 6 7 8 9 10 11 12 Last 
            色欲综合久久中文字幕网| 亚洲va久久久久| 久久久久久久久久久久中文字幕| 亚洲国产欧洲综合997久久| 人妻无码αv中文字幕久久| 国产精品免费福利久久| 国产99久久久国产精免费| 亚洲а∨天堂久久精品9966| 久久精品中文字幕无码绿巨人| 久久精品9988| 国产精品成人久久久| 久久久久久久97| 无码人妻久久一区二区三区蜜桃| 久久亚洲欧美国产精品| 久久涩综合| 99久久99这里只有免费的精品| 久久综合亚洲色HEZYO国产| 久久久久亚洲av无码专区| 四虎国产精品成人免费久久| 国产成人久久激情91| 久久精品国产亚洲AV蜜臀色欲| 国产高清美女一级a毛片久久w | 精品久久综合1区2区3区激情| 色综合久久88色综合天天 | 久久99国产亚洲高清观看首页 | 国产精品无码久久久久久| 国产精品久久久久久久久软件| 99久久亚洲综合精品网站| 久久精品无码午夜福利理论片| 亚洲伊人久久综合中文成人网| 久久精品国产只有精品2020| 色综合久久久久无码专区 | 一本久久综合亚洲鲁鲁五月天亚洲欧美一区二区 | 久久精品国产亚洲麻豆| 欧美熟妇另类久久久久久不卡| 亚洲七七久久精品中文国产| 久久久久久亚洲精品无码| 久久艹国产| 国产精品gz久久久| 亚洲精品乱码久久久久久按摩 | 人妻中文久久久久|