windows 7 switching between windows renames the window title
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: windows 7 switching between windows renames the window title

  1. #1
    Join Date
    Sep 2011
    Posts
    2

    windows 7 switching between windows renames the window title

    I have an application that renames the Page Title of an IE session if it is on a particular URL. (SendMessage objIE.hwnd, WM_SETTEXT, 0, ByVal new_caption)

    I have noticed that on win7 IE8 if you preview the running applications on the task bar the title shows the previous window title. If you click on the preview pane and switch to that IE session it renames the Page title back to what it was before it was modified.

    The same code running on winXP and ie7 works ok

    Is this the correct functioning of the preview window, the preview does not appear to be previewing the current open window, what is causing it to be renamed?, is there some way round this behaviour?, etc. is it an error on my behalf?

    Am I not setting the title correctly that works in ie7 but not in ie8 ?


    Window_Caption = GetWindowTitle(objIE.hwnd)

    If Left$(Window_Caption, 6) = "Amdocs" Then
    new_caption = instancename & " - " & Window_Caption
    SendMessage objIE.hwnd, WM_SETTEXT, 0, ByVal new_caption

  2. #2
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,825

    Re: windows 7 switching between windows renames the window title

    It sounds like rather than something causing it to be renamed something is preventing it from being renamed. Lots of new security features in Windows 7, that may be part of it.

    btw the code you posted appears to change the caption not the name of the window. Normally the caption would not change once a window is displayed unless there is script running within that window that does so, so it is not really surprising that the preview does not reflect the hacked caption.
    Last edited by DataMiser; September 16th, 2011 at 10:32 AM.
    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    Sep 2011
    Posts
    2

    Re: windows 7 switching between windows renames the window title

    Is there a way of changing the name of the window to see if that is the problem

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center