コード例 #1
0
ファイル: ChmEngine.cpp プロジェクト: Livit/moonpdf
RenderedBitmap *ChmEngineImpl::CreateThumbnail(SizeI size)
{
    RenderedBitmap *bmp = NULL;
    // We render twice the size of thumbnail and scale it down
    RectI area(0, 0, size.dx * 2, size.dy * 2);

    // reusing WC_STATIC. I don't think exact class matters (WndProc
    // will be taken over by HtmlWindow anyway) but it can't be NULL.
    int winDx = area.dx + GetSystemMetrics(SM_CXVSCROLL);
    int winDy = area.dy + GetSystemMetrics(SM_CYHSCROLL);
    HWND hwnd = CreateWindow(WC_STATIC, L"BrowserCapture", WS_POPUP,
                             0, 0, winDx, winDy, NULL, NULL, NULL, NULL);
    if (!hwnd)
        return NULL;

#if 0 // when debugging set to 1 to see the window
    ShowWindow(hwnd, SW_SHOW);
#endif
    SetParentHwnd(hwnd);
    DisplayPage(1);
    if (!htmlWindow || !htmlWindow->WaitUntilLoaded(5 * 1000))
        goto Exit;
    HBITMAP hbmp = htmlWindow->TakeScreenshot(area, size);
    if (!hbmp)
        goto Exit;
    bmp = new RenderedBitmap(hbmp, size);

Exit:
    DestroyWindow(hwnd);
    return bmp;
}
コード例 #2
0
ファイル: ModifyMemoryDlg.cpp プロジェクト: layerfsd/Work
// -----------------------------------------------------------//
// Function:    CModifyMemoryDlg::InitInfo
// Param                
// Return  :    void   
// meaning :    ���n���M��
// -----------------------------------------------------------//
void   CModifyMemoryDlg::InitInfo()
{   
    // �񏡖{�����I�܌�
    ImproveTokenPrivilege();
    SetParentHwnd(m_hWnd);

    //ProcessList
    m_ProcessList.InsertColumn(0, "Name", LVCFMT_LEFT, 100);
    m_ProcessList.InsertColumn(1, "ProcessID", LVCFMT_LEFT, 100);
    m_ProcessList.InsertColumn(2, "ParenetPrcessID", LVCFMT_LEFT, 100);
    m_ProcessList.InsertColumn(3, "ModuleID", LVCFMT_LEFT, 100);
    m_ProcessList.InsertColumn(4, "ThreadCount", LVCFMT_LEFT, 100);
    m_ProcessList.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);
    // �񎟊l��Process�M��
    GetProcessInfo();
    // DataType
    m_CmbDataType.AddString(_T("BYTE(1����)"));
    m_CmbDataType.AddString(_T("SHORT(2����)"));
    m_CmbDataType.AddString(_T("INT(4����)"));
    m_CmbDataType.AddString(_T("FLOAT(4���ߕ��y�^)"));
    m_CmbDataType.AddString(_T("DOUBLE(8���ߕ��y�^)"));
    m_CmbDataType.AddString(_T("������"));
    m_CmbDataType.SetCurSel(0);
}