|
OK thanks i'll have to save up then.
I'm not late, I'm just not as early as I could have been.
|
|
|
|
|
If you truly need to support numerous environments with a gui app, your best bet is to buy a cross platform development library and code to that rather than MFC. At one of the telcos I worked at, they were using ZApp for that purpose (personally, I hated the constraints since the product I was working on was Windows only and MFC was more familiar).
Do a search on the net for cross platform libraries and you'll come up with a number of solutions that cover Windows, Mac & Unix.
Chistopher Duncan
Author - The Career Programmer: Guerilla Tactics for an Imperfect World (Apress)
|
|
|
|
|
Is there a way to know if a window have a particular style (ex : WS_EX_LAYERED) ?
I know GetWindowLong(hWnd, GWL_EXSTYLE), but I don't how to ckeck ONE style with this function.
Thanks for your help
|
|
|
|
|
if ((GetWindowLong(hWnd, GWL_EXSTYLE) & WS_EX_LAYERED) != 0)
...
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Hi,
I want to encrypt the password & store it in registry.Also i should be able to decrypt the string.
How can i do that?
|
|
|
|
|
There are a few libraries available on
the net that contain ready made encryption functions..
One of the more popular ones is called cryptpak or
something similar, and contains quite a few popular
encryption algorithms like DES, Blowfish etc.
Or you could write your own encryption functions - try
searching for encryption algorithms on google and you
should find a few sites that explain the basics of how
to write code to encrypt data.
|
|
|
|
|
There are several Crypto articles here on CP. Also Windows includes Crypto functions. And finally look at Crypto++ http://www.eskimo.com/~weidai/cryptlib.html
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
Neville Franks wrote:
There are several Crypto articles here on CP
There is...?
I've only seen the one implementation on CBlowFish...perhaps you could direct me to another...?
Thanx!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
HockeyDude wrote:
There is...?
Do an Article search on Crypt. Also look at codeguru.
Here's a few:
http://www.codeproject.com/file/filecrypt32.asp
http://www.codeproject.com/file/logit.asp
BTW Crypto++ rocks. Can't comment on these articles though as I've not read them.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
Cool thanx...i'll check em out!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Anonymous wrote:
I want to encrypt the password & store it in registry.Also i should be able to decrypt the string.
How can i do that?
For a different approach, consider this... I never use encryption for things like Passwords in applications: instead, I use a one-way hash (like MD5) and store the hash instead.
So basically, when the user sets a password, you take the password, calculate a hash from it, and store the calcualted hash value in the registry/database/wherever/whatever.
Later on, when you need to verify a password, you take the entered password, calculate a hash from it, and then compare it aganist the previously stored hash value.
BYW: This method also allows you to use passwords of any length, because the hash value (in the case of MD5) is always the same length.
Peace!
-=- James.
|
|
|
|
|
I have Formview so it does not support printing,I want when user click on one of menu print preview open and user print it.How can I do that? I know how to write in print preview but donna know how to open it.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
I am looking for a way to display system date and time in my Win32 application?? any suggestions.
|
|
|
|
|
You can use GetSystemTime and/or GetLocalTime
Nish
Has anyone seen my sig?
|
|
|
|
|
Also if you happen to be using MFC you could use CTime.
-Jack
To an optimist the glass is half full.
To a pessimist the glass is half empty.
To a programmer the glass is twice as big as it needs to be.
|
|
|
|
|
Thx for the response. Now, if I have to keep displaying accurate time, I will have to invoke a thread to repeatedly update it, right?? Please tell me if I am thinking on the right lines
|
|
|
|
|
girishc wrote:
Now, if I have to keep displaying accurate time, I will have to invoke a thread to repeatedly update it, right??
Yes, that's what you'll need to do. Need not have a separate thread. Just start a timer.
Nish
Has anyone seen my sig?
|
|
|
|
|
When updating the displayed time, be sure to update the displayed string only if it's (the string) different. Otherwise you'll see unnecessary flicker. If you're using a timer (as Nish suggested), set the interval to slightly less than one second.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Wont setting the timer to less than a sec. hog up CPU and my program might not be able to do anything else?? or is it ok??
|
|
|
|
|
No it won't hog up the CPU. WM_TIMER are among the lowest priority messages and are automatically compacted by Windows. That is, if you receive 4 WM_TIMER messages for the same timer, Windows will automatically compress them into a single message. Try it, you'll see!
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I wanna print some text.I have formview so I don't wanna use OnDraw().In my OnPrint(),I don't know how can I check if it reaches to the end of page ,and how to set the next page true.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
I think I find it.m_rectDraw and m_bContinuePrinting are the things I need,I guess.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
Hello.
I have a cmd line process that returns a value via the command interpreter (using sytem()). How do I get the same result value using Createprocess()?
|
|
|
|
|
If I follow you correctly, you're creating a process and want to get it's exit code, right?
HANDLE hProcess = CreateProcess(...);
WaitForSingleObject(hProcess, INFINITE); // Make sure it's done
DWORD dwExitCode;
GetExitCodeProcess(hProcess, &dwExitCode);
If the process is still active, dwExitCode == STILL_ACTIVE.
Hope this helps.
|
|
|
|
|
sultan_of_6string wrote:
WaitForSingleObject(hProcess, INFINITE); // Make sure it's done
sultan_of_6string wrote:
If the process is still active, dwExitCode == STILL_ACTIVE.
It wont be active as you are waiting INFINITEly
Nish
Has anyone seen my sig?
|
|
|
|