|
i used the ANSI_FIXED_FONT font, but it looks somewhat small
how can i change its size?
one is the other who absorbs the thoughts of others
|
|
|
|
|
If you are using MFC objects, this is as easy as creating a font using the CFont class, and having the control use the new font; for example:
<br />
m_fFont.CreatePointFont( 100, _T( "Courier New" ) );<br />
m_ecCodeEditControl.SetFont( &m_fFont );<br />
m_btCompileButton.SetFont( &m_fFont );<br />
Peace!
-=- James.
|
|
|
|
|
Well I got a problem with Shell_NotifyIcon (to put an icon in the systray). The prog compile well, and my icon appears on the systray but when I move my mouse over it, it disappears (maybe it comes from Windows Me) !!!!!
Any Idea ???????
[MLV]Tito
|
|
|
|
|
Post some code here or try download Chris Maunders CSystemTray class and use it or see how he have done it!
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
[MLV]Tito wrote:
my icon appears on the systray but when I move my mouse over it, it disappears
That happens when an icon is added, and then removed (like when your program shuts down): the actual icons are sometimes not actually removed until you mouse over them.
Might want to make sure that your code is not removing that icon.
Peace!
-=- James.
|
|
|
|
|
Here I am again!
Well, now I have to know how to encrypt a string into unknown chars, e.g:
d45R#! = sw.5v.n7.sd.4r.h5 // sw = d and 5v = 4 and n7 = 5 etc.
I know this is difficult (it should be!?), but how to do it? Is there a code somewhere?
It would be more safe to make it by your own but I don't know HOW!
When I tried to write a binary to the registry I could get the string anyway!
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
Do you need to do 1 way or reversable encryption?
|
|
|
|
|
I don't under stand...
But I want to encrypt and then decrypt...
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
Generally password encryption is done with a "trapdoor" algorithm, i.e. you can't decrypt. You record the encrypted password then, when someone tries to log in or whatever, the password they enter in encrypted through the same algorithm and the encrypted versions compared.
This kind of encrypted version is often called a "digest".
|
|
|
|
|
Malcolm McMahon wrote:
the password they enter in encrypted through the same algorithm and the encrypted versions compared.
Correct. That is the same thing that I told you (Rickard/CodeCracker) on your earlier post: you can use a MD5 hash, and compare the hashed values to perform matching.
If you will never need to "show" the password to the user (meaning, they can set an initial password, logon with a password, change their password, but never have it shown to them), then using a Digest is a pretty good solution.
Peace!
-=- James.
|
|
|
|
|
Tell me where to read about it!
I've tried MSDN Library but can't find anything about the MD5!
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
|
Howdy,
I'm not sure where to even start. I would like to pull and send information to and from other app's.
For example, Yahoo messenger, I would like to pull the text message from their rich edit box and display the same information in my dialog app.. I would also like to type text in my rich edit box and then transfer the info over to yahoo msgr.
Any Ideas on where I should start?
Thanks,
Rob
|
|
|
|
|
This question gets asked over and over again. There's a variety of methods, ranging from sockets to named pipes, altough the seemingly most popular method here in CodeProject is to use WM_COPYDATA (check the MSDN for further info).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
> For example, Yahoo messenger, I would like to pull the text message from their rich edit
> box and display the same information in my dialog app.. I would also like to type text in my rich
> edit box and then transfer the info over to yahoo msgr.
Joaquín M López Muñoz wrote:
This question gets asked over and over again. There's a variety of methods, [...]
[Just a thought... Since the OP is trying to communicate with an application that (s)he has no control over (IOW, no knowledge of any open Sockets, Pipes, or what Windows Messages to send), is such a blanket response appropriate? If so, I, as well as others I am sure, would be quite interested in learning about the "variety of methods" available for pushing and pulling data to/from other "closed" applications.]
If the application you are trying to work with does not expose an API for you to use (i.e. it is "closed"), you have your work cut out for you!
For your example, you may be able to use the WM_GETTEXT message (if you can directly target Yahoo's edit control with it) to get the text of the control (but it would likely get a plain text version of the contents, and only up to 64K of it).
But as far as getting any real functionality from it, you might be SOL... nbsp; I am sure that there is a way out there, but not sure about how easy that way is to implement...
Peace!
-=- James.
|
|
|
|
|
Yes, if one of the apps is closed, then none of the usual methods for interapp communications will work. I guess I overlooked this and just sticked with the interapp comms idea.
What do the acronyms IOW and SOL stand for?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
IOW
In Other Words
Joaquín M López Muñoz wrote:
SOL
Sh*t Out of Luck
Jon Sagara
What about ?
|
|
|
|
|
Thanks for the input! I just started to play around with WM_GETTEXT today, I think that will work for pulling the text from the edit boxes..
I have a question regarding WM_GETTEXT.. how do I point hWnd = to a control? I set hWnd = the title of the other app. (just for testing) and it returned the title of the dialog box. I'm unsure how I can point hWnd = a control..
Any ideas?
Thanks,
Rob
|
|
|
|
|
RobJones wrote:
I have a question regarding WM_GETTEXT.. how do I point hWnd = to a control?
That is part of the problem. You will likely have to enumerate all of the child windows of the target app 'till you find the one you want. You can use the "Spy++" utility to get the HWND (for testing), and see of WM_GETTEXT will work.
As I said above, you have your work cut out for you. What you are trying to do is far from trivial.
Peace!
-=- James.
|
|
|
|
|
Upps. Thats exactly what I am trying to do. But I was not succesful. I am using WM_GETTEXT message to get the text in the control but it does not work for all programs. In fact, it works only for primitive windows
Anyway, if you find a good way to implement this, please post it here. So that we can also learn it
Kind regards
Mustafa Demirhan
http://www.macroangel.com
Sonork ID 100.9935:zoltrix
|
|
|
|
|
I using PJ Naughter's class to read/write to the registry.
I want to write a password to the registry but it's pretty unsafe to write the password as a simple string that someone can "hack". So I found that a Binary value that is writen to the registry is not shown so that you can't read the password! Or?
How to declare a BYTE and assign it with values like: r4H#sy@
I can't find that possible!? :/ I'vwe tried.. but when creating a account in Outlook 2000 then a password is saved in the registry and it is a binary file that shows weird value but it's the password!
HEEEEEELP!!
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
How to declare a BYTE and assign it with values like: r4H#sy@
A BYTE is only a byte, a variable holding a value between 0 and 255. Most probably what you'll want to deal with is a BYTE pointer, designed either as BYTE * ot LPBYTE . This is the stuff you have to provide to registry functions storing binary values. Check this snippet of pseudocode:
UINT nBytes=8;
LPBYTE lpData=(LPBYTE)malloc(nBytes);
memcpy(lpData,"r4H#sy@",nBytes);
hklm.WriteProfileBinary(...,lpData,nBytes);
free(lpData); You'd do similarly for retrieving binary contents from the registry (though here you pass a pointer to nBytes instead of the value of nBytes itself, as the function stores there the size of the data copied upon return).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Rickard Andersson wrote:
I want to write a password to the registry but it's pretty unsafe to write the password as a simple string that someone can "hack". So I found that a Binary value that is writen to the registry is not shown so that you can't read the password! Or?
First, are you trying to encode the password somehow, or just store the password in REG_BINARY format instead of a normal string?
If you are looking for the former, instead of using some encryption, I would think about storing MD5 hash values instead. When you want to save the password, save the password's MD5 instead, and when you want to verify an entered password, generate an MD5 hash from it and compare it to the one you saved earlier.
If the latter, the code posted by Joaquín will do that, but with no kind of encryption whatsoever (meaning, it will be trivial to get the password from it).
BTW: If your application is going to use passwords, make sure it can handle someone deleting the password keys!
Peace!
-=- James.
|
|
|
|
|
A BYTE is just a typedef for an unsigned char.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
...to write a small app that shows up the time on screen.
This time should be visible even in openGL and D3D. Is this possible ? And if yes, how to do that..
tnx in advance, kixx
|
|
|
|