Adding button/control to an existing dialog
-
Hello, I have a handle of a dialog(The dialog lies in another process). Now I want to add a button to that dialog, is it possible ? Thanks.
-
Hello, I have a handle of a dialog(The dialog lies in another process). Now I want to add a button to that dialog, is it possible ? Thanks.
Have a function in your Dialog class that has this :
CButton* pButton = new CButton; pButton->Create("NewButton", WS_CHILD | WS_VISIBLE, CRect(x, y, x1, y1), this, 1234);
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus Best wishes to Rexx[^]
-
Hello, I have a handle of a dialog(The dialog lies in another process). Now I want to add a button to that dialog, is it possible ? Thanks.
You can either do
CreateRemoteThread
to create a thread in the other process and create the button from that thread. Or you can write a hook DLL that loads into the remote process and then create the button from the hook procedure. I don't think you can create a button using the handle of another window or dialog.«_Superman_»
-
Hello, I have a handle of a dialog(The dialog lies in another process). Now I want to add a button to that dialog, is it possible ? Thanks.
-
Identity Undisclosed wrote:
have a handle of a dialog(The dialog lies in another process). Now I want to add a button to that dialog, is it possible
Can you tell why you need this?
Regards, Sandip.
Just for learning purposes :)
-
Have a function in your Dialog class that has this :
CButton* pButton = new CButton; pButton->Create("NewButton", WS_CHILD | WS_VISIBLE, CRect(x, y, x1, y1), this, 1234);
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus Best wishes to Rexx[^]
I think I mentioned that the dialog exists in another process.
-
You can either do
CreateRemoteThread
to create a thread in the other process and create the button from that thread. Or you can write a hook DLL that loads into the remote process and then create the button from the hook procedure. I don't think you can create a button using the handle of another window or dialog.«_Superman_»
Yes, I was thinking that global hooks will be helpful. But can I get some sample code please. http://www.google.com
-
Hello, I have a handle of a dialog(The dialog lies in another process). Now I want to add a button to that dialog, is it possible ? Thanks.
-
Hello, I have a handle of a dialog(The dialog lies in another process). Now I want to add a button to that dialog, is it possible ? Thanks.
:) Resource Hacker[^] is a nice tool where you can permanently modify the resources of executable. Even if you create the button somehow, you will not be able to manage the messages properly. Anyway Injecting your custom DLL to the other project will help you to some extend....
-Sarath. "Great hopes make everything great possible" - Benjamin Franklin
My blog - Sharing My Thoughts
-
Hello, I have a handle of a dialog(The dialog lies in another process). Now I want to add a button to that dialog, is it possible ? Thanks.
Use this project[^] to inject code into the remote process. The code you inject should create the new button.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p