|
One solution is to design the internal applications that processes the XML file to update a CRC check output for all the XML files. The client applications could quickly download the CRC output and compare it with the most recent downloaded one.
Kuphryn
|
|
|
|
|
use the "If-modified-since:" header in your request for that file and send the GMT time of the last update date for the file you are requesting. The HTTP server will compare the time that you send with the time of the file and only send back the file on the server if it is newer.
IF your file is newer on your machine, you will get a status code 304 indicating that your file is newer.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Hi Paul,
Thanks for the information..But i havent done anything like this before..I would highly appreciate if u can send me any example...of how to do that..Please..I need it urgently...Thanks a lot in advance..
regards,
Himanshu
|
|
|
|
|
Why RasSetEntryProperties() doesnt allow me to manage network components?
Win2000 SP3
I make net RAS entry by RasSetEntryProperties(). But when I open entry i've just created in "Network and Dial-up Connections" I see it with MS Networks Client bounded to this connection entry!
I didnt find in MSDN how I can make him dont do it.
Could anybody advise me?
|
|
|
|
|
Hello everybody, I have this question from the stone age no one answers me the only answer i`ve got use SD but i need dialog based program so any answer far away from SD thank you and have a nice day .
|
|
|
|
|
Printing is really too lengthy a subject to discuss here. Instead, I refer you to Charles Petzold's Programming Windows, Fifth Edition from Microsoft Press.
You can still use the MFC helper classes such as CPrintDialog and CDC .
|
|
|
|
|
|
Hey,
I'll answer you cause I had the same problem about a year ago. I don't really know much about printing though, just gonna tell you what I did.
First off, I'd suggest you go to the Printing section on this website, there are plenty of articles on it, might have just what you need.
Other than that it really depends on what you want to print that's in the dialog. For instance I wanted to be able to print out the contents of a list box, which I was able to find a suitable printing class on this site. I'll go ahead and say that printing from any type of control can be done using a class similar to the one I had. If you're trying to print from something other than a control, can't help you much there.
Mike
|
|
|
|
|
Hello, i tried to use a MS-ChartCtrl to display a 2D-Bar/Line diagramm. After a lot of work, i managed to show the bars/lines. But now I want to change the color of the lines. I searched on a few board but i didn't find a solution.
Some people told to include headerfiles like VCColor etc. But where can I find these files?
Please help me...
|
|
|
|
|
Hi,
I just tried to make an HTML help file by seeing Kruglinski book. but I am getting a warning called "The Topic ID "HID_CONTENTS" specified in the Project files as the Default Topic does not exist". This is very urgent please help as soon as possible.
Thanks in Advance
|
|
|
|
|
What is the correct way?
//error happens.
throw new Exception( "Error Message." );
or
//error happens.
throw Exception( "Error Message." );
What is the difference?
How is the new Exception deleted?
Thank You
Bo Hunter
|
|
|
|
|
Bo Hunter wrote:
How is the new Exception deleted?
It isn't. Or rather, it must be deleted by the catch block.
The method I usually use is something along these lines:
try {<br />
throw BuilderParseException("AIEEEEE!");<br />
} catch (const BuilderParseException &ex) {<br />
}
The BuilderParseException that's thrown will be cleaned up at the appropriate time, and the catch-by-reference avoids a copy.
- Mike
|
|
|
|
|
Its best to throw by value and catch by const-reference:
throw Exception( "Error Message." );
[...].catch (const Exception& e)
{cout << e.what();
}
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
Does anyone knows how to set power button action in Window2000 & WinXP? I found the API WriteGlobalPwrPolicy() to do that. But, it can't work properly. After I involved this API the return value is nonzero. This is means this API is success. Even so, the system's global power button action doesn't have been change. The following code is my testing code, please help me to check it if it has any wrong. Or, you can tell me any tip to do it.
Testing code:
GLOBAL_POWER_POLICY gpp;<br />
ReadGlobalPwrPolicy(&gpp);
gpp.user.PowerButtonAc.Action = (POWER_ACTION)2;
<br />
if(WriteGlobalPwrPolicy(&gpp) == 0)<br />
TRACE(_T("Failed!\n"));<br />
else<br />
TRACE(_T("Successful!\n"));<br />
ReadGlobalPwrPolicy(&gpp);<br />
TRACE(_T("PowerButtonAc.Action:%d\n"), gpp.user.PowerButtonAc.Action);
Relation resource:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/power/base/power_management_functions.asp
Thanks for your help!
Best regards,
Ryan
|
|
|
|
|
I'm afraid I think you've drifted into custom control territory. You'll need to implement this one yourself.
You'll need to be familiar with the Windows drawing model and how to manipulate text and images within that model.
|
|
|
|
|
G'day folks,
I'm attempting to write out a CSV file (don't ask) in a format that can be read by Excel (also don't ask) across Locales. Now, this is fine, I can format the numeric values correctly and then separate them using the locale's list separator. However, it seems that Excel only ever uses the System Locale list separator. That is, if some user overrides their separator (again, don't ask) to ',', Excel doesn't use that, but the original default setting for the locale (in the Italian locale, ';').
Is this behaviour expected? Sensible? A pain in the #$%?
Thanks.
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|
|
Are you sure that Excel is supposed to use the locale's list separator? Maybe what Excel is dealing with is not considered a list. Anyway, once you have the data in Excel, you can use the Text to Columns menu option to fix the problem.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
someone can show me how to read and write record table (SQL DataBase) with VC++??
--code is better
thanks
Nho'c Ti`
|
|
|
|
|
To Write:::
db.OpenEx("DSN=YOUR DSN;Uid=YOUR USER ID FOR SQL;Pwd=YOUR PASSWORD FOR SQL",CDatabase::noOdbcDialog)
CString query="INSERT INTO Userinfo(Userid,Passw,Name,Address1,Address2,City,Country,Zip,Phone,Email,Pincode,Dateofentry) VALUES ('" + uid + "','" + pwd + "','" + uname + "','" + add1 + "','" + add2 + "','" + ucity + "','" + scountry + "','" + uzip + "','" + uphone + "','" + uemail + "','" + test + "',GetDate())";
db.ExecuteSQL (query);
To Read::
CRecordset rs( &db );
CString check;
check.Format ("SELECT Userid FROM Userinfo WHERE Pincode='" + test +"'");
rs. Open ( CRecordset::dynaset, check, CRecordset::none ) ;
rs.GetFieldValue("your field",CString variable to store);
after this you can convert it to integer or anythine..thats all..hope it helps..
cheers
Himanshu
|
|
|
|
|
hello,
I'm fresh to VC,
I need an example for loading picture to PictureBox(control).
e.g., if I enter the file path, like c:\abc.bmp, then the picture will be loaded into picture(control).
I don't know which is good, using Hbitmap or Cbitmap.
Could anyone give me some example code?
Thanks.
|
|
|
|
|
both of them does the same thing. Its just like if u set the bitmap through resource to any particular bitmap it is static type...There are other times when u need to change the bitmaps from time to time or depending on some conditions...then using HBitmap..and CBitmap are mre or less same..u can use any of them depending on the dialogs u r using..in most of the dialogs u will have to use CBitmap..as HBitmaps are global..and used for globally setting the Bitmaps to maybe other applications...not urs of course..Its just an idea..i am not sure though..Hope it helps
Himanshu
|
|
|
|
|
I'm trying to get a CString representation of _variant_t type VT_CY and VT_DECIMAL. Does anyone know of any classes/code out there that accomplishes this?
RS
|
|
|
|
|
Have you tried using VariantChangeType to convert to a BSTR ?
I'll admit it's not very controllable!
VT_CY doesn't look too bad: "A currency number is stored as 64-bit (8-byte), two's complement integer, scaled by 10,000 to give a fixed-point number with 15 digits to the left of the decimal point and 4 digits to the right." You can therefore work it out as follows:
__int64 unitPart = vt.cyVal / 10000;
UINT fracPart = vt.cyVal % 10000;
CString strValue;
strValue.Format( _T( "%I64d.%u" ), unitPart, fracPart ); Unfortunately, I can't find any documentation for VT_DECIMAL that indicates which bits do what. The document I referenced above ('VARIANT and VARIANTARG' in the Automation section of the Platform SDK) says only "Decimal variables are stored as 96-bit (12-byte) unsigned integers scaled by a variable power of 10. VT_DECIMAL uses the entire 16 bytes of the Variant."
|
|
|
|
|
No I didn't try VariantChangeType - didn't come across it. I was using itoa, ltoa, ultoa and _gcvt (float,double). I will test it out though.
You say that it's not controllable. What problems have you encountered?
Thanks for the currency snippet above. If I run into any anomolies with VariantChangeType I'll revert back to itoa, ltoa... and you currency code.
|
|
|
|
|
When I say 'not controllable', I mean that there's no way to specify how many digits you're going to get (for example, after a decimal point).
|
|
|
|