|
In order to find a string in a HTML file, you will first need to find the relevent tags. This will then give you an idea about where the string is, where it ends, and what type of string it is.
|
|
|
|
|
Sakthiu wrote: ...(each and every line)...
HTML files are not confined to lines (e.g., you could have all of them on a single 'line'). Assuming so is just asking for trouble.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
its someone who have an ideea how to limit the upload speed from my computer ?
Bravoone
|
|
|
|
|
I have created a structure as
typedef struct __test{
char buf[10];
}TEST,*PTEST;
then i created a CList object as
CList<PTEST ,PTEST>my_firststruct;
then i am using to store linklist
if( my_firststruct.IsEmpty())
my_firststruct.Addhead(pTest);
else
my_firststruct.AddTail(pTest);
It is working fine. But problem start when i am using as
typedef struct __Second{
char buf[10];
}SECOND,*PSECOND;
typedef struct __test{
CList<PSECOND,PSECOND>my_secondstruct;
char buf[10];
}TEST,*PTEST;
if(pTest->my_secondstruct.IsEmpty())
when i am trying to call this is giving me error error code is
C0000005: This error is with memory. So how i will resolve this error.
Can any one help me on this...?
-- modified at 9:41 Wednesday 27th September, 2006
|
|
|
|
|
What is the error you are facing with
struct XXXX{
CList<ppp,ppp&>my_second_Struct;
char buff[10];
char buff1[10];
}YYY;
??
Rinu Raj
|
|
|
|
|
I have created a structure as
typedef struct __test{
char buf[10];
}TEST,*PTEST;
then i created a CList object as
CList<PTEST ,PTEST>my_firststruct;
then i am using to store linklist
if( my_firststruct.IsEmpty())
my_firststruct.Addhead(pTest);
else
my_firststruct.AddTail(pTest);
It is working fine. But problem start when i am using as
typedef struct __Second{
char buf[10];
}SECOND,*PSECOND;
typedef struct __test{
CList<PSECOND,PSECOND>my_secondstruct;
char buf[10];
}TEST,*PTEST;
if(pTest->my_secondstruct.IsEmpty())
when i am trying to call this is giving me error error code is
C0000005: This error is with memory. So how i will resolve this error.
Can any one help me on this...?
|
|
|
|
|
GudduRanchi wrote: ...please help me
With what? You've failed to indicate any problem.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I have created a structure as
typedef struct __test{
char buf[10];
}TEST,*PTEST;
then i created a CList object as
CList<PTEST ,PTEST>my_firststruct;
then i am using to store linklist
if( my_firststruct.IsEmpty())
my_firststruct.Addhead(pTest);
else
my_firststruct.AddTail(pTest);
It is working fine. But problem start when i am using as
typedef struct __Second{
char buf[10];
}SECOND,*PSECOND;
typedef struct __test{
CList<PSECOND,PSECOND>my_secondstruct;
char buf[10];
}TEST,*PTEST;
if(pTest->my_secondstruct.IsEmpty())
when i am trying to call this is giving me error error code is
C0000005: This error is with memory. So how i will resolve this error.
Can any one help me on this...?
|
|
|
|
|
I'm not sure what the problem is. This worked fine for me:
typedef struct __Second
{
char buf[10];
} SECOND, *PSECOND;
typedef struct __test
{
CList< PSECOND,PSECOND> my_secondstruct;
char buf[10];
} TEST, *PTEST;
PTEST pTest = new TEST;
if (pTest->my_secondstruct.IsEmpty())
;
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi
What you have suggested it is good.it works fine but ?
i am giving you total my problem.
I am having two structure. as you kmow.
typedef struct __Second{
char buf[10];
}SECOND,*PSECOND;
typedef struct __test{
CList<PSECOND,PSECOND>my_secondstruct;
char buf[10];
}TEST,*PTEST;
CList<PTEST ,PTEST>my_example;
i have created an object of PTEST as:
PTEST test;
Allocating an memory.
Filled this structure.
check (my_example.Isempty()){
// This is my First Node
my_example.AddHead(test);
}
In this condition i am getting problem
if i am alocating the memory of
PTEST my_example= new TEST;
them i am not able to call all the member variable of CList.
So what i have to resolve my problem
Regards and Thanks
Neeraj Kumar Jha
|
|
|
|
|
GudduRanchi wrote: PTEST my_example= new TEST;
You can't do this because my_example is a CList object. The compiler should have warned you of such.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I've created a Dialog based application that records audio(using DirectX of course) and changes the header of the audio file so that I get a file that is not playable by a regular player. Now,within my application itself,when I want to playback the said file,I decode the file to a "temp" with no extension and play it back. However I cant seem to delete the file either when I exit the application or when it finishes playing.
I believe my application isnt letting go of the file when it finishes playing it despite the fact that I set all the DirectX interfaces to NULL(I tried to delete the file manually after it finished playing and got an "Access Denied" error)
Any suggestions anybody??
Thank You
|
|
|
|
|
Try calling DeleteFile(..) in your class's destructor
Rinu Raj
|
|
|
|
|
I'd try that IF i was exiting the application. But if I'm fooling around by recording and then repeatedly playing back,I'd like to be able to delete the file each time it finishes playing.
Thanks for your suggestion though.Really appreciate it
|
|
|
|
|
You are creating a temp file right ?
Close the file handle of the temp file
then try DeleteFile(..)
it will work
Rinu Raj
Rinu Raj
|
|
|
|
|
Umm, I tried that too but it doesnt work.
What I am doing is using pGraph->RenderFile(abc,NULL);
|
|
|
|
|
will you paste the code you closing the handle of hile and removing file
Rinu Raj
|
|
|
|
|
HRESULT res;<br />
IMediaControl *pMediaControl;<br />
IMediaEventEx *pEvent;<br />
if(pGraph==NULL)<br />
{<br />
CMainDlg *parent=(CMainDlg *)AfxGetApp()->GetMainWnd();<br />
HRESULT hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, <br />
IID_IGraphBuilder, (void **)&pGraph);<br />
<br />
if(hr==S_OK)<br />
{<br />
pGraph->QueryInterface(IID_IMediaControl, (void **)&pMediaControl);<br />
pGraph->QueryInterface(IID_IMediaEventEx, (void **)&pEvent);<br />
USES_CONVERSION;<br />
<br />
<br />
<br />
<br />
if(DecodeMediaHeaderWithCopy(fileName,"temp"))<br />
{<br />
res=pGraph->RenderFile(A2W("temp"), NULL);<br />
pGraph->QueryInterface(IID_IMediaSeeking,(void <br />
<br />
**)&g_pSeek);<br />
<br />
<br />
}<br />
else<br />
res=pGraph->RenderFile(A2W(fileName), NULL);<br />
<br />
if(res!=S_OK)<br />
{<br />
pMediaControl->Release ();<br />
pEvent->Release();<br />
return FALSE;<br />
}<br />
pMediaControl->Run ();<br />
pMediaControl->Release ();<br />
pEvent->Release();<br />
<br />
if(FileExists("C:\\Executable\\dxh263\\temp"))<br />
{<br />
CFile m_File;<br />
<br />
<br />
if(!m_File.Open("C:\\Executable\\dxh263\\temp",CFile::modeRead,NULL))<br />
AfxMessageBox("notexs");<br />
m_File.Close();<br />
<br />
}<br />
}<br />
else<br />
return FALSE;<br />
}<br />
return TRUE;<br />
}<br />
<br />
<br />
void CMPlayer::StopPlay ()<br />
{<br />
IMediaControl *pMediaControl;<br />
IMediaEventEx *pEvent;<br />
if(pGraph==NULL)<br />
return;<br />
else<br />
{<br />
pGraph->QueryInterface(IID_IMediaControl, (void **)&pMediaControl);<br />
pMediaControl->Stop ();<br />
pMediaControl->Release ();<br />
pGraph->QueryInterface(IID_IMediaEventEx, (void **)&pEvent);<br />
pEvent->SetNotifyWindow ((OAHWND)NULL,WM_PLAYER_ENDOFMEDIA,NULL);<br />
pEvent->Release ();<br />
pGraph->Abort();<br />
pGraph->Release (); <br />
pGraph=NULL;<br />
pMediaControl=NULL; <br />
pEvent=NULL;<br />
<br />
}<br />
::DeleteFile("C:\\Executable\\dxh263\\temp");<br />
}<br />
|
|
|
|
|
I think the file you have opened didnot get closed so First close the file using CloseHandle or fclose.
|
|
|
|
|
about ComboBox problem
<<<<<<<dialog.h>>>>>>>>
.........
public:
CComboBox Cbx;
struct Data
{
LPCTSTR lpszName;
LPCTSTR lpszValue;
int ID;
};
<<<<<<<dialog.cpp>>>>>>>
Data d;
d.lpszName=_T("Name");
d.lpszValue=_T("Value");
d.ID=1;
Cbx.InsertString(0,d.lpszName);
Cbx.SetItemDataPtr(0,(void *)d);
how to struct data append to ComboBox Control,thank
|
|
|
|
|
rxgmoral wrote: Data d;
d.lpszName=_T("Name");
d.lpszValue=_T("Value");
d.ID=1;
Cbx.InsertString(0,d.lpszName);
Cbx.SetItemDataPtr(0,(void *)d);
you need to create d on heap.
And for obvious reasons, need to delete it after use.
-- modified at 7:59 Wednesday 27th September, 2006
|
|
|
|
|
Hi
I am using CfileDialog, but i cant get it to display pointing to the correct directory
it seems to ignore the path that i pass
im using
TCHAR szFilters[] = _T ("Log Files (*.txt)|*.txt|All files (*.*)|*.*||");
CFileDialog dlg(TRUE, _T ("txt"), _T ("*.txt"),NULL, szFilters);
CString MyPath "c:\";
if (logPath.GetLength())
dlg.GetOFN().lpstrInitialDir = MyPath;
if (dlg.DoModal()==TRUE)
{
CString result = dlg.GetPathName();
ShellExecute(NULL, "Open", _T(result), NULL, NULL, SW_SHOW);
}
can anyone help
thanks
simon
|
|
|
|
|
Try CString MyPath = "C:\\"
"There are those who confuse bad management with fate"
|
|
|
|
|
brahmma wrote: Try CString MyPath = "C:\\"
have already tried that, no joy
|
|
|
|
|
did you read my answer ?
does it provide much help ?
|
|
|
|