•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 397,850 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,324 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser:
Views: 1614 | Replies: 3
![]() |
•
•
Join Date: Jul 2007
Posts: 15
Reputation:
Rep Power: 2
Solved Threads: 0
Hello everyone
I'm trying to write a program in native c++ code that will do this:
When drawing in MS Paint and I press the P key on the keyboard, the Pencil tool will become the current tool.
I really want to stay away from installing drivers, injecting dlls, reverse engineering, and many other complex things to do such an easy task.
Normally, this would be easy but the Pencil tool in MS Paint is not a window. All those tools are inside a toolbox, and the toolbox is a window.
I could get the coords of the toolbox and then simulate a mouse event on the coords + the offset of the pencil tool but you can get rid of the toolbox and then it has no coords and thus, the program fails.
Really, I'm looking for a way to run the code that is run when you click the pencil tool in MS Paint. I want the Pencil tool to become the current tool when I press P on my keyboard.
Also, I plan on distributing this application so I can't apply changes on my computer to get this to work.
Here is my code so far. The comment is where I need to insert the code that changes the current tool to the pencil tool:
http://rafb.net/p/Nfb2lT78.html
Thanks for any help.
I'm trying to write a program in native c++ code that will do this:
When drawing in MS Paint and I press the P key on the keyboard, the Pencil tool will become the current tool.
I really want to stay away from installing drivers, injecting dlls, reverse engineering, and many other complex things to do such an easy task.
Normally, this would be easy but the Pencil tool in MS Paint is not a window. All those tools are inside a toolbox, and the toolbox is a window.
I could get the coords of the toolbox and then simulate a mouse event on the coords + the offset of the pencil tool but you can get rid of the toolbox and then it has no coords and thus, the program fails.
Really, I'm looking for a way to run the code that is run when you click the pencil tool in MS Paint. I want the Pencil tool to become the current tool when I press P on my keyboard.
Also, I plan on distributing this application so I can't apply changes on my computer to get this to work.
Here is my code so far. The comment is where I need to insert the code that changes the current tool to the pencil tool:
http://rafb.net/p/Nfb2lT78.html
Thanks for any help.
>I really want to stay away from installing drivers, injecting dlls, reverse engineering, and many other complex things to do such an easy task.
I think this is unavoidable. You need to find out how to access the api calls for paint. If such things exist. How, I don't know.
I thought there might be an option to add a paint com library with vb express 2005, but I couldn't see it. Hmm.
I think this is unavoidable. You need to find out how to access the api calls for paint. If such things exist. How, I don't know.
I thought there might be an option to add a paint com library with vb express 2005, but I couldn't see it. Hmm.
Last edited by iamthwee : Aug 18th, 2007 at 9:45 am.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
•
•
•
•
activation advertising antivirus apple browser c# code computer console crack development exploit firefox game gaming google internet ipod key linux malware microsoft mobile mozilla mp3 news novell office operating orcas os pc product red hat search security serial software source survey system upgrade virus vista vsts web windows xbox 360 xp zune
- How To Download and Save Windows Vista Updates. (Windows Vista)
- Simulate Mouse Move (C++)
- How to store data in data grid to database by single mouse click in Asp.net (ASP.NET)
- Simulate Mouse Click (Visual Basic 4 / 5 / 6)
- Microsoft Wireless Optical Mouse 2.0 - Middle Button (Peripherals)
- Mouse Right Click Menu (Windows NT / 2000 / XP / 2003)
- Mouse buttons are messed up (Peripherals)
- Installed Optical wheel mouse - keyboard started having troubles (Windows 9x / Me)
- I can no longer click & view images (Web Browsers)
Other Threads in the C++ Forum
- Previous Thread: read from xml into array
- Next Thread: [Question] Classes



Linear Mode