Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/VCL/Core VCL Classes/TForm    [ Add a report in this area ]  
Report #:  79593   Status: Reported
Hints in DLL form affect standard message handling
Project:  Delphi Build #:  14.0.3615.26342
Version:    14.0 Submitted By:   Wayne Schou
Report Type:  Basic functionality failure Date Reported:  11/17/2009 8:32:05 PM
Severity:    Serious / Highly visible problem Last Updated: 10/18/2010 1:01:14 PM
Platform:    All versions Internal Tracking #:  
Resolution: None  Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: 12
Description
When creating a form from a COM object the displaying of hints interferes with how MouseDown, MouseUp and Click occur  - Click general does not fire, and MouseUp processed before MouseDown.

It used to work in Delphi 2009 (and Delphi 6).

Have included program that demonstrates issue.

Cause appears to be UnhookHintHooks which calls Application.HandleMessage when mousedown received but then Application.HandleMessage picks up MouseUp from message queue. (MouseDown then handle by standard WndProc after).

Use to work in Delphi2009 where UnhookHintHooks uses  
    WaitForSingleObject(HintThread, INFINITE); i.e. no attempt to process messages.

Delphi2010 UnhookHintHooks  uses
      while MsgWaitForMultipleObjects(1, LHintThread, False, INFINITE, QS_ALLINPUT) <> WAIT_OBJECT_0 do
        Application.HandleMessage;





Steps to Reproduce:
1. Build DLLHintTest.dproj (creates COM dll)
2. regsvr32 DLLHintTest.dll
3. Build CallingApp.dprog
4. Run CallingApp.exe
5. Click "Open DLL created form" button
6. Click "Has Hint" button when hint is displaying. - note order of events (UP then DOWN) and missing Click.
7. Click "Clear" Note: additional btnHasHint messages.
8. Click "No Hint" button - note correct order.

Workarounds
None
Attachment
Source.zip
Comments

None

Server Response from: ETNACODE01