Click here to Skip to main content
15,902,032 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionI want to know which os am using from C code.Is it is possible? Pin
mohant$.net15-Sep-09 2:20
mohant$.net15-Sep-09 2:20 
QuestionRe: I want to know which os am using from C code.Is it is possible? Pin
David Crow15-Sep-09 2:36
David Crow15-Sep-09 2:36 
JokeRe: I want to know which os am using from C code.Is it is possible? Pin
CPallini15-Sep-09 2:46
mveCPallini15-Sep-09 2:46 
GeneralRe: I want to know which os am using from C code.Is it is possible? Pin
mohant$.net15-Sep-09 3:17
mohant$.net15-Sep-09 3:17 
GeneralRe: I want to know which os am using from C code.Is it is possible? Pin
CPallini15-Sep-09 3:30
mveCPallini15-Sep-09 3:30 
GeneralRe: I want to know which os am using from C code.Is it is possible? Pin
Stuart Dootson15-Sep-09 7:07
professionalStuart Dootson15-Sep-09 7:07 
AnswerRe: I want to know which os am using from C code.Is it is possible? Pin
Moak15-Sep-09 23:26
Moak15-Sep-09 23:26 
QuestionGet pixel data from PBITMAPINFO struct? Pin
Sauce!15-Sep-09 2:15
Sauce!15-Sep-09 2:15 
I'm capturing image data from a webcam using a simple class found here[^].

CVFWCapture cap;
PBITMAPINFO pBitmap = NULL;
ULONG BitmapSize;

if(!cap.Initialize())
{
	MessageBox(NULL, _T("Failed to initialise capture device. Terminating."), _T("Error!"), MB_OK);
	return 0;
}

//Capture an image from the capture device.
if(!cap.CaptureDIB(&pBitmap, 0, &BitmapSize))
{
	MessageBox(NULL, _T("Failed to capture image from device. Terminating."), _T("Error!"), MB_OK);
	return 0;
}
else
{
	//Do something with pixel data.
}


With the above code, I get a PBITMAPINFO structure which contains all the header data of the file, but there's no way for me to access the pixel data from this struct (obviously the struct is the header of a bmp file only). Is there a function I can use to get a pointer to the pixel data from this struct? From the way the class was advertised in the article, I was under the impression this class is used to capture image data - surely there isn't much use in only being able to access header info... Am I wrong or am I just missing something?
AnswerRe: Get pixel data from PBITMAPINFO struct? [modified] Pin
CPallini15-Sep-09 2:31
mveCPallini15-Sep-09 2:31 
GeneralRe: Get pixel data from PBITMAPINFO struct? Pin
Sauce!15-Sep-09 2:58
Sauce!15-Sep-09 2:58 
QuestionMS Word document creating Pin
Igor IP15-Sep-09 1:41
professionalIgor IP15-Sep-09 1:41 
AnswerRe: MS Word document creating Pin
Stuart Dootson15-Sep-09 1:56
professionalStuart Dootson15-Sep-09 1:56 
GeneralRe: MS Word document creating Pin
Igor IP15-Sep-09 2:02
professionalIgor IP15-Sep-09 2:02 
GeneralRe: MS Word document creating Pin
Stuart Dootson15-Sep-09 2:36
professionalStuart Dootson15-Sep-09 2:36 
GeneralRe: MS Word document creating Pin
Igor IP15-Sep-09 3:48
professionalIgor IP15-Sep-09 3:48 
QuestionCDaoRecordset Problem.. Pin
jadhavjitendrar15-Sep-09 1:19
jadhavjitendrar15-Sep-09 1:19 
AnswerRe: CDaoRecordset Problem.. Pin
CPallini15-Sep-09 2:11
mveCPallini15-Sep-09 2:11 
AnswerRe: CDaoRecordset Problem.. Pin
ramana.g15-Sep-09 21:59
ramana.g15-Sep-09 21:59 
Question_variant_t to CString Pin
rdop15-Sep-09 0:05
rdop15-Sep-09 0:05 
AnswerRe: _variant_t to CString Pin
CPallini15-Sep-09 0:21
mveCPallini15-Sep-09 0:21 
GeneralRe: _variant_t to CString Pin
Stuart Dootson15-Sep-09 0:30
professionalStuart Dootson15-Sep-09 0:30 
QuestionRe: _variant_t to CString Pin
CPallini15-Sep-09 2:07
mveCPallini15-Sep-09 2:07 
AnswerRe: _variant_t to CString Pin
Stuart Dootson15-Sep-09 2:43
professionalStuart Dootson15-Sep-09 2:43 
GeneralRe: _variant_t to CString Pin
rdop15-Sep-09 0:33
rdop15-Sep-09 0:33 
QuestionRe: _variant_t to CString Pin
CPallini15-Sep-09 2:08
mveCPallini15-Sep-09 2:08 

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.