|
I will go with a).
if you try to use method b) and if it did succeeds, windows may do lot of paging that will surely hit the performance.
God is Real, unless declared Integer.
|
|
|
|
|
hello all,
how shall i convert the Compressed Bmp file into PNG format??. Are there any libraries available to do so??.
ComputerNewton
|
|
|
|
|
|
|
Hi Friends,
I am using the ReadDirectoryChangesW function to monitor the directory. But I want the notification only after the completion of the current File operation like "file added"
What is the soln?
VikramS
|
|
|
|
|
Are you using the FILE_NOTIFY_CHANGE_FILE_NAME filter?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
|
I suppose in the thread that is watching for changes, you could periodically try and open the file. Once you are able to open the file, you know it has been closed by the other process.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
|
Hi,
Apologies if this post is in the wrong forum but I can't find any which appear to be right for this question.
Anyway I've got a legacy ADA program which I need to communicate (via sockets) with. The existing method of doing this is by using the extern method in C which is then called by the ADA program. The C program then sends the data to my main program via sockets.
The problem I have is that I've had to modify the ADA program for our own purposes but (you've guessed it) it now falls over Does anyone know of any debuggers which can handle mixed language programs (C and ADA). I've tried AdaGIDE but can't get it to compile (only seems to support ADA). My solution so far has been to build it using a makefile and then debugging it on the command line using gdb however this is very slow and *painful* to use (I've also tried the GNU Visual Ada debugger but for some reason it doesn't like the exe!) .
If anyone has any suggestions then I would be most grateful
TIA,
Andy
|
|
|
|
|
Any debugger can handle mixed-language programs - the problem is getting it to recognize debugging symbols, and therefore match the assembled code up with the original source.
It sounds like your Ada program is built using GNAT. GNAT generates debug symbols in a format suitable for the Ada fork of GDB which is incompatible with anything else. The Microsoft C++ tools generate (by default) PDB files, which the GNU tools can't read (mainly because MS has never documented this format).
You might manage to get debugging symbols that gdb can read for your C/C++ code if you use gcc to compile it.
If you can somehow convince your Ada compiler to generate Microsoft-format debugging symbols, you can use the Visual Studio debugger if you have it - simply use File > Open Project and open the EXE file. If you don't, you could try using WinDBG from the Windows Debugging Tools[^]. It's in the same vein as gdb, but a bit more intelligible.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
thanks mate, I'll give WinDBG a try
|
|
|
|
|
How can I add files to MRU in a dialog box app? I tried to override OnOpenRecentFile and OnUpdateRecentFile which i have found in appui.cpp but nothing happens.
|
|
|
|
|
Have you tried CRecentFileList class?
(see MSDN for details)
Robert-Antonio
"CRAY is the only computer, which runs an endless loop in just 4 hours"
|
|
|
|
|
Yes.I have done a key in Registry and another key called Recent File List and there are all my 5 MRU, but i want to put them in a menu to appear also there .I have put ID_FILE_MRU_FILE1 but MRU don't appear.This is my problem.
Thanks.
|
|
|
|
|
Handle an UPDATE_COMMAND_UI message for the ID_FILE_MRU_FILE1 menu item:
void CMainFrame::OnUpdateFileMruFile1(CCmdUI* pCmdUI)
{
m_MRU.UpdateMenu(pCmdUI);
} where m_MRU is your CRecentFileList object.
Robert-Antonio
"Friends come and leave, but teddybears stay in forever."
|
|
|
|
|
I have a dialog box, not a doc/view architecture.
|
|
|
|
|
This solution isn't dependent on doc/view. If you want to add MRU to dialog box, use simply CYourDialog instead of CMainFrame
Robert-Antonio
"Love without sex is like a fish without antlers"
|
|
|
|
|
Thanks a lot.It works.But I have another problem.
When I open the first file from MRU menu it works,but if i want to open the rest of 4 files I get an assert:appui.cpp line 130,ASSERT(m_pRecentFileList != NULL);
But I don't have anything with BOOL CWinApp::OnOpenRecentFile(UINT nID).
I did my own function.
void CMyRtfDlg::OnFileMruFile1()
{
OnOpenRecentFile(ID_FILE_MRU_FILE1);
}
// added on 22 Apr 2004
void CMyRtfDlg::OnUpdateFileMruFile1(CCmdUI* pCmdUI)
{
m_pMRU->UpdateMenu(pCmdUI);
}
// @added on 22 Apr 2004 from appui.cpp
// @for MRU
BOOL CMyRtfDlg::OnOpenRecentFile(UINT nID)
{
ASSERT(m_pMRU!= NULL);
ASSERT(nID >= ID_FILE_MRU_FILE1);
ASSERT(nID < ID_FILE_MRU_FILE1 + (UINT)m_pMRU->GetSize());
int nIndex = nID - ID_FILE_MRU_FILE1;
ASSERT((*m_pMRU)[nIndex].GetLength() != 0);
TRACE2("MRU: open file (%d) '%s'.\n", (nIndex) + 1,
(LPCTSTR)(*m_pMRU)[nIndex]);
OnFileOpen((*m_pMRU)[nIndex]);
return TRUE;
}
|
|
|
|
|
Hi,
I am parsing serveral avi files and displaying the data frame by frame in
a CListCtrl. I am using the Replace function to replace each consecutive image.
How can I speed this operation up? Most of the time is spent copying the data into the
ListCtrl and the internal BitBlt which it is doing.
Regards,
|
|
|
|
|
Hi
In my aplication I am using a thread that waits for processes to signal their kernel objects while exiting.
I want to add the objects in the wait aray in WaitForMultipleObjects in run time dynamically.
Currently I am using the poor design that I kill the wait thread, update the array and start new thread again
Any good or better suggestion.
Rajeev
|
|
|
|
|
Cant you allocate the array using calloc and reallocating it at need using realloc while updating the count?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
You can insert a Manual Event (probably at the beginning of the signal array. Then signal
this event to stop the Wait. Detect that it was your "Ahem, I want to change things" event,
rebuild the array, and loop back to the wait....?
Something like...
Rebuild_Event_Array ();
while (1)
{
dwWait = WaitForMulti (pSyncObjects, nSyncObjects, INFINITE);
if (dwWait == WAIT_OBJECT_0)
{
Rebuild_Event_Array ();
}
else if (dwWait > WAIT_OBJECT_0 && dwWait < (WAIT_OBJECT_0 + nSyncObject) )
Dispatch_Custom_Event ();
else
{
HandleError ();
break;
}
}
etc.
where Rebuild_Event_Array () puts together an array with your Rebuild event at
the beginning.
Iain.
|
|
|
|
|
I'm haveing a lot of weird problems with a new app. I tried to create CComboBox controls and was able to add strings which I could cycle through with the arrow keys. However clicking on the arrow on the right of the box would not drop down the list so I switched to a list box. It works but for some strange reason, calling the ResetContent() method doesn't clear the items in the list box. Oddly, calling the GetCount() method shows the correct value before (n=3 or something.) and after (n = 0). The result is a list box with duplicate entries in the list box.
The code snippet is below.
Something I'm doing wrong?
{
// populate the databases ListBox
vector <cstring *=""> v;
vector <cstring *="">::iterator i;
n = _mlbDBListBox.GetCount();
_mlbDBListBox.ResetContent();
n = _mlbDBListBox.GetCount();
v = _myDBBrowser->GetDBs();
for (i = v.begin(); i != v.end(); i++)
_mlbDBListBox.AddString((*i)->GetString());
_mlbDBListBox.SetCurSel(0);
}
Using Visual Studio .Net 2002 (VC++ 7.0)
|
|
|
|
|
Are you sure that the vector does not contain the duplicates?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|