Old 26th April 2004, 16:43   #1
Joonas
Forum King
 
Join Date: Mar 2004
Location: Sweden
Posts: 2,263
Modern skinned view-menu

Hmms, a friend of mine just pointed out that my plugin doesn't show up in the View-menu on a Modern skinned winamp...not at all at first and when viewing the window it's there but without a caption. Anyone know how to add stuff there and how to set new ones?

/Jonas
Joonas is offline   Reply With Quote
Old 26th April 2004, 20:36   #2
Safai
Senior Member
 
Join Date: Sep 2000
Location: Canada
Posts: 249
Send a message via ICQ to Safai
here my take on the "view" menu...

it adds an entry there when you have a winamp skinned dialog
it removes it when the dialog is hidden
same thing under the "main" menu...

as for the caption... make sure the winamp skinned dialog has a name... (the one you parented to)
Safai is offline   Reply With Quote
Old 26th April 2004, 23:13   #3
DrO
 
Join Date: Sep 2003
Posts: 27,873
have a look at the code attached

it's the skinning example i've done but it's NOT complete yet -> needs documenting and tidying etc but it'll show you the menu thing and a few other bits (need to port it to jtfe and fix a few quirks with it)

-daz
Attached Files
File Type: zip gen_craig.zip (13.4 KB, 237 views)
DrO is offline   Reply With Quote
Old 28th April 2004, 16:59   #4
Joonas
Forum King
 
Join Date: Mar 2004
Location: Sweden
Posts: 2,263
ok...another thing tho

DrO: great...your code did the trick..

Another thing I'm wondering about is that my plugin is being shown automatically at startup...but when skinned with modern skin it seems as if Winamp is closing the window immediately...but in classic it works fine..

why?

/Jonas
Joonas is offline   Reply With Quote
Old 28th April 2004, 17:03   #5
DrO
 
Join Date: Sep 2003
Posts: 27,873
glad the code helped though i've fixed a number of issues with it so the final version should be a lot better

hmm, not sure what you mean. is there anyway i can test the plugin to see what's happening with a 'live case'?

-daz
DrO is offline   Reply With Quote
Old 28th April 2004, 18:18   #6
Joonas
Forum King
 
Join Date: Mar 2004
Location: Sweden
Posts: 2,263
testing!

Yes, of course you can test it. Any other input on improvements from anyone is very gladly accepted...

The very thing I'm asking in this thread is why the window displays correctly in classic mode but not in modern skin. The thing is that the window is being shown automatically if it was visible when Winamp was closed the last time, a la playlist editor style.

http://informatik.umu.se/~svph0140/gen_library.dll
Joonas is offline   Reply With Quote
Old 28th April 2004, 18:43   #7
Joonas
Forum King
 
Join Date: Mar 2004
Location: Sweden
Posts: 2,263
doh!

my response ended up in a new thread called "testing!".
Look there for the plugin

[ merged the two threads DrO ]
Joonas is offline   Reply With Quote
Old 28th April 2004, 19:42   #8
DrO
 
Join Date: Sep 2003
Posts: 27,873
when a modern skin window appears, it receives two WM_DISPLAYCHANGE messages. i'm guessing that you're doing something when that happens which causes it to show then hide the window.

also is the grip on the scrollbar meant to flash if you have the mouse in the edit box (Win2k SP4) and over the scrollbar buttons - looks a bit wierd.

another thing is that the dialog placement seems to be a bit out - just a little niggle with the modern skin tho not sure why that is though piccy #2

also in modern skin mode, the menu item you've inserted seems to be messing up any below it which led to duplicate equaliser entries (mainly in modern skin as though the entry isn't being correctly handled - personally i think it's better to add user items below the in built items). i've checked it against gen_craig and my current gen_jumpex and they work fine together but not with gen_library running (modern or classic skin)

i also got this crash error when closing winamp whilst using the modern skin piccy #1

hopefully that all make sense

-daz
DrO is offline   Reply With Quote
Old 28th April 2004, 21:38   #9
Joonas
Forum King
 
Join Date: Mar 2004
Location: Sweden
Posts: 2,263
Quote:
Originally posted by DrO
[B]when a modern skin window appears, it receives two WM_DISPLAYCHANGE messages. i'm guessing that you're doing something when that happens which causes it to show then hide the window.
Yah, that was it...or rather a modern skin apparently has two container windows...to redraw the window I hide and then show the window again...
fixed it by checking if its a modern skin I then either hide GetParent(GetParent(hwndDlg)) or just GetParent(hwndDlg)...

Quote:
also is the grip on the scrollbar meant to flash if you have the mouse in the edit box (Win2k SP4) and over the scrollbar buttons - looks a bit wierd.
Don't really know what you mean by this...?

Quote:
another thing is that the dialog placement seems to be a bit out - just a little niggle with the modern skin tho not sure why that is though
Yes, I noticed...just me not giving the controls enough space from the edge...looks better in classic skin which I use...but I will just move them in a few pixels..

