|
Please, Christian can you e-mail me that iphlpapi.h, iptypes.h,ipexport.h and iphlapi.lib?
I've been tring to solve this problem for 3 days. I feel that ai get mad.
I HAVE WIN98 SE ON MY COMPUTER. SHOULD BE A PROBLEM?
You are a real help for everybody, Christian. Thank you very much.
My e-mail address is: dvisan@forte.ro
|
|
|
|
|
|
Thank you for your reply... but I asked something else.
|
|
|
|
|
I can see from a later post that you have gotten your header files, so this is just out of curiosity: Why can't you download the SDK from the MS site?
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
My transfer rate is about 1 kb/s.
I suppose there are a lot of mega to download. Am i wrong?
|
|
|
|
|
Ah, I see. There's 355 megs so you'd be screwed. Why is the transfer rate so slow? Maybe you should try Download Accelerator to see if it can speed things up. On my modem (56K) it doesn't really help because the modem is setting the limit (app. 6 Kb/s), but maybe your problem is different.
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Hi,
How can I save a CString to a text file?
I've tried CFile::Write to write the CString for CString.GetLength(),
and although this saves the file, there are usually around 3 garbage characters at the end of the file.
Any ideas?
Many thanks.
|
|
|
|
|
The following works perfectly for me, with no extra characters.
file.Write(string.GetBuffer(string.GetLength()), string.GetLength);
string.ReleaseBuffer();
Were you calling GetBuffer, or just passing in the CString ?\
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Christian, this will work too and it's actually a little quicker:
file.Write((LPVOID)(LPCTSTR)string, string.GetLength());
Regards,
Alvaro
|
|
|
|
|
Thanks, but I'm afraid that made no difference. I'm using this code:
void CTestDlg::WriteFile(CString strFile, CString strText)
{
CStdioFile file;
if (!file.Open(strFile, CFile::modeCreate | CFile::modeWrite | CFile::typeText))
{
return;
}
file.Write(strText.GetBuffer(strText.GetLength()), strText.GetLength());
strText.ReleaseBuffer();
file.Close();
}
>
<ë é
Happens with any string, on three different computers, Win98 and Win2k, although the last 7 (\n and \r) characters (the garbage) are always random.
Thanks.
|
|
|
|
|
Try getting rid of CStdioFile and replacing with CFile. The, when you're writing to the CString make sure you use \r\n where you'd normally use \n . Also, use Alvaro's with GetBuffer - it's easier and the copied buffer is un-needed.
--
Andrew.
|
|
|
|
|
If u use Struct for storing the file ,u will see the garbage actually it store the data in binary format and if i user open the file in text mode and it looks like garbage when u read from the file the garbage shows u the actual data.
World of Life
|
|
|
|
|
Is there anyone who could tell me how to save a custom binary resource item as a binary file to disk? I want to include some data in my final exe which should be written to disk when the program first runs (sort of sfx). TIA.
|
|
|
|
|
If you have a pointer to the item, CFile allows you to write a chunk of data by specifying the start address and length - see my exmaple to the question above this one, it works just as well for any pointer you want to pass it.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
i downloaded an old cpp program and it uses something like textcolor fn.
but my cpp help doesnt know it at all.
what do i have to include ? or where do i find it?
|
|
|
|
|
Is it a console program ? I believe some other compilers had stuff for this sort of thing, from memory someone else asked about it. It's certainly not a standard function under Visual C++. If you can explain exactly what it needs to do ( i.e. is it in a window or a console, is it just setting the colour for a block of text, etc. ), I'm sure we can help more.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
this is a sample of the program:
(it is i think a dos prog)
void background(void){
int a;
clrscr();
for(a=1;a<2000;a++){
textcolor(1);
textbackground(7);
cprintf("°");
}
gotoxy(1,25);
for(a=1;a<80;a++){
textbackground(7);
cprintf(" ");
}
}
|
|
|
|
|
Hello, I would like to know if choosing "mfc as a shared DLL", the interface of my programs will be like the new interface of windows XP.
Thank you in advance.
|
|
|
|
|
It will make no difference whatsoever - you will still link to the same dll if it's static or dynamic. All apps under Window XP look different ( I am using it ) because of how it shows things like the system menu ( the buttons on the top right of a window ), the window frame itself, etc. Every app I have written, static or dynamic, all look the same under XP, they all have the XP look and feel about them.
Apps will look like they are under XP if they are under XP or if you hack the absolute hell out of them to try and make them look similar. Otherwise, they will look like other apps under the version of Windows you are running. Also, if you want to write using newer features of Windows that require later versions of the OS, you'll need to get the Platform SDK from the Microsoft site ( download at your peril, I always get the CD ). Note that using functions like TransparentBlt will render your code inoperable under earlier versions unless you late load the dll's required and do some checking of your OS version to ensure that functionality not supported by the OS is not offered to the user.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Explain what you mean?
Do you mean keep the interface that XP has when running your app in another OS?
|
|
|
|
|
|
I have programmed a system tray icon into my program using traynot.cpp and traynot.h.
When I run the program, it works fine and then I press minimise and a grey space comes up.
I know its all correct because I tried it in Windows 98 and the system tray icon shows up!
Anyone know what I can do?
Thanks
Ashman
|
|
|
|
|
Hello
I do a program with vc++ that based on dialog, but the problem When I press Enter key the program is closed, How can avoide this problem.
thanks for your help .
|
|
|
|
|
In your dialog class override CDialog::OnOK() and dont call CDialog::OnOK() in it.
The same goes for Esc, override CDialog::OnCancel() in your dialog class.
|
|
|
|
|
The same thing should be done when using CTabCtrl.
[]'s Cris
|
|
|
|