Results 1 to 13 of 13

Thread: spy++ call

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    spy++ call

    I used spy++ to get this information:

    WM_SHOWWINDOW fShow:True fuStatus:SW_PARENTOPENING.

    Does anyone know how to convert this message into vb api call send message?

  2. #2
    Frenzied Member
    Join Date
    Mar 2009
    Posts
    1,182

    Re: spy++ call

    Those are messages sent via the SendMessage API, you need to look up these constants with your API viewer.

    Good Luck

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: spy++ call

    vb5, I realize that. I have sendmessage api declared, but I don't know what else to put in that sendmessage according to the above statement from spy++

  4. #4
    PowerPoster
    Join Date
    Jul 2001
    Location
    Tucson, AZ
    Posts
    2,166

    Re: spy++ call

    - wParam
    TRUE (nonzero) if the window is being shown, zero if it is being hidden.

    - lParam
    One of the following constants:
    SW_OTHERUNZOOM: Indicates that the window is being uncovered because a maximize window
    was restored or minimized.
    SW_OTHERZOOM: Indicates that the window is being covered by another window that has been
    maximized.
    SW_PARENTCLOSING: Indicates that the parent window is being hidden or minimized.
    SW_PARENTOPENING: Indicates that the parent window is being displayed.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: spy++ call

    So this is what I end up with:

    SendMessage Hwnd, WM_SHOWWINDOW, 1, SW_PARENTOPENING

    Is this correct?

  6. #6
    PowerPoster
    Join Date
    Jul 2001
    Location
    Tucson, AZ
    Posts
    2,166

    Re: spy++ call

    It depends on what you want to do -- replicate the spy++ message?

    Try it and see what happens!!

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: spy++ call

    I am trying to do what the spy++ does in that piece of line.

  8. #8
    PowerPoster
    Join Date
    Jul 2001
    Location
    Tucson, AZ
    Posts
    2,166

    Re: spy++ call

    Did you try it??

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: spy++ call

    SendMessage Hwnd, WM_SHOWWINDOW, 1, SW_PARENTOPENING

    Yes, tried this one but my window is still in minimized state

  10. #10
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: spy++ call

    Per MSDN documentation
    The WM_SHOWWINDOW message is sent to a window when the window is about to be hidden or shown
    So, sending the message directly probably has no effect on actually showing the window. The window will most likely use this info for personal use, like maybe setting flags for example.

    See if this line of code helps. Maybe the window itself is trapping certain messages and handling them uniquely. Don't know why it would do that unless it custom drawing itself. The following will bypass the window (if it is subclassing) and send it directly to the window's default window procedure.
    Code:
    Call DefWindowProc(hWnd, WM_SYSCOMMAND, SC_RESTORE, 0&)
    Speaking of subclassing, is the window subclassed? You can determine this from spy++ by looking at the general tab of the properties window:
    Name:  spyprops.JPG
Views: 213
Size:  27.6 KB
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  11. #11

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: spy++ call

    Is hWnd is the hwnd of my window or of the system? How to get hwnd of the system?

  12. #12
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: spy++ call

    hWnd is the window handle you are trying to restore from the tray.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  13. #13

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: spy++ call

    Is there a way i can get the system hwnd?

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