|
So what difficulties are you facing using the GrabFrame() and GetFrame() functions? Be specific about what you have tried and what you are trying to achieve.
|
|
|
|
|
please give me your email, I want to exchange on Email, to attach file
aloha
|
|
|
|
|
If you have a question post it here. There's no need to send me an e-mail.
|
|
|
|
|
I want code of ".OnCaptureImage" when insert button "Capture Image" on Dialog
aloha
|
|
|
|
|
You didn't answer my previous question. What difficulties are you facing with the GrabFrame() and GetFrame() functions? What have you written so far in your handler? Did you even look at his OnTimer handler?
|
|
|
|
|
I don't know useful of imagecapture() function, grabFrame() and GetFrame() are used for "Live Video" window
aloha
|
|
|
|
|
You still aren't answering my questions. And I still don't know what the problem is nor what you are trying to do.
The article presents a very unconventional way of capturing an image off a filter graph, and requires that a VMR video renderer be used. Depending on what you need, and what you can assume of the system it will be installed in, this may or may not be a good technique to use.
Ok how about this, you copy the OnTimer handler and put it in your handler.
DWORD dwSize;
dwSize=this->m_VMRCap.GrabFrame();
if(dwSize>0)
{
BYTE *pImage;
this->m_VMRCap.GetFrame (&pImage);
this->m_ctrlCaptureIMG .ShowImage (pImage);
}
|
|
|
|
|
void CDXCaptureDlg::OnCapImage()
{
DWORD dwSize;
dwSize=this->m_VMRCap.GrabFrame ();
if(dwSize>0)
{
BYTE *pImage;
this->m_VMRCap.GetFrame (&pImage);
this->m_ctrlCaptureIMG .ShowImage (pImage);
}
}
this code is used to capture a video, but I want to capture a bitmap
aloha
-- modified at 2:51 Tuesday 20th June, 2006
|
|
|
|
|
The code does not capture a video and I don't even know how you came to that conclusion. I would suggest you read the code and understand what is going on first. The code gets the current bitmap in the VMR renderer and ensures that it is in RGB24. pImage will end up as an array of RGBTRIPLEs that makes up the image. Note that he discards the bitmap header in GrabFrame() all you have is just the RGB24 data. If you want to create a HBITMAP with this, look up CreateDIBitmap on msdn.
|
|
|
|
|
Why are you posting here about a code guru article ? Code Guru should offer a place to post questions to the article author.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
OK, then he should ask in the forum for the article, if he wants to ask the author a question.
Or he should explain what he's doing in a more generic way, that doesn't reference the article, if he wants to ask for general help.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I posted this question on two forum "code project" and "code guru" because this article author posted the same .
aloha
|
|
|
|
|
Just because someone wrote an article does not mean they will read this forum on the day you happen to post a question. So, like I said, you need to either ask a generic question that does not refer to an article, or post the question in the forum for the article ( at the bottom of the article ) in order to generate an email that will alert the author, and then if the author is still supporting his articles, he will get back to you. So far, he probably doesn't even know that you asked a question.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I asked the author, but I don't know why doesn't reply so I posted on forum.If you are unpleasure, I'm sorry
aloha
|
|
|
|
|
To be frank, I really don't care, except that I'd like to see you get the help you need. If the author is not replying, then I'd try rewording the question so that it doesn't refer to the article and post it here again.
I'm sorry if you thought I was complaining, I was trying to direct you to where you'd be mostly likely to get the help you're wanting.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I'm sorry, I don't think you are complaining, thank for your direction
what's your nickname? I want to exchange on Yahoo Messenger
aloha
|
|
|
|
|
I don't have any messenger installed, sorry.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Can you help me to solve this problem?
aloha
|
|
|
|
|
_tcscpy and lstrcpy, both implement the same function, which one should I use if I want to copy a string in my project?
|
|
|
|
|
_UNICODE is not defined for this.
LPTSTR lstrcpy( LPTSTR lpString1,
LPTSTR lpString2
);
TCHAR is used to represent unicode strings.
So when you are working with unicode you should prefer TCHAR to LPTSTR
_TCHAR * _tcscpy(_TCHAR * to, const _TCHAR * from)
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
_AnShUmAn_ wrote: _UNICODE is not defined for this.
LPTSTR lstrcpy( LPTSTR lpString1,
LPTSTR lpString2
);
could you see LPTSTR lstrcpy( LPTSTR lpString1, ).. T in middle
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
_tcscpy is a CRT function while lstrcpy is a windows native function. It probably does not make a difference which you use, but _tcscpy is probably better for portability reasons.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
cgsp_wei wrote: _tcscpy
use C runtime Libarary
cgsp_wei wrote: lstrcpy
use Kernel32.dll..
IMHO, it better to use Window Based api!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
cgsp_wei wrote: _tcscpy and lstrcpy, both implement the same function, which one should I use if I want to copy a string in my project?
The lstrcpy function has an undefined behavior if source and destination buffers overlap.
Knock out 't' from can't,
You can if you think you can
|
|
|
|