Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / General Programming / win32 hacking Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
David Olsson

March 31, 2005, 10:29 AM

Perheps slightly off-topic.

I want to change the contents of a combobox in another running program.
Getting the HWND of the the combobox is a piece of cake but it seems the only thing I can do is disable it with EnableWindow. Any tips ?
I've tried SetWindowText, CB_ADDSTRING and so on, doesn't seem to respond to any of it. The combobox I'm trying to manipulate is the file combobox in the standard "save file as..." dialog.

 
ector

March 31, 2005, 12:03 PM

You might have to inject code into the foreign process. Search for code injection or something on CodeProject to find an example..

 
David Olsson

March 31, 2005, 02:23 PM

Found the solution. Apparently you cannot use SetWindowText outside your own process, but SendMessage(... WM_SETTEXT ... works.
I had already tried PostMessage( ...WM_SETTTEXT... but PossMessage doesn't handle pointers which is quite logically since it's asynchronous. I should have figured that out directly but I didn't.

Now I only have one problem left, I need to figure out a way to manipulate another programs menu.

 
This thread contains 3 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.