Old 9th November 2010, 17:24   #1
JDukey
Junior Member
 
Join Date: Jan 2009
Posts: 5
Programmatically resize playlist editor

Hi all,

Am I missing something obvious in terms of how to resize the playlist editor window in code (VB.NET)

MoveWindow(playlist_hwnd, pos_x, pos_y, width, height, True)

This works to relocate the window very well and it does resize, sort of. If I try to resize to smaller than its current size parts of the window are hidden, if I try to make it larger there are very nasty artefacts around the edges. It's like the container of the window resizes, but the contents don't?

Any clues?

Thanks

James
JDukey is offline   Reply With Quote
Old 9th November 2010, 18:04   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
it sounds like maybe you're using a modern skin which has a double-container aspect for hosting the playlist editor window which aren't designed to be programmatically changed in their size from an external app (there is an api but it's only possible in-process and in a way which i don't think VB.NET can access).

also there are certain size limits on the playlist editor before the drawing goes weird (275 x 116) though this isn't honoured when the window is sized outside of the normal user action.

-daz
DrO is offline   Reply With Quote
Old 9th November 2010, 19:52   #3
JDukey
Junior Member
 
Join Date: Jan 2009
Posts: 5
I am using the WinAmp classic skin, although I am happy to change if it fixes this issue.

When you say in process are you referring to "SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)&point,IPC_SET_PE_WIDTHHEIGHT)" which I spotted in the SDK? I couldn't see a way to get that working with VB.NET, although that could be an oversight on my behalf.

I have tried dimensions above and below those dimensions you mentioned - still does not draw correctly.
JDukey is offline   Reply With Quote
Old 9th November 2010, 20:41   #4
DrO
 
Join Date: Sep 2003
Posts: 27,873
IPC_SET_PE_WIDTHHEIGHT is only really meant to be used by the modern skin engine (or another skin engine) if the playlist editor window is say embedded into a container and it just acts as a hint for getting the window size back to what in the current case the modern skin engine thinks the original playlist editor position was.

either way, unless resizing the playlist editor window by clicking on it or doing as the modern skin engine does (which sets it to a mode that disables the drawing of the outer classic skin frame and the above api), i don't think there's anything to do what you're trying to do (though no idea why you need to resize the window in the first place).

-daz
DrO is offline   Reply With Quote
Old 9th November 2010, 21:08   #5
JDukey
Junior Member
 
Join Date: Jan 2009
Posts: 5
That's a shame.

Basically this software is going to be used by people who are unfamiliar with PCs - that is to say if the "bit where I choose the songs" appears in a different place or different size (because someone else moved/resized it - there will be multiple users) when they click the relevant button they will become very confused and my phone will begin to ring!

If I can' resize it programmatically, perhaps I can prevent any users from resizing it? There is really no need for them to do so, yet it keeps happening.

Otherwise I shall have to bite the bullet and write a proper playlist display into my software.
JDukey is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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