Click here to Skip to main content
15,881,204 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: add skin to my dialog Pin
Rajesh R Subramanian11-Oct-09 5:44
professionalRajesh R Subramanian11-Oct-09 5:44 
Questionthe skin of the point cloud from top view in C++ Pin
cstic10-Oct-09 11:22
cstic10-Oct-09 11:22 
AnswerRe: the skin of the point cloud from top view in C++ Pin
Richard MacCutchan10-Oct-09 21:36
mveRichard MacCutchan10-Oct-09 21:36 
QuestionHow to monitore idle time when minimized Pin
Daniel Kamisnki10-Oct-09 11:21
Daniel Kamisnki10-Oct-09 11:21 
AnswerRe: How to monitore idle time when minimized Pin
Randor 10-Oct-09 11:43
professional Randor 10-Oct-09 11:43 
GeneralRe: How to monitore idle time when minimized Pin
kilt13-Oct-09 2:30
kilt13-Oct-09 2:30 
GeneralRe: How to monitore idle time when minimized Pin
Randor 13-Oct-09 5:13
professional Randor 13-Oct-09 5:13 
Questionhow to caputure scrollview including unvisible area? Pin
rambojanggoon10-Oct-09 4:12
rambojanggoon10-Oct-09 4:12 
Hi,

I'd like to how caputre scrollview area, incluing unvisible area...
scrollview size is nomally big than actually monito's resoluton, unvisible area don't captured...



CRect rect;
HWND    hWnd = m_hWnd; // m_hWnd is hanle of scrollview.
if (hWnd == NULL) return;

HDC hScrollView = ::GetWindowDC(hWnd);
HDC hCaptureDC = CreateCompatibleDC(hScrollView);

CRect m_rDrawingSurface;
::GetWindowRect(hWnd,&m_rDrawingSurface);

BITMAPINFOHEADER BMIH;
HBITMAP m_hCaptureBitmap;
BYTE* m_pDrawingSurfaceBits;

CDC* pDC = GetDC();
if(pDC != NULL)
{
    BMIH.biSize = sizeof(BITMAPINFOHEADER);
    BMIH.biBitCount = 24;
    BMIH.biPlanes = 1;
    BMIH.biCompression = BI_RGB;
    BMIH.biWidth = m_rDrawingSurface.Width();
    BMIH.biHeight = m_rDrawingSurface.Height();
    BMIH.biSizeImage = ((((BMIH.biWidth * BMIH.biBitCount) + 31) & ~31) >> 3) * BMIH.biHeight;
    m_hCaptureBitmap = CreateDIBSection(pDC->GetSafeHdc(), (CONST BITMAPINFO*)&BMIH, DIB_RGB_COLORS, (void**)&m_pDrawingSurfaceBits, NULL, 0);
    ReleaseDC(pDC);
}

SelectObject(hCaptureDC,m_hCaptureBitmap);
BitBlt(hCaptureDC,
    0,
    0,
    m_rDrawingSurface.Width(),
    m_rDrawingSurface.Height(),
    hScrollView,0, 0,SRCCOPY|CAPTUREBLT);

CxImage *image = new CxImage();
if(m_hCaptureBitmap)
{
    image->CreateFromHBITMAP(m_hCaptureBitmap);
    bool retval;

    retval = image->Save("c:\\ss.bmp", CXIMAGE_FORMAT_JPG);
}
if (image) delete image;



::ReleaseDC(hWnd,hDesktopDC);
DeleteDC(hCaptureDC);
DeleteObject(m_hCaptureBitmap); :)

QuestionHow can i implement Smart card . Pin
tanukochhar1810-Oct-09 2:31
tanukochhar1810-Oct-09 2:31 
AnswerRe: How can i implement Smart card . Pin
Randor 10-Oct-09 11:39
professional Randor 10-Oct-09 11:39 
QuestionPicture control not refresh in CPropertySheet Pin
Le@rner10-Oct-09 1:40
Le@rner10-Oct-09 1:40 
AnswerRe: Picture control not refresh in CPropertySheet Pin
David Crow10-Oct-09 4:27
David Crow10-Oct-09 4:27 
AnswerRe: Picture control not refresh in CPropertySheet Pin
wangningyu11-Oct-09 4:26
wangningyu11-Oct-09 4:26 
QuestionClass Object Pin
john56329-Oct-09 23:13
john56329-Oct-09 23:13 
AnswerRe: Class Object Pin
Rajesh R Subramanian9-Oct-09 23:21
professionalRajesh R Subramanian9-Oct-09 23:21 
AnswerRe: Class Object Pin
Stuart Dootson10-Oct-09 0:00
professionalStuart Dootson10-Oct-09 0:00 
AnswerRe: Class Object Pin
CPallini10-Oct-09 1:19
mveCPallini10-Oct-09 1:19 
GeneralRe: Class Object Pin
santhosh-padamatinti10-Oct-09 19:39
santhosh-padamatinti10-Oct-09 19:39 
QuestionRe: Class Object Pin
CPallini10-Oct-09 21:12
mveCPallini10-Oct-09 21:12 
QuestionArranging the dialogs Pin
Elsie9-Oct-09 23:03
Elsie9-Oct-09 23:03 
AnswerRe: Arranging the dialogs Pin
Richard MacCutchan10-Oct-09 2:28
mveRichard MacCutchan10-Oct-09 2:28 
AnswerRe: Arranging the dialogs Pin
wangningyu10-Oct-09 22:14
wangningyu10-Oct-09 22:14 
QuestionSetWaitableTimer's absolute time? Pin
iceman86169-Oct-09 22:18
iceman86169-Oct-09 22:18 
AnswerRe: SetWaitableTimer's absolute time? Pin
«_Superman_»10-Oct-09 10:31
professional«_Superman_»10-Oct-09 10:31 
GeneralRe: SetWaitableTimer's absolute time? Pin
kilt13-Oct-09 2:31
kilt13-Oct-09 2:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.