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
  • December 07, 2016, 06:13:48 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 6604 times)

maohbao

  • Participant
  • Joined in 2008
  • *
  • Posts: 22
  • Typing Assistant team
    • View Profile
    • Typing Assistant
    • 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!
Typing Assistant team <br/>
http://www.sumitsoft.com

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • 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 :)
- carpe noctem

maohbao

  • Participant
  • Joined in 2008
  • *
  • Posts: 22
  • Typing Assistant team
    • View Profile
    • Typing Assistant
    • Donate to Member
f0dder: Thank you very much, I will try this.
Typing Assistant team <br/>
http://www.sumitsoft.com

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Let me know what you come up with, I haven't had to make anything multi-mon aware just yet :)
- carpe noctem

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 8,406
  • "In my dreams, I always do it right."
    • 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,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
That looks like spam to me... google checking seems to agree.
- carpe noctem

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: -5
  • Posts: 3,397
    • View Profile
    • Donate to Member
Post removed