We help IT Professionals succeed at work.

How to display Tooltip window right aligned/left aligned.

Last Modified: 2013-12-27
I am working on a project which needs to display tooltip windows. I am using the following api to
show the tooltip window.

BOOL SetWindowPos(HWND hWnd,HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags );

When we use above api, by default, window will be left aligned and displayed at (X,Y) screen co-ordinate. Is there any way to display the same window right aligned with respect to some point?
Which combination of flags is used in invoking the api? Is there any other api specifically to display the
window right aligned with respect to some point.

From few websites, i could find that we can use TTF_ABSOLUTE flag comibination.  Is this the only one combination that furnishes the purpose? If so, what is the exact signature for this flag? Are there any
other better ways to do the task.

Any help in this regard is greatly appreciated.

Thanks in advance.
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.