代码替换:
/////////////////////////
LPCTSTR m_lpszCN;
m_lpszCN = AfxRegisterWndClass(CS_BYTEALIGNCLIENT,
::LoadCursor(AfxGetResourceHandle(),
MAKEINTRESOURCE(IDC_NULLCORSOR)));
return CWnd::CreateEx(WS_EX_TOPMOST,m_lpszCN, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
//////////////////////////
7: 删除CF1App:: InitInstance()中#endif以后的所有代码,用以下代码代替:
///////////////////////////
int cx=GetSystemMetrics(SM_CXSCREEN);
int cy=GetSystemMetrics(SM_CYSCREEN);
CRect rectDefault(0,0,cx,cy);
m_pMainWnd=new CW();
m_pMainWnd->Create(NULL, _T("Hello World!"), WS_VISIBLE|WS_POPUP, rectDefault,NULL,NULL);
return TRUE;
///////////////////////////
8:在CW::OnCreate()函数中加入如下代码:
/////////////////////////////
counter=0;
int cx=GetSystemMetrics(SM_CXSCREEN);
int cy=GetSystemMetrics(SM_CYSCREEN);
x_offset=(cx-640)/2;
y_offset=(cy-400)/2;
/////////////////////////////
9: 在CW::OnDestroy()函数中加入如下代码:
////////////////////////////////
KillTimer(1);
GlobalFree(hlb1);
GlobalFree(hlb2);
GlobalFree(hlb3);
/////////////////////////////
10: 在CW:: OnLButtonDown()函数中加入如下代码:
//////////////////////////////
SendMessage(WM_CLOSE);
//////////////////////////////
11: 在CW:: OnLButtonDown()函数中加入如下代码:
/////////////////////////////
CPaintDC dc(this);
dc.FillSolidRect(0,0,800,600,RGB(0,0,0));
dc.SetTextColor(RGB(200,0,0));
if(!start) return;
CFile f1,f2;
f1.Open("bmp1.bmp",CFile::modeRead);
f2.Open("bmp2.bmp",CFile::modeRead);
f1.Seek(14,CFile::begin);
f1.Read(&header,40);
f2.Seek(54,CFile::begin);
hlb1=GlobalAlloc(GMEM_MOVEABLE,BMP_SIZE);
p1=(BYTE*)GlobalLock(hlb1);
p1=(BYTE*)malloc(BMP_SIZE);
f1.ReadHuge(p1,BMP_SIZE);
GlobalUnlock(hlb1);
hlb2=GlobalAlloc(GMEM_MOVEABLE,BMP_SIZE);
p2=(BYTE*)GlobalLock(hlb2);
f2.ReadHuge(p2,BMP_SIZE);
GlobalUnlock(hlb2);
hlb3=GlobalAlloc(GMEM_MOVEABLE,BMP_SIZE);
p3=(BYTE*)GlobalLock(hlb3);
GlobalUnlock(hlb3);
f