tempus
Member
- Joined
- Oct 8, 2013
- Messages
- 11
- Programming Experience
- 10+
It's been way too long since I've lurked around here but now I'm back and in need of some help.
From my app, I have a reference to a third party library that includes a little popup window. That popup window is very simple, a single combobox and two buttons. I'd like to change the appearance of that popup a bit to better blend with my application. I've already gotten the handle to the parent window and the handles to all the child controls however since this popup window is technically running in a separate process, I can't simply do something like the following because btn will always be null.
so... is there anyway to take that handle and set the button Text or the form BackColor or whatever? I'm guessing maybe a SendMessage call is in my future?
From my app, I have a reference to a third party library that includes a little popup window. That popup window is very simple, a single combobox and two buttons. I'd like to change the appearance of that popup a bit to better blend with my application. I've already gotten the handle to the parent window and the handles to all the child controls however since this popup window is technically running in a separate process, I can't simply do something like the following because btn will always be null.
C#:
[COLOR=blue]var[/COLOR] foo = FindWindow([COLOR=#a31515]"Form Title"[/COLOR]);
[COLOR=blue]var[/COLOR] bar = GetAllChildrenWindowHandles(foo, 50); [COLOR=green][FONT=Consolas]//bar does contain all the child control handles. I confirmed this with MS Spy++[/FONT][/COLOR]
[COLOR=#2b91af]Control[/COLOR] btn = [COLOR=#2b91af]Control[/COLOR].FromHandle(([COLOR=#2B91AF]IntPtr[/COLOR])bar[2]);
btn.BackColor = [COLOR=#2b91af]Color[/COLOR].Red;
so... is there anyway to take that handle and set the button Text or the form BackColor or whatever? I'm guessing maybe a SendMessage call is in my future?