Find Jobs
Hire Freelancers

Using C++Builder Install new code to update ActivateHint()

$30-250 USD

Completed
Posted almost 8 years ago

$30-250 USD

Paid on delivery
I am using C++Builder XE4 Pro with the VCL 32 bit Platform. I am updating the hint for a PaintBox in the Mouse Move event. The paintbox is on an MDI Child form. My code is misusing ActivateHint(). I have two solutions to update the hint correctly. I need someone install each solution. I have created a MDI Child application with a PaintBox on the child form. The sample project will show a mouse over hint box which displays the X Y coordinates and a few random numbers. Here is what I need you to do. You should make a copy of the attached sample application. Install solution #1 in the first sample project. Install solution #2 in the second sample project. Make sure to remove the original incorrect hint update code. When each solution will compile and run in a C++Builder application the job is complete. The working source code can be provided after payment is made. //-- //--Below are the two solutions for updating the Hint box I need installed. //-- Solution 1. use the TApplication(Events)::OnShowHint event: void __fastcall TMDIChild::ApplicationEvents1ShowHint(String &HintStr, bool &CanShow, THintInfo &HintInfo) { if ([login to view URL] == PaintBox1) { [login to view URL] = Point(X+10, Y-10); [login to view URL] = Rect(HintInfo.CursorPos.X, HintInfo.CursorPos.Y, HintInfo.CursorPos.X+1, HintInfo.CursorPos.Y+1); [login to view URL] = MyHintMsg; } } Solution 2. subclass the TPaintBox and handle the CM_HINTSHOW message: private: TWndMethod OldWndProc; __fastcall TMDIChild::TMDIChild(TComponent *Owner) : TForm(Owner) { OldWndProc = PaintBox1->WindowProc; PaintBox1->WindowProc = &PaintBoxWndProc; } __fastcall TMDIChild::~TMDIChild() { PaintBox1->WindowProc = OldWndProc; } void __fastcall TMDIChild::PaintBoxWndProc(TMessage &Message) { OldWndProc(Message); if ([login to view URL] == CM_HINTSHOW) { PHintInfo HintInfo = reinterpret_cast<PHintInfo>([login to view URL]); HintInfo->CursorPos = Point(X+10, Y-10); HintInfo->CursorRect = Rect(HintInfo->CursorPos.X, HintInfo->CursorPos.Y, HintInfo->CursorPos.X+1, HintInfo->CursorPos.Y+1); // alternatively: /* HintInfo->[login to view URL] = HintInfo->CursorPos; HintInfo->[login to view URL] = Point(HintInfo->CursorPos.X+1, HintInfo->CursorPos.Y+1); */ /* HintInfo->[login to view URL] = HintInfo->CursorPos; HintInfo->[login to view URL] = Size(1, 1); */ HintInfo->HintStr = MyHintMsg; } } //------------- There should be two files attached to this job. [login to view URL] with a sample project made in C++B XE4. And SampleAppPicture.png.
Project ID: 10414911

About the project

4 proposals
Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
12+ years of experience programming in C++ Builder, started when it was owned by Borland, currently using XE3 Derived my own custom controls from VCL controls Experience handling Windows messaging for mouse, keyboard, painting, etc. Decent English language skills :), located in Knoxville, TN (no timezone barrier), this looks like a fun little project for my evening free time
$222 USD in 1 day
5.0 (1 review)
2.7
2.7
4 freelancers are bidding on average $193 USD for this job
User Avatar
I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 6 years. My work is online game developing, and mainly focus on server side, using c++ under Linux environment. I used c++ to make many great projects, for example, I made the tools which can convert java files into c++ scripts, of course garbage collection included, this job is very similar to a compiler, and is very complex. I also made our own mobile game using c++, I can show you the demo of client, if you like. I am very proficient in java also. I have a very good review on Freelancer.com, I never miss a project once I accept the job, you can check my review. Trust me, please let expert help you.
$150 USD in 2 days
4.9 (141 reviews)
7.0
7.0
User Avatar
More than 25 years of C/C++ programming, including Borland's environment. ---------------------------------------------------------------------------------------------
$177 USD in 10 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Austin, United States
5.0
6
Payment method verified
Member since Feb 28, 2010

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.