|
Coool !
Exactly what I needed
thanks
|
|
|
|
|
I have an object that has a std::map member variable. I placed this object in a static library. Whenever I call the find method of the std::map I get an access violation (due to a variable pointer to uninitialized memory in the comparator).
I looked around on the internet and found out that this actually is a bug in the xtree header file (see here[^]). Does anyone know if there is a microsoft fix for this bug? I searched the microsoft knowledgebase, but could not find any information on it.
|
|
|
|
|
What is the DLL property? Does the compiler links it using single thread or multithreading?
Kuphryn
|
|
|
|
|
It actually is a lib, but I'm using this object in a exe and multiple dll's. All are compiled with the multithread option.
This isn't a sychronisation issue by the way, because I do protected access to my collections with critcial sections.
|
|
|
|
|
When I ran into the numerous STL bugs (using MSVC) I thought it was my mistake. More investigation showed that other people had the same problems. Even though it hurt me greatly, I simply had to abandon the STL and code my own containers.
It was not practical for me to use another STL implementation as I did not have the funds available.
Brian van der Beek wrote:
bug in the xtree header file
My advice to you is to fix specific bugs that effect you. For example, you should be able to apply that fix mentioned on the dinkumware site.
Brian van der Beek wrote:
Does anyone know if there is a microsoft fix for this bug?
In my experience, it seems MS have not fixed many of the bugs.
dog_spawn
http://www.hatekill.com[^]
|
|
|
|
|
dog_spawn wrote:
My advice to you is to fix specific bugs that effect you. For example, you should be able to apply that fix mentioned on the dinkumware site.
By using the file from the dinkumware site, the problem is solved. But I would prefer an actual microsoft fix, because now I have to make sure that I have replaced the xtree file on every pc my software is build. I rather apply some hotfix or something.
|
|
|
|
|
Brian van der Beek wrote:
now I have to make sure that I have replaced the xtree file on every pc
Same here. That's a reason why STL became impractical for me. Glad you solved that particular problem though
|
|
|
|
|
There is a long and sordid history behind Dinkumware's STL for Visual C++ 6.0. In essence both parties hands were tied due to a lawsuit from a third party concerning, I think, copyright issues. The net result is that MS wasn't able to ship an update to STL in VC++ 6.0. I suppose they could now, but have chosen not to due to a combination of Microsoftness and limitations with the C++ standard implemented VC++ 6.0. VC++ 7.x does have an updated library. (Though I still don't use it because I don't like STL, but that's for another day.)
|
|
|
|
|
Ahoy all..
Right now I'm really REALLY pissed of, 'coz I've spent the last hours trying to get this to work and it just doesn't!
I have this property sheet which acts like a wizard. I would like to add a header to my sheet just like this:
http://www.blacksmith-studios.dk/sheet_header.jpg[^]
What I'm experiencing, however, is that the property sheet actually gets the desired layout but without the picture itself. That is, the sheet has been "split" in 3 parts as shown on the screenshot above (top = header, middle = text, bottom = "prev, next etc") but the header itself isn't showing.
I've looked at several tutorials and I've even tried doing exactly the same as in one of them but with no results. The tut I used is this one:
http://www.codeproject.com/useritems/conquering_wizard97.asp[^]
I've posted my app here for anyone to play with. It's just a little project I made specifically for illustration purposes! That is, the code might not be beautiful etc [;)]
http://www.blacksmith-studios.dk/test.rar[^]
Hope for some fast replies!
Regards,
Søren Dreijer
BlackSmith Studios (http://www.blacksmith-studios.dk)
---------
Check out GameTutorials' mIRC channel:
irc.enterthegame.com
#GameTutorials
"Would you please remove any metallic items you're carrying, keys, loose change?"
|
|
|
|
|
I'm not sure I'm gonna look into your problem, but I did try to download your project and couldn't open it since the file is in RAR format. It may help to ZIP it instead.
Regards,
Alvaro
Hey! It compiles! Ship it.
|
|
|
|
|
Whoa.. are you serious? I thought almost everyone was able to open .rar files!
Is it just me or IS RAR actually more used these days??
Thanks for your reply, nevertheless
Keep 'em coming!!
BlackSmith Studios (http://www.blacksmith-studios.dk)
|
|
|
|
|
|
In my application I establishes the connection with the remote server. I want to know the line speed of network connection.
|
|
|
|
|
One solution is to do a speed test via sending packages or requesting data. Keep track of time via time-stamp.
Kuphryn
|
|
|
|
|
Basically I am going to launch an independent program from my main program. THis launched app will generate some o/p files. I want these o/p files to be fed into yet another program which should be launched at after the first prog delivers its o/p. I am working on windows.
Thanks,
ns
Appreciate your help,
ns
|
|
|
|
|
One way of doing this is by creating a temporary file that contains all the o/p file names, and pass the filename as a command line arguement( this is what applications like winzip does ). Or another option would be, to use shared memory which your application 1 and 2 can share. This is can be done using #pragma data_seg preprocessor directive. ( use this option only if application 1 and 2 co-exists. )
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
Another option is you could use WM_COPYDATA to pass the data between the applications.
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
Thanks.
However, the app thats launched is not mine, so how will I know the output is ready and its finished? SOmehow the launching prog has to know that the data generating app is done, and then it passes the o/p to app number 2.........
Is there some MFC function that 1) launches an app and 2) waits until that app is done?
Thanks
ns
|
|
|
|
|
There's no MFC function, but there's the Win32 API CreateProcess :
STARTUPINFO si = { sizeof(STARTUPINFO) };
PROCESS_INFORMATION pi;
if (!::CreateProcess(NULL, "your.exe", NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
{
AfxMessageBox("Error starting the process!");
return;
}
::WaitForSingleObject(pi.hProcess, INFINITE);
::CloseHandle(pi.hProcess);
::CloseHandle(pi.hThread);
Regards,
Alvaro
Hey! It compiles! Ship it.
|
|
|
|
|
That was exactly what I needed!! Thanks a zillion!
Now I have to modify the prog to be launched so it can take commandline args, which I see can be put into createprocess arg#2.
Appreciate your helpful and speedy response,
ns
|
|
|
|
|
Hi,
In my MFc app i have created a ListBox dynamically and added items.Problem is when the user selected a Item in listBox ,getCurSel() always returns 0.This is in WinCE.
I am calling getCurSel() in PreTranslateMsg() routine.This works fine on desktop version..Pls help
Thnks
|
|
|
|
|
Just curious why you've created the listbox dynamically rather than at design time.
Don't use PreTranslateMessage() . Use a LBN_SELCHANGE handler instead.
|
|
|
|
|
I have dialog box in my application. I want disable esc key for dialog. I tried to override OnCancel function as follows.
CMyDialog :: OnCancel()
{
// OnCancel();
return;
}
But problem with above code is that cross button in corner
does not work. It does not close dialog box after pressing close button.
Can anyone suggest any other way to override OnCancel?
|
|
|
|
|
Perhaps could you try that (not tested)
BOOL CMyDialog::PreTranslateMessage(MSG* pMsg)
{
if((pMsg->message == WM_KEYDOWN ) && (pMsg->wParam == VK_ESCAPE)){
return TRUE;
}
return CDialog::PreTranslateMessage(pMsg);
}
Every gun that is made, every warship launched, every rocket fired, signifies in the final sense a theft from those who hunger and are not fed, those who are cold and are not clothed - Dwight D. Eisenhower
|
|
|
|
|
Try using PreTranslateMessage( ).
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|