|
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
|
|
|
|
|
You want the time up while you play games, don't you ?
No, because going fullscreen in DX will override all other apps AFAIK.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Hi,
I am using a Dialog based application,
When the Main dilaog is displayed i want to create another dialog(modeless dilaog), i used the CDilag::create function but it's not working, i think i have a problem with the second urgument(CWnd*)
what do i missing here?? and what do i have to write in the second urgument???
Thanks
|
|
|
|
|
The second argument is the parent window (in your case, probably the main dialog).
It's hard to know what's going wrong with your app. Remember that modeless dialogs must be created on the heap (i.e. with new CYourDialog ) or defined as members of the parent window, and never be defined as local variables inside a funtion.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
meirav wrote:
i used the CDilag::create function but it's not working,
You need to make sure that you call CWnd::ShowWindow( SW_SHOW ) after creation of the non-modal dialog; either in the non-modal dialog's constructor, or directly, after creation.
Peace!
-=- James.
|
|
|
|
|
I need to copy a project dialog from one project to another in Visual C++. There doesn't seem to be an easy way to do this. What am I missing?
|
|
|
|
|
Kevin Ranville wrote:
I need to copy a project dialog from one project to another in Visual C++. There doesn't seem to be an easy way to do this. What am I missing?
Load either project, and then open the other project's RC file in DevStudio. You can then drag and drop between RC files (hold down the CTRL key during the drag to force a copy operation).
You can also just open both RC files and do the same thing.
Peace!
-=- James.
|
|
|
|
|
I tried that. When I go to drop the dialog icon into the destination project the icon turns into a "block" icon. I tried a few other things with importing and copying and nothing seems to work. So then I posted this post.
|
|
|
|
|
Kevin Ranville wrote:
I tried that. When I go to drop the dialog icon into the destination project the icon turns into a "block" icon.
(Did you try both methods?) Explain exactly where you are trying to drop the dialog. Also, are you sure the target RC file (and it's Resource.h file) are not read-only?
Peace!
-=- James.
|
|
|
|
|
Perhaps the problem is with using DevStudio. I'm simply using two instances of Visual C++ 6. Is that the same thing?
|
|
|
|
|
Kevin Ranville wrote:
I'm simply using two instances of Visual C++ 6. Is that the same thing?
No. All that should happen then is the "other" DevStudio showing a message that a file has been modified and should be reloaded (if it had that file opened at the time it was changed).
BTW: You should be doing the Drag-N-Drop only across a single instance of DevStudio... Just open both files in DevStudio.
Peace!
-=- James.
|
|
|
|
|
To copy a dialog D from project P1 into project P2, do the following:- Open project P2 in DevStudio and click the Resources tab when the project has loaded.
- Drag P1.rc into DevStudio. It will display as a group of resources. Select the dialog (or any other resource) you want to copy, and do Edit|Copy.
- Click the root of project P2's resource tree and do Edit|Paste.
This will copy the resource (but not the source files). You'll need to copy (and later edit) the appropriate files to P2's directory and Project|Add|Files them to the project.
/ravi
"There is always one more bug..."
ravib@ravib.com
http://www.ravib.com
|
|
|
|
|
I tried this as well. When I select the destination Resource tree "Paste" is greyed out.
|
|
|
|
|
You are working with thw Soursafe?
Regards...
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
You are working with the Soursafe?
Regards...
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Kevin,
Are you accessing your project thru a version control system like SourceSafe or ClearCase? If so, you'll first need to check out the P2.rc and P2's resource.h files in order to modify them. If not, make sure these files aren't read-only. Hope this helps.
/ravi
"There is always one more bug..."
ravib@ravib.com
http://www.ravib.com
|
|
|
|
|
Great! Thank you for this tip.
|
|
|
|