"Newbie Coder" <ne*********@spammeplease.comwrote in message
news:e2*************@TK2MSFTNGP06.phx.gbl...
Terry,
What happens if the user doesn't have WinAmp on their machine or they have
it minimised to system tray? Your functions will fail because the handle
will be zero
The program checks to see if Winamp is installed, informs the user that it's
required if not found and exits.
Why are you using FindWindowEx & not FindWindow?
FindWindowEx searches child windows, FindWindow does not. The player window
in Winamp is a child of the main Winamp process.
In your code I see you have 275. Why isn't that Panel1.Height? But
personally I would say not to set the WinAmp height to say 10 less than
the
panel height & then centre it meaning the starting point would be 5, 5 not
0, 0 & then do the same for the bottom plus left/right edges.
275, or actually, 280 is the perfect height for the Winamp window without
the video screen. Any other size than that and it doesn't look right.
Your MoveWindow function isn't adding the WinAmp window to the container
of
the frame, but just setting it to the size of the panel
Yes, I know that; which is why i'm using the x = SetParent(WinampHndl,
Panel1.Handle) to do that. The MoveWindow call is supposed to be "Moving"
the window in addition to setting the window size. It sets the window size
correctly, but doesn't move the window. Why? This is my original question.
What does 'x' stand for?
It doesn't stand for anything other than to check that the SetParent call
was successful.
The newsgroup is waiting your response,
You know what? Forget it. When I ask a simple question, I don't need to
explain my motivation for what I want to do, which is all the responses have
been as of late. "Why do you want to do this?" My answer is, "Why do you
need to know?" Or the assumption in this response that I somehow hadn't
taken into consideration whether or not Winamp would be installed on the
user machine. Or even the statement that the MoveWindow call doesn't add
Winamp to the panel, when the SetParent call was in plain sight on the
previous line. This obviously shows that the responder didn't read the
question with the intent of providing an answer, only to criticize. So
really...forget it. I'll look for other resources.