|
The easiest thing to do is to add a small bright banner at the top of the viewer application stating that the document has been watermarked to identify leaks, w/o actually doing anything to the document. That could be intimidating enough.
|
|
|
|
|
Just one curiosity:
why is your "vendor" giving "confidential document" to people he doesn't trust?
Why should the "customer" trust you "vendor"'s products?
If the the bug is in the problem, every answer is "bad".
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
Emilio Garavaglia wrote: why is your "vendor" giving "confidential document" to people he doesn't trust?
Why should the "customer" trust you "vendor"'s products?
Why was original poster looking for a possible technical solution? Because opportunity makes the thief and by limiting the quick-n-easy access you already prevent the majority of people from doing something stupid. It's why we have crappy locks on our doors, it does not keep out trained intruders/thiefs/ninjas, but still better than having them unlocked, just a little lock does a great job. Unfortunately, there is no simple technical solution to prevent data theft or screen capturing.
/M
|
|
|
|
|
Locks are only meant to keep the honest ones out.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Nobody is going to prohibit to put YOUR lock on YOUR door.
But if you want to put YOUR locks on MY door ... at least you should agree.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
I could take a picture of the screen ... so ... do the math.
Watched code never compiles.
|
|
|
|
|
Hi all,
I have an MFC program that (amongst others) stores some files with different types (like .msg, .doc, .eml etc) When the user selects one such files, I would like to start the relevant software to open that file much like what happens when I doubleclick on a file from the explorer.
How do I do such a thing? (one: how do I find-out which program to start based on the file's extension and two: what is the easiest way to start that program?)
Thanks in advance
William
|
|
|
|
|
|
Thanks a lot. This indeed solved my issue.
Regards,
William
|
|
|
|
|
ShellExecuteEx() would automatically open the associated program based on the file type.
|
|
|
|
|
I know you mean "execute" in a computing context, ie "run".
But I had a different picture when I saw your subject heading.
exe -> *Bang!*
txt -> *chop!*
doc -> *defenestrate!*
Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
Although there are definately certain files that I would gladly *kill*, *exterminate*, etc You are right in assuming that my question was intended to be boringly technical.
|
|
|
|
|
I'm coding a plotting app using coordinates data saved in a .txt file.
So I need access files in CDialog::OnPaint().
But it seems not to work coz I find the file pointer doesn't move though CFile::Seek() and
CFile::Read() are used.
Or could a while loop be in CDialog::OnPaint()?
modified on Tuesday, September 7, 2010 10:46 PM
|
|
|
|
|
Krauze wrote: So I need access files in CDialog::OnPaint().
I don't think so. OnPaint() may be called hundreds of times, when your window gets resized, maximized, restored, covered and uncovered by some other window, etc. So you should read the file once, beforehand, outside OnPaint(); store all the information in an appropriate data structure, and use that inside OnPaint().
|
|
|
|
|
In fact there're up to 30,000 coordinates.
So it's kinda terrible to store all of them in a particular structure at runtime.
|
|
|
|
|
why not use a CArray. store the complete set of values and then load the values dynamically
|
|
|
|
|
It's even more appropriate to store the data rather than to read the full file again. For your information, I wrote an article about a charting control, maybe you can have a look at it and use it instead of recreating your own (see my sig). It works fine with that amount of data.
|
|
|
|
|
Just in case the point is not sinking in.
30000 x CPoints = 30000 * 8 bytes = 234k = 1/4 Mb.
I think you can afford to use that much ram.
What you can't afford is disk access every time your application needs to paint.
Cedric's article is a good one - and can thoroughly recommend it.
Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
|
30000 coords 8 bytes each are less than half a megabyte. That's not a big issue!
Unless you think your file can be (in certain situations) millions of coords long!
But -if that's the problem- consider also that the screen doesn't have millions of points in a line, so it is very wasteful keep all those details during drawing, since nobody will never physically able to see them.
If that's the case, consider a design where your file is read in a vector that should not have much more than 10000 records, each of which takes the min, average and max value of a group of coords wide like the number of coords dived by the number of records.
At that point, during ON_PAINT, draw an area that for each of the three values, fills the space between the min and max and draw over it a line that follows the average.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
Just a precision, your answer makes me wonder. You are not thinking about something like this are you ?
structure data
{
double XVal1;
double YVal1;
double XVal2;
double YVal2;
....
....
...
double XVal30000;
double YVal30000;
};
This would indeed be really really really horrible code and a good candidate for The Daily WTF[^]
|
|
|
|
|
Hi, dear all
I need to create a text file with each control at a line, in this line, it include control value, control name and description, the output should be as the following:
False Print - XXXXXXXXXXXXXXXXXXXXXXXXXX
2 Contrl 1 - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
3.6 Control 2 - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
23.8 Control 3 - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0.005 Control 4 - XXXXXXXXXXXXXXXXXXXXXX
The problem is align the column 1, how can I align the decimal point at same position at each line, and prefix the heading as space? and the heading space number is changed according the value?
For example, for contrl 1 and control 2, the heading space is 3, but for control 3, it's 2.
I use something like:
value = Format(Contrl1, " 0")
Writer.WriteLine(value.PadRight(ValueFieldLen) & _
"Contrl 1".PadRight(ContrlFieldLen) & _
"- XXXXXXXXXXXXXXXXXXXXXXXXXX")
value = Format(Contrl3, " 0.0")
Writer.WriteLine(value.PadRight(ValueFieldLen) & _
"Control 3".PadRight(ContrlFieldLen) & _
"- XXXXXXXXXXXXXXXXXXXXXXXXXX")
In this way, the prefix spacing is fixed, this isnot I want.
Thanks!
|
|
|
|
|
VB???? What's that?
Once you agree to clans, tribes, governments...you've opted for socialism. The rest is just details.
|
|
|
|
|
Please, ask your question in the VB forum. This forum is for C++.
|
|
|
|
|
Hey everybody
I have the following code:
wstring curlocale1(::_wsetlocale(LC_ALL, NULL));
printf("+++ current locale: %s", curlocale1.c_str());
::_wsetlocale(LC_ALL, L"en_us");
wstring curlocale2(::_wsetlocale(LC_ALL, NULL));
printf("+++ current locale: %s", curlocale2.c_str());
and the output is:
+++ current locale: C
+++ current locale: C
I can't understand why my locale does not change, what am I doing wrong?
Thanks a lot!
|
|
|
|