Announcement

Collapse

Forum Guidelines

This forum is for finished source code that is working properly. If you have questions about this or any other source code, please post it in one of the Discussion Forums, not here.
See more
See less

Remote Wonder Plus Functions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Remote Wonder Plus Functions

    Code:
    '==============================================================================
    '
    '  REMOAPP.BAS
    '  Created with PowerBASIC for Windows Ver 7
    '  by: Jim Fritts
    '
    '  Released for public domain 1 DEC 07
    '  Designed to respond to the ATI Remote Wonder Plus thru the Winamp plugin.
    '
    '  After many hours of trying to create a RemoteWonder plugin, I found
    '  it to be much easier to pick off the Winamp commands from the Winamp plugin
    '  that comes with the remote controls install package.
    '
    '  Designed with the homebrew mediaplayer in mind; the functions below provide
    '  the basic media commands: Play/Pause, Play next, Play last, Stop, Volume up,
    '  Volume down, and Mute.
    '
    '  The 2 additional Click buttons are for Repeat play and Mixed play.
    '
    '  Simply add the functions to your app, make your apps classname "Winamp v1.x",
    '  and make sure your app has the current focus. If you don't want to add these 
    '  functions to your app, you could also use this dialog as a stand allow to redirect 
    '  commands to your app. Each function provides a FindWindow feature and a 
    '  PostMessage which can be used for this purpose.
    '
    '  Needless to say I don't use Winamp.
    '
    '==============================================================================
    
    #COMPILE EXE
    #REGISTER NONE
    #DIM ALL
    #DEBUG ERROR OFF
    #TOOLS OFF
    
    #RESOURCE "RemoApp.pbr"
    
    #INCLUDE "Win32API.inc"
    #INCLUDE "CommCtrl.inc"
    
    
    '------------------------------------------------------------------------------
    ' Eliminate unnecessary macros
    '------------------------------------------------------------------------------
    %NOANIMATE    = 1
    %NODRAGLIST   = 1
    %NOHEADER     = 1
    %NOIMAGELIST  = 1
    %NOLISTVIEW   = 1
    %NOTABCONTROL = 1
    %NOTRACKBAR   = 1
    %NOTREEVIEW   = 1
    %NOUPDOWN     = 1
    
    
    
    
    
    %ID_TOOLBAR           = %WM_USER       + 1024
    %IDB_BUTTONS          = %ID_TOOLBAR    + 1
    
    
    %IDM_PLAY             = %WM_USER       + 2001&    '// play
    %IDM_PAUSE            = %WM_USER       + 2002&    '// pause
    %IDM_STOP             = %WM_USER       + 2003&    '// Stop
    %IDM_MUTE             = %WM_USER       + 2004&    '// mute
    %IDM_UMUTE            = %WM_USER       + 2005&    '// unmute
    %IDM_VUP              = %WM_USER       + 2006&    '// volume up
    %IDM_VDN              = %WM_USER       + 2007&    '// volume down
    %IDM_NEXT             = %WM_USER       + 2008&    '// play next
    %IDM_LAST             = %WM_USER       + 2009&    '// play last
    %IDM_REPEAT           = %WM_USER       + 2010&    '// repeat playback
    %IDM_MIX              = %WM_USER       + 2011&    '// mixed playback
    
    %IDM_HELP             = %WM_USER       + 2100&    '// Help
    %IDM_ABOUT            = %WM_USER       + 2101&    '// About box
    %IDM_CLOSE            = %WM_USER       + 2102&    '// Close
    %IDM_EXIT             = %WM_USER       + 2103&    '// Exit
    
    %IDM_STP04            = %WM_USER       + 2263&    '// STOP MEDIA
    %IDM_TRK01            = %WM_USER       + 2234&    '// MEDIA PREVIOUS TRACK
    %IDM_TRK02            = %WM_USER       + 2235&    '// MEDIA NEXT TRACK
    %IDM_PPM01            = %WM_USER       + 2236&    '// PLAY/PAUSE MEDIA
    %IDM_SEL01            = %WM_USER       + 2237&    '// select last
    %IDM_SEL02            = %WM_USER       + 2238&    '// select next
    %IDM_MUT01            = %WM_USER       + 2207&    '// MUTE VOLUME
    %IDM_VUP01            = %WM_USER       + 2229&    '// Volume increase
    %IDM_VDN01            = %WM_USER       + 2230&    '// Volume decrease
    
    
    
    GLOBAL hInst             AS DWORD
    GLOBAL hStatus           AS DWORD
    GLOBAL hToolbar          AS DWORD
    GLOBAL hWndMain          AS DWORD
    GLOBAL ghDlgModelessMain AS DWORD
    
    GLOBAL hwnd_YourApp      AS LONG
    
    DECLARE FUNCTION MoveDialogForward (BYVAL hDlgX AS DWORD) AS LONG
    
    '_________________________________________________________________
    
    FUNCTION MoveDialogForward (BYVAL hDlgX AS DWORD) AS LONG
                SetWindowPos hDlgX, %HWND_TOPMOST, 0, 0, 0, 0, %SWP_NOMOVE OR %SWP_NOSIZE OR %SWP_SHOWWINDOW
                CALL InvalidateRect(hDlgX, BYVAL %NULL, %TRUE)
                CALL UpdateWindow(hDlgX)
    END FUNCTION
    
    '_________________________________________________________________
    
    FUNCTION AboutProc (BYVAL hDlg AS LONG, BYVAL wMsg AS LONG, _
                        BYVAL wParam AS LONG, BYVAL lParam AS LONG) AS LONG
    
      SELECT CASE wMsg
    
          CASE %WM_INITDIALOG
    
          CASE %WM_DESTROY
    
               DIALOG END hDlg
               FUNCTION = 1
    
          CASE %WM_COMMAND
    
              SELECT CASE LOWRD(wParam)
    
                  CASE %IDCANCEL
                      ShowWindow hWndMain, %SW_SHOW
                      EndDialog hDlg, 1
                      FUNCTION = 1
    
                  CASE 103
                      ShowWindow hWndMain, %SW_SHOW
                      EndDialog hDlg, 1
                      FUNCTION = 1
    
              END SELECT
      END SELECT
    END FUNCTION
    
    
    '_________________________________________________________________
    
    FUNCTION WndProc (BYVAL hWnd AS LONG, BYVAL wMsg AS LONG, _
                      BYVAL wParam AS LONG, BYVAL lParam AS LONG) EXPORT AS LONG
    
      LOCAL lpToolTip AS TOOLTIPTEXT PTR
      STATIC zText    AS ASCIIZ * 255
      STATIC hBmp     AS LONG
    
      SELECT CASE wMsg
    
        CASE %WM_CREATE
    
            DIM tbb(0 TO 10) AS TBBUTTON
    
            InitCommonControls
    
            ' Fill the TBBUTTON array with button information
            tbb(0).iBitmap   = 0
            tbb(0).idCommand = %IDM_PLAY
            tbb(0).fsState   = %TBSTATE_ENABLED
            tbb(0).fsStyle   = %TBSTYLE_BUTTON
            tbb(0).dwData    = 0
            tbb(0).iString   = 0
    
            tbb(1).iBitmap   = 1
            tbb(1).idCommand = %IDM_PAUSE
            tbb(1).fsState   = %TBSTATE_ENABLED
            tbb(1).fsStyle   = %TBSTYLE_BUTTON
            tbb(1).dwData    = 0
            tbb(1).iString   = 0
    
            tbb(2).iBitmap   = 2
            tbb(2).idCommand = %IDM_STOP
            tbb(2).fsState   = %TBSTATE_ENABLED
            tbb(2).fsStyle   = %TBSTYLE_BUTTON
            tbb(2).dwData    = 0
            tbb(2).iString   = 0
    
            tbb(3).iBitmap   = 3
            tbb(3).idCommand = %IDM_MUTE
            tbb(3).fsState   = %TBSTATE_ENABLED
            tbb(3).fsStyle   = %TBSTYLE_BUTTON
            tbb(3).dwData    = 0
            tbb(3).iString   = 0
    
            tbb(4).iBitmap   = 4
            tbb(4).idCommand = %IDM_UMUTE
            tbb(4).fsState   = %TBSTATE_ENABLED
            tbb(4).fsStyle   = %TBSTYLE_BUTTON
            tbb(4).dwData    = 0
            tbb(4).iString   = 0
    
            tbb(5).iBitmap   = 5
            tbb(5).idCommand = %IDM_VUP
            tbb(5).fsState   = %TBSTATE_ENABLED
            tbb(5).fsStyle   = %TBSTYLE_BUTTON
            tbb(5).dwData    = 0
            tbb(5).iString   = 0
    
            tbb(6).iBitmap   = 6
            tbb(6).idCommand = %IDM_VDN
            tbb(6).fsState   = %TBSTATE_ENABLED
            tbb(6).fsStyle   = %TBSTYLE_BUTTON
            tbb(6).dwData    = 0
            tbb(6).iString   = 0
    
            tbb(7).iBitmap   = 7
            tbb(7).idCommand = %IDM_NEXT
            tbb(7).fsState   = %TBSTATE_ENABLED
            tbb(7).fsStyle   = %TBSTYLE_BUTTON
            tbb(7).dwData    = 0
            tbb(7).iString   = 0
    
            tbb(8).iBitmap   = 8
            tbb(8).idCommand = %IDM_LAST
            tbb(8).fsState   = %TBSTATE_ENABLED
            tbb(8).fsStyle   = %TBSTYLE_BUTTON
            tbb(8).dwData    = 0
            tbb(8).iString   = 0
    
            tbb(9).iBitmap   = 9
            tbb(9).idCommand = %IDM_REPEAT
            tbb(9).fsState   = %TBSTATE_ENABLED
            tbb(9).fsStyle   = %TBSTYLE_BUTTON
            tbb(9).dwData    = 0
            tbb(9).iString   = 0
    
            tbb(10).iBitmap   = 10
            tbb(10).idCommand = %IDM_MIX
            tbb(10).fsState   = %TBSTATE_ENABLED
            tbb(10).fsStyle   = %TBSTYLE_BUTTON
            tbb(10).dwData    = 0
            tbb(10).iString   = 0
    
            ' Load the toolbar bitmap
            hBmp = LoadImage(hInst, "TOOLBAR", _
                    %IMAGE_BITMAP, 0, 0, %LR_LOADMAP3DCOLORS OR %LR_DEFAULTSIZE)
    
            ' Create the toolbar window
            hToolbar = CreateToolbarEx(hWnd, %WS_CHILD OR %TBSTYLE_TOOLTIPS, _
                                       %ID_TOOLBAR, 21, %NULL, hBmp, _
                                       tbb(0), 11, 0, 0, 24, 24, LEN(TBBUTTON))
    
            ' Display the toolbar
            SendMessage hToolbar, %TB_AUTOSIZE, 0, 0
            ShowWindow hToolbar, %SW_SHOW
    
            ' Create the status bar window
            hStatus = CreateStatusWindow(%WS_CHILD OR %WS_BORDER OR %WS_VISIBLE OR %SBS_SIZEGRIP, _
                                         "", hWnd, 200)
    
        CASE %WM_NOTIFY
            lpToolTip = lParam
            IF @lpToolTip.hdr.code = %TTN_NEEDTEXT THEN
                LoadString hInst, @lpToolTip.hdr.idFrom, zText, SIZEOF(zText)
                @lpToolTip.lpszText = VARPTR(zText)
            END IF
            EXIT FUNCTION
    
        CASE %WM_MENUSELECT
            LoadString hInst, wParam, zText, SIZEOF(zText)
            SendMessage hStatus, %WM_SETTEXT, 0, VARPTR(zText)
            EXIT FUNCTION
    
        CASE %WM_SIZE
            SendMessage hStatus, wMsg, wParam, lParam
            SendMessage hToolbar, wMsg, wParam, lParam
    
    
        CASE %WM_USER
    
            SELECT CASE LOWRD(wParam)
    
                CASE 0
                    SELECT CASE LOWRD(lParam)
                        CASE 102
                            MSGBOX "Play/Pause"
                            hwnd_YourApp = FindWindow("YourApp", "")
                            IF hwnd_YourApp = 0 THEN MSGBOX "YourApp was not found!": EXIT FUNCTION
                            PostMessage(hwnd_YourApp,%WM_COMMAND, %IDM_PPM01,0)  'play/pause media
                            FUNCTION = 1
                            EXIT FUNCTION
                        CASE 122
                            MSGBOX "Mute selected"
                            hwnd_YourApp = FindWindow("YourApp", "")
                            IF hwnd_YourApp = 0 THEN MSGBOX "YourApp was not found!": EXIT FUNCTION
                            PostMessage(hwnd_YourApp,%WM_COMMAND,%IDM_MUT01,0)  'mute/unmute
                            FUNCTION = 1
                            EXIT FUNCTION
                    END SELECT
    
                CASE 127
                    SELECT CASE LOWRD(lParam)
                        CASE 122
                            MSGBOX "Unmute selected"
                            hwnd_YourApp = FindWindow("YourApp", "")
                            IF hwnd_YourApp = 0 THEN MSGBOX "YourApp was not found!": EXIT FUNCTION
                            PostMessage(hwnd_YourApp,%WM_COMMAND,%IDM_MUT01,0)  'mute/unmute
                            FUNCTION = 1
                            EXIT FUNCTION
                    END SELECT
    
                CASE 1 TO 100000
                    MSGBOX STR$(LOWRD(wParam)) '"something selected"
                    MSGBOX STR$(LOWRD(lParam)) '"something selected"
    
                    EXIT FUNCTION
            END SELECT
    
    
    
        CASE %WM_ACTIVATE
    
            ghDlgModelessMain = hWndMain
            ShowWindow hWndMain, %SW_RESTORE
            MoveDialogForward hWndMain
            UpdateWindow hWndMain
    
            FUNCTION = 1
    
    
        CASE %WM_COMMAND
    
            SELECT CASE LOWRD(wParam)
    
                CASE %IDM_EXIT
                    SendMessage hWnd, %WM_DESTROY, wParam, lParam
                    EXIT FUNCTION
    
    '            CASE 1 to 100000 'test for message sent from ATI Winamp plugin
    '                MSGBOX str$(LOWRD(wParam)) '"something selected"
    '                EXIT FUNCTION
    
                CASE %IDM_PLAY, 40045
                    MSGBOX "Start play"
                    PostMessage(hWndMain,%WM_USER,0,102)  'start play
                    EXIT FUNCTION
    
                CASE %IDM_PAUSE, 40046
                    MSGBOX "Play/Pause media"
                    hwnd_YourApp = FindWindow("YourApp", "")
                    IF hwnd_YourApp = 0 THEN MSGBOX "YourApp was not found!": EXIT FUNCTION
                    PostMessage(hwnd_YourApp,%WM_COMMAND, %IDM_PPM01,0)  'play/pause media
                    FUNCTION = 1
                    EXIT FUNCTION
    
                CASE %IDM_STOP, 40047
                    MSGBOX "Stop playback"
                    hwnd_YourApp = FindWindow("YourApp", "")
                    IF hwnd_YourApp = 0 THEN MSGBOX "YourApp was not found!": EXIT FUNCTION
                    PostMessage(hwnd_YourApp,%WM_COMMAND,%IDM_STP04,0)  'stop
                    FUNCTION = 1
                    EXIT FUNCTION
    
                CASE %IDM_MUTE
                    PostMessage(hWndMain,%WM_USER,0,122)  'set volume to 0 mute
    '                MSGBOX "Mute selected"
                    EXIT FUNCTION
    
                CASE %IDM_UMUTE
                    PostMessage(hWndMain,%WM_USER,127,122)  'set volume to 127 mid range
    '                MSGBOX "Unmute selected"
                    EXIT FUNCTION
    
                CASE %IDM_VUP, 40058
                    MSGBOX "Volume up"
                    hwnd_YourApp = FindWindow("YourApp", "")
                    IF hwnd_YourApp = 0 THEN MSGBOX "YourApp was not found!": EXIT FUNCTION
                    PostMessage(hwnd_YourApp,%WM_COMMAND,%IDM_VUP01,0)  'volume up
                    FUNCTION = 1
                    EXIT FUNCTION
    
                CASE %IDM_VDN, 40059
                    MSGBOX "Volume down"
                    hwnd_YourApp = FindWindow("YourApp", "")
                    IF hwnd_YourApp = 0 THEN MSGBOX "YourApp was not found!": EXIT FUNCTION
                    PostMessage(hwnd_YourApp,%WM_COMMAND,%IDM_VDN01,0)  'volume down
                    FUNCTION = 1
                    EXIT FUNCTION
    
                CASE %IDM_NEXT, 40048
                    MSGBOX "Play next track"
                    hwnd_YourApp = FindWindow("YourApp", "")
                    IF hwnd_YourApp = 0 THEN MSGBOX "YourApp was not found!": EXIT FUNCTION
                    PostMessage(hwnd_YourApp,%WM_COMMAND,%IDM_TRK02,0)  'play forward
                    FUNCTION = 1
                    EXIT FUNCTION
    
                CASE %IDM_LAST, 40044
                    MSGBOX "Play last track"
                    hwnd_YourApp = FindWindow("YourApp", "")
                    IF hwnd_YourApp = 0 THEN MSGBOX "YourApp was not found!": EXIT FUNCTION
                    PostMessage(hwnd_YourApp,%WM_COMMAND,%IDM_TRK01,0)  'play back
                    FUNCTION = 1
                    EXIT FUNCTION
    
                CASE %IDM_REPEAT, 40022
                    MSGBOX "Repeat Play selected"
                    EXIT FUNCTION
    
                CASE %IDM_MIX, 40023
                    MSGBOX "Mixed Play selected"
                    EXIT FUNCTION
    
    
                CASE %IDM_HELP
                    MSGBOX "There is no help!"
                    EXIT FUNCTION
    
                CASE %IDM_ABOUT
                    DialogBox hInst, "ABOUT", hWnd, CODEPTR(AboutProc)
                    EXIT FUNCTION
    
                CASE %IDM_CLOSE
                    MSGBOX "CLOSE selected"
                    EXIT FUNCTION
    
    
            END SELECT
    
        CASE %WM_DESTROY
            DeleteObject hBmp
            PostQuitMessage 0
            EXIT FUNCTION
    
      END SELECT
    
      FUNCTION = DefWindowProc(hWnd, wMsg, wParam, lParam)
    
    END FUNCTION
    
    
    FUNCTION WINMAIN (BYVAL hInstance     AS LONG, _
                      BYVAL hPrevInstance AS LONG, _
                      lpCmdLine           AS ASCIIZ PTR, _
                      BYVAL iCmdShow      AS LONG) AS LONG
    
        LOCAL Msg         AS tagMsg
        LOCAL wce         AS WNDCLASSEX
        LOCAL szClassName AS ASCIIZ * 80
        LOCAL hMenu       AS DWORD
        LOCAL hAccel      AS DWORD
    
        hInst             = hInstance
        szClassName       = "Winamp v1.x" 'This must be the class name so that the WINAMP plugin will
                                          'recognize it as the winamp player.
        wce.cbSize        = SIZEOF(wce)
        wce.style         = %CS_HREDRAW OR %CS_VREDRAW
        wce.lpfnWndProc   = CODEPTR(WndProc)
        wce.hInstance     = hInstance
        wce.hIcon         = LoadIcon(hInstance, "PROGRAM")
        wce.hCursor       = LoadCursor(%NULL, BYVAL %IDC_ARROW)
        wce.hbrBackground = GetStockObject(%WHITE_BRUSH)
        wce.lpszClassName = VARPTR(szClassName )
        wce.hIconSm       = LoadIcon(hInstance, BYVAL %IDI_APPLICATION)
    
        RegisterClassEx wce
        hMenu = LoadMenu(hInstance, "MAINMENU")
    
       ' Create a window using the registered class
        hWndMain = CreateWindowEx(%WS_EX_WINDOWEDGE OR %WS_EX_TOPMOST, _                  ' extended styles
                            szClassName, _                                                ' class name
                            "ATI Remote Wonder Tester", _                                 ' caption
                            %WS_OVERLAPPEDWINDOW OR %WS_VISIBLE, _                        ' window styles
                            0, 0, _                                                       ' left, top
                            360, 110, _                                                   ' width, height
                            %NULL, hMenu, _                                               ' handle of owner, menu handle
                            hInstance, BYVAL %NULL)                                       ' handle of instance, creation parameters
    
        hAccel = LoadAccelerators(hInstance, "REMOAPP")
    
        ShowWindow hWndMain, iCmdShow
    
        ghDlgModelessMain = hWndMain
        UpdateWindow hWndMain
        SetWindowPos hWndMain, %HWND_TOPMOST,0,0,0,0,%SWP_NOMOVE OR %SWP_NOSIZE
    
        ' Message handler loop
        DO WHILE GetMessage(Msg, BYVAL %NULL, 0, 0)
    
            SELECT CASE Msg.message
                CASE %WM_KEYDOWN
                    SELECT CASE Msg.wParam
                        CASE %VK_F5
                            SendMessage hWndMain, %WM_COMMAND, %IDM_ABOUT, 0
                    END SELECT
            END SELECT
    
            IF ISFALSE TranslateAccelerator(hWndMain, hAccel, Msg) THEN
                TranslateMessage Msg
                DispatchMessage Msg
            END IF
        LOOP
    
        FUNCTION = msg.wParam
    
    END FUNCTION  ' WinMain

    The Toolbar is a skeleton type with 10 images.
    Here is the resource:


    Code:
    // *
    // * File:	RemoApp.rc
    // *
    // * Purpose:	Resource information for ATI Remote Wonder Plus.
    // * 
    // * Author:	James R. Fritts
    // *
    // * Copyright:	Copyright (c) 2007 MyCompany Inc.
    // *
    // * Released:    for public domain
    // *
    
    #include "Resource.h"
    
    
    //* 
    #define IDM_PLAY              WM_USER       + 2001    // play
    #define IDM_PAUSE             WM_USER       + 2002    // pause
    #define IDM_STOP              WM_USER       + 2003    // Stop
    #define IDM_MUTE              WM_USER       + 2004    // mute
    #define IDM_UMUTE             WM_USER       + 2005    // unmute
    #define IDM_VUP               WM_USER       + 2006    // volume up
    #define IDM_VDN               WM_USER       + 2007    // volume down
    #define IDM_NEXT              WM_USER       + 2008    // play next
    #define IDM_LAST              WM_USER       + 2009    // play last
    #define IDM_REPEAT            WM_USER       + 2010    // repeat playback
    #define IDM_MIX               WM_USER       + 2011    // mixed playback
    
    //* 
    #define IDM_HELP              WM_USER       + 2100    // Help
    #define IDM_ABOUT             WM_USER       + 2101    // About box
    #define IDM_CLOSE             WM_USER       + 2102    // Close
    #define IDM_EXIT              WM_USER       + 2103    // Exit
    
    
    PROGRAM ICON SKELETON.ICO
    TOOLBAR BITMAP TOOLBAR.BMP   //10 button image
    
    /////////////////////////////////////////////////////////////////////////////
    //
    // Version
    //
    
    VS_VERSION_INFO VERSIONINFO
    FILEVERSION 1, 0, 0, 0
    PRODUCTVERSION 1, 0, 0, 0
    FILEFLAGS VS_FF_PRERELEASE
    FILEOS VOS_WINDOWS32
    FILETYPE VFT_APP
    BEGIN
      BLOCK "StringFileInfo"
      BEGIN
        BLOCK "040904E4"
        BEGIN
                VALUE "Build Number", "0\0"
                VALUE "Comments", "Visit http://www.MyCompany.com/ for updates.\0"
                VALUE "CompanyName", "MyCompany\0"
                VALUE "FileDescription", "Winamp\0"
                VALUE "FileVersion", "1.0.0.0\0"
                VALUE "InternalName", "REMOAPP\0"
                VALUE "Language", "English(United States)\0"
                VALUE "LegalCopyright", "Copyright © 2007,  MyCompany, Inc.\0"
                VALUE "LegalTrademarks", "MyCompany and RemoApp are trademarks of MyCompany, Inc.\0"
                VALUE "OriginalFilename", "RemoApp.exe\0"
                VALUE "PrivateBuild", "PublicDomain\0"
                VALUE "ProductName", "RemoApp\0"
                VALUE "ProductVersion", "1.0.0.0\0"
                VALUE "SpecialBuild", "1.0.0, Build 0 FINAL_2007\0"
        END
      END
    END
    
    STRINGTABLE LOADONCALL MOVEABLE
      BEGIN
        IDM_PLAY,       "Play"
        IDM_PAUSE,      "Pause"
        IDM_STOP,       "Stop"
        IDM_MUTE,       "Mute"
        IDM_UMUTE,      "Unmute"
        IDM_VUP,        "Volume Up"
        IDM_VDN,        "Volume Down"
        IDM_NEXT,       "Play Next"
        IDM_LAST,       "Play Last"
        IDM_REPEAT,     "Repeat Play"
        IDM_MIX,        "Mixed Play"
        IDM_HELP,       "Help"
        IDM_ABOUT,      "About Skeleton"
        IDM_EXIT,       "Exit Winamp"
      END
    
    MAINMENU MENU LOADONCALL MOVEABLE
      BEGIN
        POPUP "&Play Mode"
          BEGIN
            MENUITEM "&Play\tCtrl+P",                        IDM_PLAY
            MENUITEM "p&Ause\tCtrl+O",                       IDM_PAUSE
            MENUITEM "&Stop\tCtrl+S",                        IDM_STOP
            MENUITEM SEPARATOR
            MENUITEM "&Forward\tCtrl+F",                     IDM_NEXT
            MENUITEM "&Back\tCtrl+B",                        IDM_LAST
            MENUITEM SEPARATOR
            MENUITEM "&Repeat\tCtrl+R",                      IDM_REPEAT
            MENUITEM "&Mixed\tCtrl+M",                       IDM_MIX
            MENUITEM SEPARATOR
            MENUITEM "E&xit\tAlt+F4",                        IDM_EXIT
          END
        POPUP "&Volume"
          BEGIN
            MENUITEM "&Mute\tCtrl+X",                        IDM_MUTE
            MENUITEM "U&nmute\tCtrl+Z",                      IDM_UMUTE
            MENUITEM "&Up\tCtrl+U",                          IDM_VUP
            MENUITEM "&Down\tCtrl+D",                        IDM_VDN
          END
        POPUP "&Help", HELP
          BEGIN
            MENUITEM "&Help\tF1",                            IDM_HELP
            MENUITEM SEPARATOR
            MENUITEM "&About",                               IDM_ABOUT
          END
      END
    
    REMOAPP ACCELERATORS
    BEGIN
      "O",      IDM_PAUSE,      VIRTKEY, CONTROL
      "P",      IDM_PLAY,       VIRTKEY, CONTROL
      "S",      IDM_STOP,       VIRTKEY, CONTROL
      "F",      IDM_NEXT,       VIRTKEY, CONTROL
      "B",      IDM_LAST,       VIRTKEY, CONTROL
      "R",      IDM_REPEAT,     VIRTKEY, CONTROL
      "M",      IDM_MIX,        VIRTKEY, CONTROL
      "X",      IDM_MUTE,       VIRTKEY, CONTROL
      "Z",      IDM_UMUTE,      VIRTKEY, CONTROL
      "U",      IDM_VUP,        VIRTKEY, CONTROL
      "D",      IDM_VDN,        VIRTKEY, CONTROL
      "Q",      IDM_EXIT,       VIRTKEY, CONTROL
    END
    
    ABOUT DIALOG 62, 38, 192, 68
    STYLE DS_MODALFRAME | DS_CENTER| WS_POPUP | WS_VISIBLE | WS_CAPTION
    CAPTION "About RemoApp"
    BEGIN
      LTEXT           "RemoApp created with PB/Win 7",   101, 48, 17, 130, 8
      LTEXT           "Copyright \251 2007 MyCompany, Inc.", 122, 48, 26, 130, 8
      PUSHBUTTON      "&OK", 103, 75, 46, 40, 14
      ICON            "PROGRAM", 104, 14, 15, 18, 20
    END
    Last edited by Jim Fritts; 2 Dec 2007, 11:54 AM.
Working...
X