| |

VerySource

 Forgot password?
 Register
Search
View: 997|Reply: 5

How can the CToolTipCtrl prompt prompt immediately, now it is a while to wait for the prompt to appear?

[Copy link]

1

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 Singapore

Post time: 2020-10-12 09:30:01
| Show all posts |Read mode
How can the CToolTipCtrl prompt prompt immediately, now it is a while to wait for the prompt to appear?
Reply

Use magic Report

0

Threads

12

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-10-12 09:45:01
| Show all posts
CToolTipCtrl::SetDelayTime
void SetDelayTime( UINT nDelay );

void SetDelayTime( DWORD dwDuration, int iTime );

Parameters

nDelay

Specifies the new delay time, in milliseconds.

dwDuration

Flag that specifies which duration value will be retrieved. See CToolTipCtrl::GetDelayTime for a description of the valid values.

iTime

The specified delay time, in milliseconds.

Remarks

Call this function to set the delay time for a tool tip control. The delay time is the length of time the cursor must remain on a tool before the tool tip window appears. The default delay time is 500 milliseconds.

The default is half a second, you can write ToolTipCtrl yourself or try the above method
Reply

Use magic Report

1

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 Italy

 Author| Post time: 2020-10-12 19:15:01
| Show all posts
The big brother upstairs, SetDelayTime is afraid that it is setting the stay time that is displayed.
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-10-12 22:45:01
| Show all posts
::SendMessage(hWndTooltip,TTM_SETDELAYTIME,(WPARAM)(DWORD)TTDT_INITIAL,(LPARAM)(INT) MAKELONG(2500,0));// Is 2.5 seconds long enough?
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-10-13 08:00:01
| Show all posts
m_toolTip.SetDelayTime(TTDT_INITIAL, 0);

TTDT_AUTOPOP Retrieve the length of time the tool tip window remains visible if the pointer is stationary within a tool's bounding rectangle.


TTDT_INITIAL Retrieve the length of time the pointer must remain stationary within a tool's bounding rectangle before the tool tip window appears.


TTDT_RESHOW Retrieve the length of time it takes for subsequent tool tip windows to appear as the pointer moves from one tool to another.
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-10-13 08:30:01
| Show all posts
m_toolTip.SetDelayTime(TTDT_INITIAL, 0);

Just set the second parameter, in milliseconds
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list