Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • June 28, 2017, 09:16:23 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: When user use Multiple Monitors, how to know which monitor the caret is in?  (Read 6818 times)

maohbao

  • Participant
  • Joined in 2008
  • *
  • Posts: 22
    • View Profile
    • Donate to Member
Hi,

I need to show a special window near the caret position. I use API GetCaretPos() and SetWindowPos() to do this. When user use one monitor, everything is easy. But when user use multiple monitors, the special window only be shown at the first monitor.

How to settle this question? Thanks!

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,086
    • View Profile
    • Donate to Member
Remember that with GetCaretPos(), "The caret position is always given in the client coordinates of the window that contains the caret." (quoting MSDN)... so you might need to combine with GetForegroundWindow() and ClientToScreen().

You might also be interested in this article :)

maohbao

  • Participant
  • Joined in 2008
  • *
  • Posts: 22
    • View Profile
    • Donate to Member
f0dder: Thank you very much, I will try this.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,086
    • View Profile
    • Donate to Member
Let me know what you come up with, I haven't had to make anything multi-mon aware just yet :)

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 8,748
    • View Profile
    • Donate to Member
Not really what they were talking about... they were talking about from a programming perspective...

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,086
    • View Profile
    • Donate to Member
That looks like spam to me... google checking seems to agree.

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: 45
  • Posts: 3,407
    • View Profile
    • Donate to Member
Post removed