CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22
  1. #16
    Join Date
    Jun 2004
    Posts
    1,352

    Re: Pasting to any window

    This might be the comand to solve you Web Editing problems

    CHtmlEditCtrlBase::TextBox
    Rate this post if it helped you.

  2. #17
    Join Date
    Apr 2001
    Location
    Las Vegas
    Posts
    539

    Re: Pasting to any window

    Yes, thats true - I rather make it work with CWnd or by broadcasting some message than try to talk to each control separately,

    I dont intend to try figure out how to post it through IE COM objects, who knows how many different object I have to deal with other than this one (Firefox, Word, other programs with strange COM objects...)

    What I still dont understand is why SendInput() is not simulating Ctrl+V correctly and causes whatever COM object or edit control to do the actual paste to where the current cursor foucs is at.
    Last edited by Yovav; April 7th, 2009 at 03:40 AM.
    Best Regards - Yovav

  3. #18
    Join Date
    Jul 2008
    Posts
    15

    Re: Pasting to any window

    May be interesting to read this "Nick on Silverlight and WPF" http://blogs.msdn.com/nickkramer/arc...15/576758.aspx

    Greetings.

  4. #19
    Join Date
    Apr 2001
    Location
    Las Vegas
    Posts
    539

    Re: Pasting to any window

    Very interesting article,

    So how can I set my app to be at the highest privilege level ?

    Anyone has a clue ?
    Best Regards - Yovav

  5. #20
    Join Date
    Jul 2008
    Posts
    15

    Re: Pasting to any window

    Unfortunately I can't help on that question, but I suppose that the application per se can't do that, because it go against any security principle. I suppose that the application need to be started by a user of adequate rights. Although of course this is only an aloud thought.

  6. #21
    Join Date
    Apr 2001
    Location
    Las Vegas
    Posts
    539

    Re: Pasting to any window

    I think this is the case here - I will try my app on an older OS and post the results here...
    Best Regards - Yovav

  7. #22
    Join Date
    Apr 2001
    Location
    Las Vegas
    Posts
    539

    Re: Pasting to any window

    Maybe this should be used (with different SE_ flags... ?):



    HANDLE hToken;
    TOKEN_PRIVILEGES tkp;

    if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) {}
    LookupPrivilegeValue(NULL, SE_SECURITY_NAME, &tkp.Privileges[0].Luid);

    tkp.PrivilegeCount = 1;
    tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;

    AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES)NULL, 0);
    if (GetLastError() != ERROR_SUCCESS) {}
    Best Regards - Yovav

Page 2 of 2 FirstFirst 12

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