Go Back   Winamp Forums > Developer Center > Winamp Development

Reply
Thread Tools Search this Thread Display Modes
Old 16th April 2002, 19:29   #1
pi8
Junior Member
 
Join Date: Feb 2002
Posts: 7
Moving da Winamp window

Does anybody know how to move the Winamp window, because i'm making an external application that uses 2 winamps. So when i use the Winamp_Start command (i'm writing in Visual Basic btw), the 2 Winamps open on top of each other, displaying only one.
This is pretty anoying, because everytime you start the application, you have to move your winamp windows around your screen to put them in a handy place. So it would be much better if the windows were already in place.

Thank you!
pi8 is offline   Reply With Quote
Old 17th April 2002, 03:07   #2
Gourou
Senior Member
 
Gourou's Avatar
 
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
there is actually a more fundamentally better way to do this. that way is simply to install winamp in 2 different places, then each will have it's own presets, it's own position, and it's own start up gobbeldy gook. This also allows you to have each winamp have it's own plugins..
Gourou is offline   Reply With Quote
Old 17th April 2002, 07:54   #3
THEMike
Bastificator [Alumni]
 
THEMike's Avatar
 
Join Date: May 2000
Location: #nullsoft
Posts: 1,260
Using the windows API function:

SetWindowPos

code:

BOOL SetWindowPos(

HWND hWnd, // handle of window
HWND hWndInsertAfter, // placement-order handle
int X, // horizontal position
int Y, // vertical position
int cx, // width
int cy, // height
UINT uFlags // window-positioning flags
);



Will do it, be careful to maintain the height and width based on the mode of winamp (shade/normal).

"Beer?"
THEMike is offline   Reply With Quote
Old 17th April 2002, 12:32   #4
pi8
Junior Member
 
Join Date: Feb 2002
Posts: 7
Thanks a lot! But i already tried that, the Winamp window doesn't move, it just blinks in my task bar.
I don't know the the height and with of Winamp, so i just gave 0 or 50 or something, but Winamp doesn't resize either (don't need that though).
Is it because i don't know the right size that nothing happens, or what?

Hope you can help me, btw have you tried this yourself?

EDIT:
I've got some extra info:
The return value is 1 (that indicates that is worked), and indeed I see the window appearing in the place a want it to be (I only see the top left cornor appear). But that's just for a couple of milliseconds, then the entire window is back where it was.

So it's like the window is moved and then instantly moved back where it was!

Here's the code i'm using:

SetWindowPos hWndWinAMP, 0, 40, 50, 0, 0, SWP_NOZORDER

(the 40 and 50 can be any values, that doesn't matter right now)

Last edited by pi8; 17th April 2002 at 13:03.
pi8 is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump