|
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."
|
|
|
|
|
You can try to override the WM_CLOSE message and you might have something like this:
CMyDialog::OnClose()
{
PostQuitMessage( NULL );
or
DestroyWindow(...)
}
This might bypass OnCancel, but I am not very sure because I don't know if I have ever tried this before or not. Besides that, I am not in front of my workstation to verify function names and parameters etc, so consider this as pseudo-code.
|
|
|
|
|
Override OnCancel and OnClose
void CMyDialog::OnCancel()
{
}
void CMyDialog::OnClose()
{
CDialog::OnCancel()
}
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
In my application , I am taking emailid as user input. How should I validate Emailid for @?
|
|
|
|
|
Use Regular Expressions for validating email IDs.
function isValidEmail(emailAddress)
{
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
return re.test(emailAddress);
}
"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."
|
|
|
|
|
what language is that?
|
|
|
|
|
That stuff was in javascript. But the regular expression library is available in almost all languages including C++ and java. So you canuse the same regular expression string in other languages as well.
"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."
|
|
|
|
|
Hi all,
I'm using CRecordset based classes to get data out of a database (an Excel file) - it works well and has done for a number of years, until now. If the database file name has a space at the end of it, before the '.xls' (eg 'my db file .xls') the columns in the tables can not be accessed (though the tables can!), but if the file doesn't have the space it works fine ('my db file.xls'). The problem only happens on WinXP too, it works fine on Win98 - which is making me wonder if this is a known problem with XP? I've not been able to find any information about it on the web / MSDN, has anybody else seen anything like this, or could any one suggest a way for me to get around this?
Dylan
|
|
|
|