WNDCLASS 的用法

WNDCLASS wndclass;

wndclass.style = 0;
wndclass.lpfnWndProc = ClientConnection::WndProcTBwin;
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hInstance = m_pApp->m_instance;
wndclass.hIcon = LoadIcon(m_pApp->m_instance, MAKEINTRESOURCE(IDR_TRAY));
switch (m_opts.m_localCursor) {
case NOCURSOR:
wndclass.hCursor = LoadCursor(m_pApp->m_instance, MAKEINTRESOURCE(IDC_NOCURSOR));
break;
case NORMALCURSOR:
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
break;
case DOTCURSOR:
default:
wndclass.hCursor = LoadCursor(m_pApp->m_instance, MAKEINTRESOURCE(IDC_DOTCURSOR));
}
//wndclass.hbrBackground = (HBRUSH) GetStockObject(BLACK_BRUSH);
wndclass.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1);
wndclass.lpszMenuName = (const TCHAR *) NULL;
wndclass.lpszClassName = VWR_WND_CLASS_NAME;

RegisterClass(&wndclass);

posted on 2012-12-08 15:30  GIS-MAN  阅读(1463)  评论(0编辑  收藏  举报

导航