Quote:
also in modern skin mode, the menu item you've inserted seems to be messing up any below it which led to duplicate equaliser entries (mainly in modern skin as though the entry isn't being correctly handled - personally i think it's better to add user items below the in built items). i've checked it against gen_craig and my current gen_jumpex and they work fine together but not with gen_library running (modern or classic skin)
Yes...although it took some time recreating this...but I now add them right I think...adds them 9 and 11 backwards from the end...depending on Modern skin or classic skin...its either that or if there is some message you can send and get the position of the Options sub-menu?


Quote:
i also got this crash error when closing winamp whilst using the modern skin
You always get that? I never had any problem before you mentioned this...seems related to modern skin though since I managed to trigger it somehow when trying out the menu code...

Quote:
hopefully that all make sense
Yah, thanks alot...I'm kinda newbie to plugin creation as you've noticed but your help is priceless

/Jonas
Joonas is offline   Reply With Quote
Old 28th April 2004, 23:02   #10
Safai
Senior Member
 
Join Date: Sep 2000
Location: Canada
Posts: 249
Send a message via ICQ to Safai
Quote:
Yes...although it took some time recreating this...but I now add them right I think...adds them 9 and 11 backwards from the end...depending on Modern skin or classic skin...its either that or if there is some message you can send and get the position of the Options sub-menu?
here is what i do... works great for both classic & modern...

code:
void CUserInterface::InsertAlbumListToMenu()
{
// get main menu
HMENU hMenu = (HMENU)wndWinamp.SendIPCMessage(0, IPC_GET_HMENU);

// find menu item "main window"
for (int i=GetMenuItemCount(hMenu); i>=0; i--)
{
if (GetMenuItemID(hMenu, i) == 40258)
{
// find the separator
while (0xFFFFFFFF != GetMenuItemID(hMenu, ++i))
/* do nothing*/;

// insert menu just before the separator
InsertMenu(hMenu, i-1, MF_BYPOSITION|MF_STRING, m_nMenuShow, GetTitle());
break;
}
}
}

Safai is offline   Reply With Quote
Old 29th April 2004, 07:29   #11
Joonas
Forum King
 
Join Date: Mar 2004
Location: Sweden
Posts: 2,263
http://www.informatik.umu.se/~svph0140/gen_library.dll

Anyone who feel like it can try this update where I've tried to solve DrO:s suggestions
Joonas is offline   Reply With Quote
Old 29th April 2004, 11:37   #12
DrO
 
Join Date: Sep 2003
Posts: 27,873
Quote:
Originally posted by Joonas
http://www.informatik.umu.se/~svph0140/gen_library.dll

Anyone who feel like it can try this update where I've tried to solve DrO:s suggestions
the menu thing is fixed though like Safai does, a variable menu position (like i've also done in the gen_craig example) is a bit safer since you can't guarantee what other plugin authors might do to that part of the menu. that's just my personal preference but the new code seems to work fine.

still getting the crash error on exit. i think it's just on final stage of exit that it happens (but pushed for time today so can't check it out for sure). also it happens in classic skins still (just happened as i went to post)

Quote:
also is the grip on the scrollbar meant to flash if you have the mouse in the edit box (Win2k SP4) and over the scrollbar buttons - looks a bit wierd.
it seems to be fine with a classic skin, but when in modern, the parts of the scrollbar which highlight on mouseover seem to be 'mis-firing' or not correctly detecting where the mouse is against the window/client area of the scrollbar.

otherwise it's not looking bad. btw, is this the debug version since it is a bit large for what it's doing? if it just make sure you also try out release builds of the code since the debugging versions can hide some of the trickier bugs at times. (only saying this since i do all my stuff as c/c++ and pure win32 so i'm not used to sizes above 100k )

keep it up

-daz
DrO is offline   Reply With Quote
Old 29th April 2004, 13:10   #13
Joonas
Forum King
 
Join Date: Mar 2004
Location: Sweden
Posts: 2,263
Quote:
Originally posted by DrO
[B]the menu thing is fixed though like Safai does, a variable menu position (like i've also done in the gen_craig example) is a bit safer since you can't guarantee what other plugin authors might do to that part of the menu. that's just my personal preference but the new code seems to work fine.
Yes, I have to think about that..

Quote:
still getting the crash error on exit. i think it's just on final stage of exit that it happens (but pushed for time today so can't check it out for sure). also it happens in classic skins still (just happened as i went to post)
Dunno what this is...I just got it once and can't seem to recreate it. Neither can my friend who is using it regulary...

Quote:
it seems to be fine with a classic skin, but when in modern, the parts of the scrollbar which highlight on mouseover seem to be 'mis-firing' or not correctly detecting where the mouse is against the window/client area of the scrollbar.
Sorry, still doesn't get it Can you make a screenshot or something?

Quote:
otherwise it's not looking bad. btw, is this the debug version since it is a bit large for what it's doing? if it just make sure you also try out release builds of the code since the debugging versions can hide some of the trickier bugs at times. (only saying this since i do all my stuff as c/c++ and pure win32 so i'm not used to sizes above 100k )
Yah, its debug. Pure Win32 here too and only about 80ish kb in release mode which I will use when the bugs are rooted out.

Quote:
keep it up
Thanks I will Just tough to root out bugs you can't recreate :/
Joonas 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