本文整理汇总了C++中CAppModule::get_m_hInst方法的典型用法代码示例。如果您正苦于以下问题:C++ CAppModule::get_m_hInst方法的具体用法?C++ CAppModule::get_m_hInst怎么用?C++ CAppModule::get_m_hInst使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAppModule
的用法示例。
在下文中一共展示了CAppModule::get_m_hInst方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: splashCallback
LRESULT CALLBACK splashCallback(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
if (uMsg == WM_PAINT) {
// Get some information
HDC dc = GetDC(hwnd);
RECT rc;
GetWindowRect(hwnd, &rc);
OffsetRect(&rc, -rc.left, -rc.top);
RECT rc2 = rc;
rc2.top = rc2.bottom - 35;
rc2.right = rc2.right - 10;
::SetBkMode(dc, TRANSPARENT);
// Draw the icon
HBITMAP hi;
hi = (HBITMAP)LoadImage(_Module.get_m_hInst(), MAKEINTRESOURCE(IDB_SPLASH), IMAGE_BITMAP, 350, 120, LR_SHARED);
HDC comp=CreateCompatibleDC(dc);
SelectObject(comp,hi);
BitBlt(dc,0, 0 , 350, 120,comp,0,0,SRCCOPY);
DeleteObject(hi);
DeleteDC(comp);
LOGFONT logFont;
HFONT hFont;
GetObject(GetStockObject(DEFAULT_GUI_FONT), sizeof(logFont), &logFont);
lstrcpy(logFont.lfFaceName, TEXT("Tahoma"));
logFont.lfHeight = 15;
logFont.lfWeight = 700;
hFont = CreateFontIndirect(&logFont);
SelectObject(dc, hFont);
::SetTextColor(dc, RGB(255,255,255));
::DrawText(dc, sTitle.c_str(), _tcslen(sTitle.c_str()), &rc2, DT_RIGHT);
DeleteObject(hFont);
if(!sText.empty()) {
rc2 = rc;
rc2.top = rc2.bottom - 15;
GetObject(GetStockObject(DEFAULT_GUI_FONT), sizeof(logFont), &logFont);
lstrcpy(logFont.lfFaceName, TEXT("Tahoma"));
logFont.lfHeight = 12;
logFont.lfWeight = 700;
hFont = CreateFontIndirect(&logFont);
SelectObject(dc, hFont);
::SetTextColor(dc, RGB(255,255,255));
::DrawText(dc, (_T(".:: ") + sText + _T(" ::.")).c_str(), _tcslen((_T(".:: ") + sText + _T(" ::.")).c_str()), &rc2, DT_CENTER);
DeleteObject(hFont);
}
ReleaseDC(hwnd, dc);
}
return DefWindowProc(hwnd, uMsg, wParam, lParam);
}