2014年2月12日		  
	#
		
			
			
			Effecitve STL 中第 21条: 永远让比较函数对相同元素返回false
			
			
		 
	
	
		
	2013年11月15日		  
	#
		
			
			
			IS 2009解决办法
Installation Designer-Installation Infomation-General Infomation-Summary Infomation Stream- Template Summary
将默认的Intel改为Intel64或者AMD64
			
			
		
 
	
	
		
	2013年11月12日		  
	#
		
			
			
			1. 关联:注册表[HKEY_CLASSES_ROOT]下新建主键“.xxx”,双击右侧其“默认”项,填入“myfiletype”。再在 [HKEY_CLASSES_ROOT]下新建主键“myfiletype”,在“myfiletype”下新建“shell”,在“shell”下新建 “open”,在“open”下新建“command”;双击“command”右侧的“默认”项填入你的程序路径和名字,如c:\mydir \myapp.exe   %1        
 2. 这样,双击*.xxx就会执行你的程序。在VC 中AfxGetApp()->m_lpCmdLine即可得到被双击的文件的文件名。     
 3. 在程序中得到文件名后,怎么操作就随你了。
			
			
		
 
	
	
		
	2013年7月17日		  
	#
		
			
			
			在多线程环境下,在调用
AfxGetMainWnd()
时常得到空值,这是需要改为调用
AfxGetApp()->m_pMainWnd
			
			
		 
	
	
		
	2010年7月8日		  
	#
		
			
			
			显示的位图显示的时候,色深是8的情况下,只有3通道的情况下不需要LUT表,其他情况都需要LUT表
 char     __bif[sizeof(BITMAPINFOHEADER)   +   sizeof(RGBQUAD)   *   256];
char     __bif[sizeof(BITMAPINFOHEADER)   +   sizeof(RGBQUAD)   *   256]; 
 BITMAPINFO&   bif   =   *(BITMAPINFO*)__bif;
    BITMAPINFO&   bif   =   *(BITMAPINFO*)__bif; 
 bif.bmiHeader.biSize   =   sizeof(BITMAPINFOHEADER);
    bif.bmiHeader.biSize   =   sizeof(BITMAPINFOHEADER); 
 bif.bmiHeader.biWidth   =   width;
    bif.bmiHeader.biWidth   =   width;   
 bif.bmiHeader.biHeight   =   height;
    bif.bmiHeader.biHeight   =   height;   
 bif.bmiHeader.biPlanes   =   1;
    bif.bmiHeader.biPlanes   =   1;   
 bif.bmiHeader.biBitCount   =   8;
    bif.bmiHeader.biBitCount   =   8; 
 bif.bmiHeader.biCompression   =   BI_RGB;
    bif.bmiHeader.biCompression   =   BI_RGB;   
 bif.bmiHeader.biSizeImage   =   0;
    bif.bmiHeader.biSizeImage   =   0;   
 bif.bmiHeader.biXPelsPerMeter   =   1;
    bif.bmiHeader.biXPelsPerMeter   =   1;   
 bif.bmiHeader.biYPelsPerMeter   =   1;
    bif.bmiHeader.biYPelsPerMeter   =   1;   
 bif.bmiHeader.biClrUsed   =   0;
    bif.bmiHeader.biClrUsed   =   0;   
 bif.bmiHeader.biClrImportant   =   0;
    bif.bmiHeader.biClrImportant   =   0;   
 for(int   i   =   0;   i   <   256;   ++i)
    for(int   i   =   0;   i   <   256;   ++i) 

 
     {
{ 
 int   b   =   i;
        int   b   =   i; 
 bif.bmiColors[i].rgbBlue   =   b;
        bif.bmiColors[i].rgbBlue   =   b; 
 bif.bmiColors[i].rgbGreen   =   b;
        bif.bmiColors[i].rgbGreen   =   b; 
 bif.bmiColors[i].rgbRed   =   b;
        bif.bmiColors[i].rgbRed   =   b; 
 bif.bmiColors[i].rgbReserved     =   0;
        bif.bmiColors[i].rgbReserved     =   0; 
 }
    } 
 SetStretchBltMode(hDC, COLORONCOLOR);
    SetStretchBltMode(hDC, COLORONCOLOR);
 StretchDIBits(hDC,   destRt.left,   destRt.top,   destRt.right - destRt.left, destRt.bottom - destRt.top,
    StretchDIBits(hDC,   destRt.left,   destRt.top,   destRt.right - destRt.left, destRt.bottom - destRt.top,   
 0,0,width,height,pImage,(BITMAPINFO*)&bif,   DIB_RGB_COLORS,   SRCCOPY);
              0,0,width,height,pImage,(BITMAPINFO*)&bif,   DIB_RGB_COLORS,   SRCCOPY); 
	
	
		
	2010年6月24日		  
	#
		
	
	
		
	2009年12月11日		  
	#
		
			
			
			前一阵子调试了一部分多线程程序。因为程序的运行周期比较短,而且运行的很频繁。所以很多朋友提到的用日志文件的办法不是很可行。没办法最后是一段一段的调试。
因为程序是多线程的,所以在debug的时候总是特别注意线程函数中的数据保护的工作,结果所有的数据都保护起来还是没有用。最后,开始怀疑线程信号源的问题。终于在去掉了信号源中的一个延时后,程序变得稳定了。
最后,通过catch到一个易出错的部分。查到其中存在static变量,去掉。终于稳定了。