Old 20th February 2002, 20:04   #1
Selyb
Junior Member
 
Join Date: Jan 2002
Location: Shreveport
Posts: 14
Send a message via AIM to Selyb Send a message via Yahoo to Selyb
help with Winamp API

not sure how to ask this
not even sure if im in the right forum
but...what i want to do is assign a hotkey to minimize winamp and ive found api messages for winamp but not one for minimizing
ive seen three plugins that could minimize winamp but i cant get the source code for them (if that would help me)
i can toggle all winamp windows with one hotkey but thats only good if i have all windows open
what im looking for is um.. SendMessage("Winamp v1.x",273,0,40058)
thats for volume up, i need minimize or hide all windows(not toggle)
thanx in advance
Selyb is offline   Reply With Quote
Old 24th February 2002, 20:19   #2
winsocker
Junior Member
 
Join Date: Jan 2002
Location: Ireland
Posts: 13
Try this

Try the following code, I haven't tested it so let me know if it works.

To create a 'hotkey' why don't you just assign a #defined constant
e.g

#define RETURN 13 // 13 is return key in ascii, as you probably know

just place the code below in a function and call it when the key is pressed

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow);

// call winamp from the specified directory

WinExec("C:\\winamp\\winamp.exe", SW_SHOWMINIMISED);
winsocker is offline   Reply With Quote
Old 24th February 2002, 23:00   #3
Selyb
Junior Member
 
Join Date: Jan 2002
Location: Shreveport
Posts: 14
Send a message via AIM to Selyb Send a message via Yahoo to Selyb
dude i know very little about programming
i wasnt trying to program anything
im using keyman which lets me assign a hotkey to anything i want
i can execute programs, send api messages or keystrokes to active, specific, all, or certain windows, and something with scripting i didnt quite understand
i can send messages or keystrokes to winamp but the problem is that system api command to minimize a window doesnt minimize winamp
it does work on other windows just not winamp
i tried putting WinExec("C:\\winamp\\winamp.exe", SW_SHOWMINIMISED)
as the macro for keyman but it didnt recognize winexec
i also tried ExecApp("C:\\winamp\\winamp.exe", SW_SHOWMINIMISED)
that didnt work either
what im trying to accomplish is having one hotkey toggle whether winamp is minimized or not
the difference between whether its minimized of has all windows hidden has to do with taking attention when the skin changes or with some other actions
thanx for the help
selyb
Selyb is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Winamp > Winamp Technical Support

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