|
Yes, you'd have to set the erase background flag to true in the call and call UpdateWindow() to force an immediate paint. That worked on older OSs but on Windows 7 the updates don't happen while you have the mouse button pressed it seems. It does work on the LBUTTONUP message (just tested it).
You may have to double buffer - grab the image for the rect from the screen, draw your rectangle, draw the captured image back to the screen to erase, etc.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Deja Voodoo. It almost feels like I posted an answer[^] to this problem some days back?
Use SetROP2 to rubberband it.
Yes, you can mix GDI and GDI+ together in the same application. You just need to understand how each works to make them complement each other.
|
|
|
|
|
Hi all,
i am creating a html file,and write data in html file line by line with different formatting of color and font.
now i want to encrypt this file,now please tell me how can i do this?
what method use for this?
either encrypt the file or encrypt the string that is have to be written on this file.
and on decryption side how can i recover it in normal readable format.
please help me and guide for this.
if possible please explain me with any example.
thanks in advance.
|
|
|
|
|
|
tell me also some idea for same situation for mac os.
|
|
|
|
|
Google for : Html encryption.
You will find product such as:
http://www.allynova.com/encrypt-web-pro-order.html
I guess that if you want to encrypt HTML page sent over the web, it would be the way to go...
Or also, you could check:
http://www.iwebtool.com/html_encrypter
This is not very secure but since your page as to be displayed anyhow, what is the purpose to encrypt it.
If the reason is for transport, then probably it should be sent over a securized connection.
Philippe Mori
|
|
|
|
|
What is the purpose to encrypt a HTML file ? And why HTML ?
If the purpose is to protect something on the web, then client side protection is very weak.
Philippe Mori
|
|
|
|
|
I have written an application in c# that has a reference to a dll written in c++. I can run the application in debug mode and it works great, but after I build the application, it will not start and gives me the following error, any thoughts on how to resolve this?
http://img9.imageshack.us/img9/1913/sidebysideerror1.jpg
|
|
|
|
|
You need to at least narrow down whether it is the C# application or the C++ DLL.
"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
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
Hi, thanks for the response. The event log indicates it is the c++ dll that is causing the error. What else would you like to know?
|
|
|
|
|
I have seen that error when you mix 64 and 32 bit platforms. The application and the dll need to agree on their "bitness". Check your build parameters for C# to see the platform selected. If it says "Any", that means that, at runtime, it will pick the architecture best for the machine you are running on. If the dll doesn't match that, you will get this error.
|
|
|
|
|
Thank you, I will try that on Monday when I get back to work and reply back with the results.
|
|
|
|
|
|
Sorry, I don't use Visual Studio Express. In Visual Studio 1008 Enterprise it's in the Project Properties, Build tab, Platform Target field. There's a setting for both Debug and for Release. Sorry I can't post a screenshot of the relevant screen.
|
|
|
|
|
After trying many different settings in VS 2008, I downloaded a different version of the helper dll that I was using and this seems to have fixed the issue. Thank you to the two people that replied.
|
|
|
|
|
I'm experimenting with D and I'm trying to make a resource manager much like the C# one.
Now I'm hitting a problem...
How do I know the current user locale? i.e. "en-Au" / "en" ?
I found this function: GetUserDefaultLocaleName
but apparently it's only post vista... what if my program run on XP? what should I do? (I'm trying to write an installer, so I'd like to cater, at least from XP tp 7!)
I found this one too: GetUserDefaultLCID() but what am I to do with a LCID?
Is there a referenc etable I can use?
[EDIT]I just found a big table with the exhaustive list of locale...
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
modified on Thursday, June 2, 2011 12:29 PM
|
|
|
|
|
Have you tried GetLocaleInfo() ?
"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
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
I haven't. The fact it doesn't seems to work on vista and later where I should use GetLocalInfoEx() is a problem.
But I have an exhaustive dictionary of all LCID and and their code name, much better for me!
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
Super Lloyd wrote: The fact it doesn't seems to work on vista and later where I should use GetLocalInfoEx() is a problem.
I'm not sure what you mean by this, but GetLocaleInfo() dates all the way back to Windows 2000, whereas GetLocaleInfoEx() works on Vista and newer.
"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
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
#define MyTemplate( filename ) "D:/Template/MyApp/" # filename
#include MyTemplate( stdafx.h ) // failed to compile
int main()
{
cout << MyTmeplate( stdafx.h ) // ok, print "D:/Template/MyApp/stdafx.h"
}
How to include files in "D:/Template/MyApp/" if I don't copy them to my own project directorie?
solution like the macro doesn't work perhaps #include instruction doesn't accept another '#' in its statement.
Could someone help me, thanks in advance!
|
|
|
|
|
I recommend you have a look at Token Concatenation[^]. That explains how to define and use a C macro to concatenate tokens.
|
|
|
|
|
Considering you're using stdafx.h, I assume you are using Visual Studio? Why not just add the include directory to Additional Include Directories in the Project Properties dialog, under the C/C++ tab. That way, there's no need for possibly troublesome macro's and makes it easier to maintain.
For other build environments there should be similar options.
|
|
|
|
|
Thank you. That's a nice solution.
|
|
|
|
|
I found another trouble, I have to include the D:\template for every individual project. Is it possible to include it like "VC98\include" as an one-time-job ?
|
|
|
|
|
In vs2005,
1. Go to Tools->Options
2. Click on projects and solutions tree item
3. Select vc++ directories item
4. Select Include files in drop down window "Show Directories for"
5. Then add your include directory.
I think it will be same in all VS IDE.
http://www.mono-project.com/Main_Page
|
|
|
|