|
Cedric Moonen wrote: ...that's why there is an option (in VS2005)...
It's also in V6.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I wasn't sure (long time that I didn't use VS6) so I preferred not to say something wrong
|
|
|
|
|
Fair enough. I just wanted everyone to know that it wasn't a new feature.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Has any people worked on Reuters RFA API C++ .
I need urgent help for fetching data from there server through this API.
Lot of samples in the API. Can any one help me.
RajeshGupta
|
|
|
|
|
Any particular error that you are getting when using this API? I've worked on this.
|
|
|
|
|
I am not able to integrate RFA with my Web service.
|
|
|
|
|
Hi all,
Which is the best engine to do OCR in vc++ like google ocr or MODI(microsoft object document imaging),or ......?
Thanks in advance....
|
|
|
|
|
I need to write a debugger which will execute an process and I need to get notification when that process will write or modify any thing on the hard disk. Can we keep watch on any process for getting info when that process will write to hard disk? I have read something about "Win32 Debug API". Can any one guide me or give me any demo code for this?
|
|
|
|
|
chandni_chandrakant_maheta wrote: Can we keep watch on any process for getting info when that process will write to hard disk?
In short: no.
Slightly longer: yes, but it requires a filter driver that you can connect to from user mode the way Process Monitor by Mark Russinovich[^] does.
Perhaps you are able to use Process Monitor instead of developing something on your own.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Thanks a lot for your reply. I was thinking to build a file system filter driver. What do you think can I keep watch on a process by file system filter driver? According to me, if we load a filter driver, we need to restart the computer. Can we load a filter driver with out rebooting?
|
|
|
|
|
The reason why I gave the short answer 'no', is because this way is difficult and there's a big risk for messing up the file system making the machine impossible to boot.
I strongly recommend that you seriously try to find another solution.
In any case, if you continue the filter driver track, I cannot help you.
As for your questions...
chandni_chandrakant_maheta wrote: can I keep watch on a process by file system filter driver?
Not exactly, you'd have to filter the file accesses from all processes.
You may do the filtering in the driver.
chandni_chandrakant_maheta wrote: According to me, if we load a filter driver, we need to restart the computer.
Correct in this case since it's about filtering the file system driver.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
I have a multiline edit control. This control should be populated with strings with each string representing an event information. I want to know how to Set the text without clearing the text which is already populated. So basiclaly I want to concantenate the text here. Is Using GetWindowText (Gets the historical data) and SetWindowText (Historical data + new) suffice.
|
|
|
|
|
Yes, if you use CString you can simply do that. Don't forget to add "\r\n" to start a new line.
|
|
|
|
|
I saw something like the following:-. Was wondering whether it could be used.
void CEditCtrlTutorialDlg::OnIn() <br />
{<br />
UpdateData();<br />
m_Edit8.SetSel(0,-1);
m_Edit8.Copy();
m_Edit5.Paste();
}
|
|
|
|
|
tom groezer wrote: Is Using GetWindowText (Gets the historical data) and SetWindowText (Historical data + new) suffice.
Yes, but why go to all that trouble? Simply use EM_SETSEL to set the insertion point after the last character, and then use EM_REPLACESEL to insert the new text.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
You could consider using a list control for this instead, unless you realy want the user to be able to freeform edit your event log. List controls are easier to override for changing the way they look if I remeber rightly it's not hard to make the grid lines disappear for example if you want it to look like a readonly multiline edit. They can contain much more as well I wouldn't try putting 2 million lines of text in an Edit Control, ( I think max is still 64K), but a List Control will be happy with that.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Hi
I am doing customization of ToolTip control. So how can i check that mouse is move on which area of ToolBar. I want to display ToolTip text for mouse move on particular icon on ToolBar.
Regards
Atul
Atul
|
|
|
|
|
M. Atul wrote: I want to display ToolTip text for mouse move on particular icon on ToolBar.
For toolbars if you set the CBRS_TOOLTIPS style then toolbars will send TTN_NEEDTEXT notification message to it's parent window. Handle this message to show tooltips.
|
|
|
|
|
Hi again, I'm trying to find someone who used Imapi for cd recording if he could help me. I'm having a problem with staging a image for folders to enable burning to cd. I'm using ISorage and IStream, I'm only having trouble with folders(subfolders), no problem recording files! I call my function member 'BurnCD()' for recording, here is the code:
<br />
BOOL CBurn::BurnCD()<br />
{<br />
HRESULT hr;<br />
<br />
CFile files[32];<br />
IStorage* pStorage = NULL;<br />
IStream* pStream;<br />
int i=0;<br />
<br />
for (i =0; i<m_lsFiles.GetItemCount(); i++)<br />
{<br />
CString strFilePath=m_lsFiles.GetItemText(i,0);<br />
CString tip=m_lsFiles.GetItemText(i,2);<br />
CFileException e;<br />
int nSize = 0;<br />
<br />
if(tip == CTXT_DOC)
{<br />
<br />
hr = StgCreateDocfile( NULL, STGM_DIRECT|STGM_CREATE|STGM_READWRITE|STGM_SHARE_EXCLUSIVE, NULL, &pStorage);<br />
if (files[i].Open(strFilePath,CFile::modeRead,&e))<br />
{<br />
USES_CONVERSION;<br />
CString ime = files[i].GetFileName();<br />
HRESULT res;<br />
if( (res = pStorage->CreateStream( T2W(ime.operator LPCTSTR()), STGM_DIRECT|STGM_CREATE|STGM_READWRITE|STGM_SHARE_EXCLUSIVE|STGM_FAILIFTHERE, 0, 0, &pStream) ) != S_OK )<br />
return FALSE;<br />
<br />
nSize = files[i].GetLength();<br />
BYTE *pBuffer = new BYTE[nSize];<br />
if (files[i].Read(pBuffer,nSize) > 0)<br />
{<br />
hr = pStream->Write(pBuffer,nSize,NULL);<br />
hr = pStream->Release();<br />
}<br />
files[i].Close(); <br />
delete[] pBuffer;<br />
hr = pJolietDiscMaster->AddData(pStorage, 0);<br />
}<br />
}<br />
else if (tip == CTXT_DIR)
{<br />
hr = StgCreateStorageEx(NULL,<br />
STGM_CREATE | STGM_READWRITE |STGM_SHARE_EXCLUSIVE | STGM_DIRECT,<br />
STGFMT_STORAGE,<br />
0,0,0,<br />
IID_IStorage,<br />
(void**)&pStorage);<br />
<br />
CString curDir = strFilePath;<br />
CString dir_name=_T(""),temp = strFilePath;<br />
int len = temp.GetLength();<br />
for(int i=len-1; i>=0; i--)<br />
{<br />
if(temp.GetAt(i)=='\\')<br />
{<br />
dir_name = temp.Right(len-i-1);<br />
break;<br />
}<br />
}<br />
IStorage* pDirStorage;<br />
USES_CONVERSION;<br />
hr = pStorage->CreateStorage(A2W(dir_name.operator LPCTSTR()),<br />
STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_DIRECT,<br />
0,0,&pDirStorage);<br />
SetCurrentDirectory(strFilePath);<br />
CString F_name;<br />
CFileFind m_ff;<br />
strFilePath += "\\";<br />
strFilePath += "*.*";<br />
BOOL b_dd = m_ff.FindFile(strFilePath);<br />
if(!b_dd)<br />
{<br />
DWORD err = GetLastError();<br />
DisplayErrorString("",err);<br />
return FALSE;<br />
}<br />
while(b_dd)<br />
{<br />
b_dd = m_ff.FindNextFile();<br />
if(m_ff.IsDots()) continue;<br />
F_name = m_ff.GetFileName();<br />
if( F_name.GetLength() > 31)<br />
{<br />
return FALSE;<br />
}<br />
<br />
if(m_ff.IsDirectory())<br />
{<br />
BOOL res = StorageDir( curDir, F_name, pDirStorage);<br />
if(!res) return FALSE;<br />
continue;<br />
}<br />
<br />
CFile File;<br />
if(!File.Open(F_name,CFile::modeRead,&e))<br />
return FALSE;<br />
<br />
IStream* pDirFileStream;<br />
HRESULT rez;<br />
rez = pDirStorage->CreateStream(A2W(F_name.operator LPCTSTR()),<br />
STGM_DIRECT|STGM_CREATE|STGM_READWRITE|STGM_SHARE_EXCLUSIVE,<br />
0, 0, &pDirFileStream);<br />
nSize = File.GetLength();<br />
BYTE *pBuffer = new BYTE[nSize];<br />
if (File.Read(pBuffer,nSize) > 0)<br />
{<br />
hr =pDirFileStream->Write(pBuffer,nSize,NULL);<br />
hr = pDirFileStream->Commit(STGC_OVERWRITE);<br />
hr= pDirFileStream->Release();<br />
}<br />
File.Close(); <br />
delete[] pBuffer;<br />
}<br />
hr = pJolietDiscMaster->AddData(pStorage, 0);<br />
pStorage->Release();<br />
}<br />
}<br />
theApp.DoWaitCursor(1);<br />
hr = pDiscMaster->RecordDisc(FALSE,TRUE);<br />
theApp.DoWaitCursor(-1);<br />
<br />
return TRUE;<br />
<br />
on the bolded,underlined line is where my code crak's reporting "Insufficient permissions to create stream!"
If someone can help with this or post it's code how to solve storage for folders please do so, I'm very thankful to all who can help!
|
|
|
|
|
Hello,
I have a CMenu class object with some menu options.When I try to disable a particular menu option I am not able to do it.I have used the following
EnableMenuItem(6,MF_DISABLED | MF_GRAYED );
But if I use the following
CString R;
GetMenuString(6,R,MF_BYCOMMAND);
I get the particular string of Id 6
What I sould do to disable the menu_id?
Thanks
Prithaa
|
|
|
|
|
use
<br />
EnableMenuItem(6, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
Is 6 the id of the menu item.
Best Regards
Raj
|
|
|
|
|
Hello,
Yes I have 6 as the id of the menu item
I have tried
EnableMenuItem(6, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
But that did not work
Thanks
Prithaa
|
|
|
|
|
Use this
and
Set the m_bAutoMenuEnable to FALSE in the constructor of
CMainFrame so no ON_UPDATE_COMMAND_UI or ON_COMMAND handlers are
needed.
|
|
|
|
|
prithaa wrote: I have a CMenu class object with some menu options
If it's an MFC app then you should use ON_UPDATE_COMMAND_UI macro and handle disabling and enabling there.
|
|
|
|
|
Hello,
Thanks,
I am not using Doc-View architecture.Yes I am using MFC's in my app.
I am handling enabling disabling in OnCmdMsg() of Mainframe class
Bye.
|
|
|
|