Click here to Skip to main content
15,912,069 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to inherit a MFC class. Pin
chaitannya_m13-Jul-07 0:07
chaitannya_m13-Jul-07 0:07 
GeneralRe: How to inherit a MFC class. Pin
sps-itsec4613-Jul-07 1:18
sps-itsec4613-Jul-07 1:18 
AnswerRe: How to inherit a MFC class. Pin
Sam_c12-Jul-07 22:47
Sam_c12-Jul-07 22:47 
AnswerRe: How to inherit a MFC class. Pin
jhwurmbach12-Jul-07 23:11
jhwurmbach12-Jul-07 23:11 
QuestionI am getting 'ICaptureGraphBuilder2' : missing storage-class or type specifiers Pin
yaminisridaran12-Jul-07 19:43
yaminisridaran12-Jul-07 19:43 
AnswerRe: I am getting 'ICaptureGraphBuilder2' : missing storage-class or type specifiers Pin
liur1712-Jul-07 20:00
liur1712-Jul-07 20:00 
GeneralRe: I am getting 'ICaptureGraphBuilder2' : missing storage-class or type specifiers Pin
yaminisridaran12-Jul-07 20:26
yaminisridaran12-Jul-07 20:26 
GeneralRe: I am getting 'ICaptureGraphBuilder2' : missing storage-class or type specifiers Pin
liur1712-Jul-07 21:07
liur1712-Jul-07 21:07 
I wrote below function in VC6 one year ago, maybe it can give you some hints.

BOOL CMyClass::CaptureImage(LPCSTR szFileName)
{
if (pVMRWindowlessControl== NULL)
return FALSE;

BYTE* lpImage = NULL;
if (pVMRWindowlessControl->GetCurrentImage(&lpImage) == S_OK)
{
BITMAPFILEHEADER hdr;
DWORD dwSize, dwWritten;
LPBITMAPINFOHEADER pDib = (LPBITMAPINFOHEADER)lpImage;

//创建文件供写入
HANDLE hFile = CreateFile(szFileName, GENERIC_WRITE, FILE_SHARE_READ,
NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);

if (hFile == INVALID_HANDLE_VALUE)
return FALSE;

//初始化BITMAP文件头
dwSize = DibSizeImage(pDib);
hdr.bfType = BFT_BITMAP;
hdr.bfSize = dwSize + sizeof(BITMAPFILEHEADER);
hdr.bfReserved1 = 0;
hdr.bfReserved2 = 0;
hdr.bfOffBits = (DWORD)sizeof(BITMAPFILEHEADER) + pDib->biSize + DibPaletteSize(pDib);

//写入文件头及内容
WriteFile(hFile, (LPCVOID)&hdr, sizeof(BITMAPFILEHEADER), &dwWritten, 0);
WriteFile(hFile, (LPCVOID)pDib, dwSize, &dwWritten, 0);

CloseHandle(hFile);
CoTaskMemFree(lpImage);

}

return TRUE;

}
GeneralRe: I am getting 'ICaptureGraphBuilder2' : missing storage-class or type specifiers Pin
yaminisridaran12-Jul-07 21:13
yaminisridaran12-Jul-07 21:13 
Question::BringWindowToTop() Pin
vicky0000012-Jul-07 18:40
vicky0000012-Jul-07 18:40 
AnswerRe: ::BringWindowToTop() Pin
Rage12-Jul-07 21:08
professionalRage12-Jul-07 21:08 
QuestionRe: ::BringWindowToTop() Pin
David Crow13-Jul-07 4:34
David Crow13-Jul-07 4:34 
QuestionWinExec() Function Pin
santhoshv8412-Jul-07 18:27
santhoshv8412-Jul-07 18:27 
AnswerRe: WinExec() Function Pin
Paresh Chitte12-Jul-07 19:36
Paresh Chitte12-Jul-07 19:36 
GeneralRe: WinExec() Function Pin
santhoshv8412-Jul-07 20:28
santhoshv8412-Jul-07 20:28 
GeneralRe: WinExec() Function Pin
Paresh Chitte12-Jul-07 20:34
Paresh Chitte12-Jul-07 20:34 
GeneralRe: WinExec() Function Pin
santhoshv8412-Jul-07 20:54
santhoshv8412-Jul-07 20:54 
AnswerRe: WinExec() Function Pin
Perspx12-Jul-07 19:42
Perspx12-Jul-07 19:42 
GeneralRe: WinExec() Function Pin
santhoshv8412-Jul-07 20:25
santhoshv8412-Jul-07 20:25 
GeneralRe: WinExec() Function Pin
Optimus Chaos12-Jul-07 20:44
Optimus Chaos12-Jul-07 20:44 
GeneralRe: WinExec() Function Pin
zhang80060512-Jul-07 21:01
zhang80060512-Jul-07 21:01 
GeneralRe: WinExec() Function Pin
santhoshv8412-Jul-07 21:17
santhoshv8412-Jul-07 21:17 
AnswerRe: WinExec() Function Pin
Hamid_RT13-Jul-07 2:20
Hamid_RT13-Jul-07 2:20 
AnswerRe: WinExec() Function Pin
David Crow13-Jul-07 4:36
David Crow13-Jul-07 4:36 
Questioncan't get pin category property Pin
liur1712-Jul-07 17:00
liur1712-Jul-07 17:00 

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.