VC++面向对象和可视化程序设计VC_08.ppt

第8章 Windows 标准控件 Huang Weitong if( !RegisterClass( wndclass)) { MessageBeep(0) ; return FALSE ; } hInst=hInstance; hwnd = CreateWindow() ; hBm=LoadBitmap(hInst,Internet_Wall); //加载位图资源 GetObject( hBm,sizeof(BITMAP),(LPVOID)bm);//获取位图信息 sprintf(lpszText,该位图高度为%d,宽度为%d。, bm.bmHeight,bm.bmWidth); ShowWindow( hwnd, nCmdShow) ; UpdateWindow(hwnd); while( GetMessage(Msg, NULL, 0, 0)) { TranslateMessage( Msg) ; DispatchMessage( Msg) ; } return Msg.wParam; } LRESULT CALLBACK WndProc() {switch(message) {case WM_CREATE: //创建位图静态控件 hwndStatic=CreateWindow(lpszClas

文档评论(0)

1亿VIP精品文档

相关文档