|
well.. one option is to develop it as an activex control, and use in browser. You may first make it as a stand alone application to refine the working, then convert it as activex. Google for samples, you will get like this.
|
|
|
|
|
ok ...
Do u mean that i have to create an activex probably a one for capturing frames and then add the activex to the browser or what exactly?$
I'm new to DirectShow and i'aint a wed developper.
could u explain more plz ?
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
yes, exactly. Using Directshow is easy to learn, and you shouldn't be a web developer to develop and test an activex control.
|
|
|
|
|
but how could i add an activex to a web page browser ?
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
|
I saw these lines in an example code. I am not clear about it.
CListVieiw::OnInitialUpdate();
CListCtrl & theCtrl = GetListCtrl();
My questions are
(1) Is GetListCtrl()( on the second line) a member function;Which class does it belong to?
(2) what does the '&' mean at the left hand side?
|
|
|
|
|
cy163@hotmail.com wrote: (1) Is GetListCtrl()( on the second line) a member function;Which class does it belong to?
See here.
cy163@hotmail.com wrote: (2) what does the '&' mean at the left hand side?
See here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Thank you DavidCrow for your reply.
I wonder what exactly is the role of GetListCtrl(); generate a instance of ListCtrl? or sth else?
|
|
|
|
|
cy163@hotmail.com wrote: I wonder what exactly is the role of GetListCtrl(); generate a instance of ListCtrl? or sth else?
To get a reference to the list control associated with the view.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Thanks again.
However, what if there are more than one list controls associated with the view.
|
|
|
|
|
cy163@hotmail.com wrote: However, what if there are more than one list controls associated with the view.
Then you'd have more than one view.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
You mean ONLY one ListCtrl can be associated with one view?
If so, Why there may be more than one ListCtrl in a dialog
Or, I misunderstand the view concept. I think a dialog essentially is a view.
|
|
|
|
|
cy163@hotmail.com wrote: You mean ONLY one ListCtrl can be associated with one view?
Yes, unless the view is a CFormView .
cy163@hotmail.com wrote: If so, Why there may be more than one ListCtrl in a dialog
Because a dialog is not a view.
cy163@hotmail.com wrote: Or, I misunderstand the view concept.
Perhaps. But, have no fear, there's plenty of online documentation/examples to help you out.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
If a view is drived from CFormView. How to distinguish between ListCtrls associated with it.
|
|
|
|
|
They each have a unique control ID, and thus a separate instance of CListCtrl .
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
So, for a view derived from a non CFormView, GetListCtrl is used to get the reference of the ListCtrl associated with it.
for a view derived from a CFormView, how to get the references of ListCtrls associated with it. What command should be used.
|
|
|
|
|
cy163@hotmail.com wrote: So, for a view derived from a non CFormView...
Specifically, a CListView .
cy163@hotmail.com wrote: for a view derived from a CFormView, how to get the references of ListCtrls associated with it.
Like a dialog, each control has a unique ID and its own control variable (e.g., CListCtrl ).
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
I am using VC 6.0. I would like to create a CFormView based project by using ClassWizard, so that I can see the following line in the CxxxxView class.
Class CxxxxView:CFormView
{
....
....
}
Please tell me how to do this using ClassWizard,
Thanks
|
|
|
|
|
The base view class to be used can be selected from the second last page I guess.
Click on your view class and select its base class.
The default is CView.
|
|
|
|
|
Thanks you superman for your reply.
Another question concerns the following code snippet. I wonder why
CListView::OnInitialUpdate();
can be called directly, without declaring an instance of the class CListView.
void CMyListView::OnInitialUpdate()
{
CListView::OnInitialUpdate();
ASSERT(GetStyle() & LVS_REPORT);
CListCtrl& theCtrl = GetListCtrl();
theCtrl.InsertColumn(0, _T("Player Name"), LVCFMT_LEFT);
LVCOLUMN col;
col.mask = LVCF_FMT | LVCF_TEXT;
col.pszText = _T("Jersey Number");
col.fmt = LVCFMT_LEFT;
theCtrl.InsertColumn(1, &col);
|
|
|
|
|
CListView is the base class of CMyListView .
The object already existing is made of both these classes and of course the other base classes.
So creating another object will not effect the current object.
Also, this is the way the overridden derived class function calls the base class function.
|
|
|
|
|
CListView::OnInitialUpdate();
is equals this->CListView::OnInitialUpdate();
CMyListView is derived from CListView. It can derives base class's function {public, protected}.
OnInitialUpdate is the virtual function. CListView::OnInitialUpdate() means call the base class 's function OnInitialUpdate() .
I think that you should read <<c++ primary="">> <<mfc programming="">> firstly.
|
|
|
|
|
Thanks for your attention on my postinngs and your replyes.
|
|
|
|
|
Hello, I have to Write/read a file with a structure wich contains CString data, if drop out the CString data from the structure it works but if I left the CString data the program crashes when attemps to read.
Here the structure
struct MyStructure
{
CString label
unsignet char data1
BYTE data2
}
the writing
struct MyStructure Estructura;
CFile FileConfig;
FileConfig.Open("ROMconfig.dat",CFile::modeCreate|CFile::modeNoTruncate|CFile::modeWrite);
FileConfig.Seek(0,CFile::begin);
FileConfig.Write(&Estructura,sizeof(Estructura));
FileConfig.Close();
the reading
struct MyStructure Estructura;
CFile FileConfig ;
FileConfig.Open("ROMconfig.dat",CFile::modeCreate|CFile::modeNoTruncate|CFile::modeRead);
FileConfig.Seek(0,CFile::begin);
FileConfig.Read(&Estructura,sizeof(Estructura));
FileConfig.Close();
What I'm doing wrong, may be is something in relation with CString size, but I'm not sure.
And the file has to be a .dat file because is modification to an older application.
|
|
|
|
|
You can't save and read your data this way. Internally, a CString object stores its data in a pointer, so you will save only the address of the pointer and not its content. I suggest you read this article[^] which is about serialization in MFC. You'll get some ideas about how to serialize your data properly.
|
|
|
|