Link to home
Start Free TrialLog in
Avatar of SuperMario
SuperMario

asked on

nietod, or anyone... ugh, still confused! help!

OkAy...

Now that I know which functions to use, I still don't know exactly HOW to use them.

How would EnumChildWindows() find an edit box? Does it find the resource ID?

Can I get some code for this?
D
Avatar of nietod
nietod

Once you have the parent window you call EnumChildWindows() specifing the parent window's handle and a pointer to a callback procedure you've written.  windows will call your callback function for each child window that the specified window has.  for each window, check to see if it is the edit box window, if so, you've found it, do whatever you want with it and then return FALSE, to stop enumeration.   If it is not the target window, return TRUE to continue enumeration.

You can test if a window is an edit box by looking at its class name.  You obtain that with GetClassName().
Avatar of SuperMario

ASKER

Okay...
I tried EnumWindows, but.. I honestly have no clue how to implement this into code. I'm sorry I'm being so dense about it. I need just... code. I'm a visual learner.
D
oo0o0o0....

Using Spy ++, I found the handle, class, style and rect of the edit box. So now, how would I put text into this window w/ the given info?

Thanks so much,
D
Now that I found this, I tried just changing its caption. It sucks though, because no matter what I try I get a "This program has performed an illegal operation" because of an unhandled exception in MFC42D.DLL.\

This is getting mighty confusing.
D
ASKER CERTIFIED SOLUTION
Avatar of Answers2000
Answers2000

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That should do it! Thanks a ton.