topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Friday December 13, 2024, 9:05 pm
  • Proudly celebrating 15+ 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 11283 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,153
  • [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,153
  • [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
  • **
  • default avatar
  • Posts: 11,190
    • 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,153
  • [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: 45
  • Posts: 3,411
    • View Profile
    • Donate to Member
Post removed