Click here to Skip to main content
15,913,199 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CMenu question Pin
ldsdbomber24-May-07 23:10
ldsdbomber24-May-07 23:10 
GeneralRe: CMenu question Pin
Naveen24-May-07 23:24
Naveen24-May-07 23:24 
GeneralRe: CMenu question Pin
ldsdbomber24-May-07 23:56
ldsdbomber24-May-07 23:56 
QuestionHooking menu items disabled... Pin
Fuzzychaos24-May-07 22:17
Fuzzychaos24-May-07 22:17 
QuestionShow DIB Pin
kcynic24-May-07 22:15
kcynic24-May-07 22:15 
AnswerRe: Show DIB Pin
Nelek25-May-07 0:46
protectorNelek25-May-07 0:46 
GeneralRe: Show DIB Pin
kcynic25-May-07 1:55
kcynic25-May-07 1:55 
AnswerRe: Show DIB Pin
Mark Salsbery25-May-07 5:57
Mark Salsbery25-May-07 5:57 
That mode is supported on pretty much all video capture drivers.

An example how to set that mode:

LONG lWidth = 176
LONG lHeight = 144;
WORD wBitsPerPixel = 24;
 
BITMAPINFO BitmapInfo;
memset(&BitmapInfo, 0, sizeof(BITMAPINFO));
BitmapInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); 
BitmapInfo.bmiHeader.biWidth = lWidth; 
BitmapInfo.bmiHeader.biHeight = lHeight; 
BitmapInfo.bmiHeader.biPlanes = 1; 
BitmapInfo.bmiHeader.biBitCount = wBitsPerPixel; 
BitmapInfo.bmiHeader.biCompression = BI_RGB; 
BitmapInfo.bmiHeader.biSizeImage = (DWORD)((((lWidth * (long)wBitsPerPixel + 31L) & (~31L)) / 8L) * lHeight); 
//BitmapInfo.bmiHeader.biXPelsPerMeter = ; 
//BitmapInfo.bmiHeader.biYPelsPerMeter = ; 
//BitmapInfo.bmiHeader.biClrUsed = ; 
//BitmapInfo.bmiHeader.biClrImportant = ; 
 
capSetVideoFormat(m_capwnd, &BitmapInfo, sizeof(BITMAPINFO));

To display an image (or a video frame) in that format, the easiest way is with a StretchDIBits.

You have the format (BITMAPINFO) - all you need to do is call StretchDIBits passing as the lpBits
parameter a pointer to the bitmap/video frame pixel data.

Mark


"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

GeneralRe: Show DIB Pin
kcynic25-May-07 12:15
kcynic25-May-07 12:15 
GeneralRe: Show DIB Pin
Mark Salsbery25-May-07 12:22
Mark Salsbery25-May-07 12:22 
GeneralRe: Show DIB Pin
kcynic25-May-07 13:35
kcynic25-May-07 13:35 
GeneralRe: Show DIB Pin
Mark Salsbery25-May-07 13:38
Mark Salsbery25-May-07 13:38 
GeneralRe: Show DIB Pin
kcynic25-May-07 16:58
kcynic25-May-07 16:58 
GeneralRe: Show DIB Pin
Mark Salsbery26-May-07 6:15
Mark Salsbery26-May-07 6:15 
QuestionHow to know the size of string by use new expression created Pin
hanlei000000000924-May-07 22:01
hanlei000000000924-May-07 22:01 
AnswerRe: How to know the size of string by use new expression created Pin
Naveen24-May-07 22:03
Naveen24-May-07 22:03 
GeneralRe: How to know the size of string by use new expression created Pin
Stephen Hewitt24-May-07 22:20
Stephen Hewitt24-May-07 22:20 
GeneralRe: How to know the size of string by use new expression created Pin
Naveen24-May-07 22:40
Naveen24-May-07 22:40 
GeneralRe: How to know the size of string by use new expression created Pin
David Crow25-May-07 4:44
David Crow25-May-07 4:44 
GeneralRe: How to know the size of string by use new expression created Pin
Stephen Hewitt27-May-07 14:36
Stephen Hewitt27-May-07 14:36 
GeneralRe: How to know the size of string by use new expression created Pin
Naveen27-May-07 14:53
Naveen27-May-07 14:53 
GeneralRe: How to know the size of string by use new expression created Pin
Stephen Hewitt27-May-07 14:56
Stephen Hewitt27-May-07 14:56 
AnswerRe: How to know the size of string by use new expression created Pin
Cedric Moonen24-May-07 22:07
Cedric Moonen24-May-07 22:07 
AnswerThanks all Pin
hanlei000000000924-May-07 22:58
hanlei000000000924-May-07 22:58 
AnswerRe: How to know the size of string by use new expression created Pin
David Crow25-May-07 4:47
David Crow25-May-07 4:47 

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.