CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2009
    Posts
    6

    GetClipBoardOwner with acrobat reader

    Hi,Why GetClipBoardOwner always returns 0 ,

    When using GetClipBoardOwner with any other MS office for example the result will be the real Clipboard Owner , but when using it with acrobat reader i don't get any result .

    Please can some one explains me this ?

    many thanks

  2. #2
    Join Date
    Apr 1999
    Posts
    27,449

    Re: GetClipBoardOwner with acrobat reader

    Quote Originally Posted by randydom View Post
    Hi,Why GetClipBoardOwner always returns 0 ,

    When using GetClipBoardOwner with any other MS office for example the result will be the real Clipboard Owner , but when using it with acrobat reader i don't get any result .

    Please can some one explains me this ?

    many thanks
    http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx
    Return value

    Type: HWND

    If the function succeeds, the return value is the handle to the window that owns the clipboard.

    If the clipboard is not owned, the return value is NULL. To get extended error information, call GetLastError.
    Did you call GetLastError()?

    Regards,

    Paul McKenzie

  3. #3
    Join Date
    Sep 2009
    Posts
    6

    Re: GetClipBoardOwner with acrobat reader

    Thank you Paul McKenzie , yes i called GetLastError() , but it returns 0 as a result just with acrobat reader , not for Notepad.exe ...etc

    So what's the problem with adobe acrobat reader ? do they use an other TECH with their Clipboard or what ?

  4. #4
    Join Date
    Oct 2002
    Location
    Austria
    Posts
    1,284

    Re: GetClipBoardOwner with acrobat reader

    I think knowing the owner of the clippoard isn't very useful information.
    Just imagine clipboard data from lets say MS Word over a remote desktop connection.
    Should it return the HWND of the remote desktop window or should it even return the HWND of the Word window on the remote machine ?
    Kurt

  5. #5
    Join Date
    Sep 2009
    Posts
    6

    Re: GetClipBoardOwner with acrobat reader

    thank you ZuK , but i really need to get the Clipboard Owner by Calling the GetClipBoardOwner ,
    my question is just why GetLastError() return 0 with acrobat reader ?

    really strange

  6. #6
    Join Date
    Oct 2002
    Location
    Austria
    Posts
    1,284

    Re: GetClipBoardOwner with acrobat reader

    Quote Originally Posted by randydom View Post
    my question is just why GetLastError() return 0 with acrobat reader ?
    Why should it. According to Paul's link it is not an error

    The clipboard can still contain data even if the clipboard is not currently owned.

  7. #7
    Join Date
    Sep 2009
    Posts
    6

    Re: GetClipBoardOwner with acrobat reader

    ZuK , ok then is there any other alternative to get the Clipboard Owner ? without using :
    GetClipBoardOwner ..

  8. #8
    Join Date
    Apr 1999
    Posts
    27,449

    Re: GetClipBoardOwner with acrobat reader

    Quote Originally Posted by randydom View Post
    ZuK , ok then is there any other alternative to get the Clipboard Owner ? without using :
    GetClipBoardOwner ..
    GetClipBoardOwner is a Windows API function. That is the way to get the clipboard owner. Unless you know some undocumented function, that's the function you must use.
    but i really need to get the Clipboard Owner by Calling the GetClipBoardOwner
    Maybe there is no owner. Have you considered that? So if there is no owner, what do you intend to do?

    You don't know how internally Acrobat communicates with the clipboard, since you didn't write the Acrobat application. So assuming that Acrobat owns the clipboard is more than likely a wrong assumption.

    Regards,

    Paul McKenzie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured