Archived
menu bar options
This commit is contained in:
1 parent
33002f81d8
commit
8aed9d2c78
2 files changed
+55
-28
No files matched your search
@@ -50,8 +50,6 @@ HWND filesListScroll;
|
||||
HWND playButton;
|
||||
HWND stopButton;
|
||||
HWND npLabel;
|
||||
HWND autoPlayCheck;
|
||||
HWND loopCheck;
|
||||
HMENU menuBar;
|
||||
|
||||
//HOOKS
|
||||
@@ -97,12 +95,6 @@ void CreateControls(HWND window) {
|
||||
SendMessage(playButton, WM_SETFONT, (WPARAM)hFont, TRUE);
|
||||
stopButton = EzCreateButton(L"Zatrzymaj", 195, 515, 100, 30, window, NULL);
|
||||
SendMessage(stopButton, WM_SETFONT, (WPARAM)hFont, TRUE);
|
||||
autoPlayCheck = CreateWindowEx(NULL, L"BUTTON", L"Odtwarzaj automatycznie", BS_CHECKBOX | WS_VISIBLE | WS_CHILD | SS_CENTER | SS_CENTERIMAGE, 105, 485, 170, 30, window, NULL, NULL, NULL);
|
||||
SendMessage(autoPlayCheck, BM_SETCHECK, BST_CHECKED, NULL);
|
||||
SendMessage(autoPlayCheck, WM_SETFONT, (WPARAM)hFont, TRUE);
|
||||
loopCheck = CreateWindowEx(NULL, L"BUTTON", L"Pêtla", BS_CHECKBOX | WS_VISIBLE | WS_CHILD | SS_CENTER | SS_CENTERIMAGE, 300, 485, 50, 30, window, NULL, NULL, NULL);
|
||||
SendMessage(loopCheck, BM_SETCHECK, BST_UNCHECKED, NULL);
|
||||
SendMessage(loopCheck, WM_SETFONT, (WPARAM)hFont, TRUE);
|
||||
filesListScroll = CreateWindowEx(0, L"SCROLLBAR", NULL, WS_CHILD | WS_VISIBLE | SBS_VERT, 300, 50, 50, 425, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
void GetFiles(TCHAR* path, wstring ext) {
|
||||
@@ -227,26 +219,6 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ((HWND)lParam == autoPlayCheck) {
|
||||
if (isAutoPlayEnabled) {
|
||||
SendMessage(autoPlayCheck, BM_SETCHECK, BST_UNCHECKED, NULL);
|
||||
isAutoPlayEnabled = FALSE;
|
||||
}
|
||||
else {
|
||||
SendMessage(autoPlayCheck, BM_SETCHECK, BST_CHECKED, NULL);
|
||||
isAutoPlayEnabled = TRUE;
|
||||
}
|
||||
}
|
||||
else if ((HWND)lParam == loopCheck) {
|
||||
if (isLoopEnabled) {
|
||||
SendMessage(loopCheck, BM_SETCHECK, BST_UNCHECKED, NULL);
|
||||
isLoopEnabled = FALSE;
|
||||
}
|
||||
else {
|
||||
SendMessage(loopCheck, BM_SETCHECK, BST_CHECKED, NULL);
|
||||
isLoopEnabled = TRUE;
|
||||
}
|
||||
}
|
||||
else if ((HWND)lParam == stopButton) {
|
||||
mciSendString(L"close mp3", NULL, 0, NULL);
|
||||
SendMessage(mainWindow, STATE_CHANGE, 0, NULL);
|
||||
@@ -285,6 +257,27 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
|
||||
else {
|
||||
MessageBox(mainWindow, L"Nie za³adowano folderu. Naciœnij przycisk PRZEGL¥DAJ, aby wczytaæ katalog.", L"Brak katalogu", MB_ICONERROR);
|
||||
}
|
||||
break;
|
||||
case ID_OPCJE_ONCLICK:
|
||||
if (isAutoPlayEnabled) {
|
||||
CheckMenuItem(menuBar, ID_OPCJE_ONCLICK, MF_UNCHECKED);
|
||||
isAutoPlayEnabled = FALSE;
|
||||
}
|
||||
else {
|
||||
CheckMenuItem(menuBar, ID_OPCJE_ONCLICK, MF_CHECKED);
|
||||
isAutoPlayEnabled = TRUE;
|
||||
}
|
||||
break;
|
||||
case ID_OPCJE_LOOP:
|
||||
if (isLoopEnabled) {
|
||||
CheckMenuItem(menuBar, ID_OPCJE_LOOP, MF_UNCHECKED);
|
||||
isLoopEnabled = FALSE;
|
||||
}
|
||||
else {
|
||||
CheckMenuItem(menuBar, ID_OPCJE_LOOP, MF_CHECKED);
|
||||
isLoopEnabled = TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case MM_MCINOTIFY:
|
||||
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by PAiPlayer.rc
|
||||
//
|
||||
#define IDC_MYICON 2
|
||||
#define IDD_PAIPLAYER_DIALOG 102
|
||||
#define IDS_APP_TITLE 103
|
||||
#define IDD_ABOUTBOX 103
|
||||
#define IDM_ABOUT 104
|
||||
#define IDM_EXIT 105
|
||||
#define IDI_PAIPLAYER 107
|
||||
#define IDI_SMALL 108
|
||||
#define IDC_PAIPLAYER 109
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDC_MENU 200
|
||||
#define ID_PLIK_OD32774 32774
|
||||
#define ID_REFRESH 32775
|
||||
#define ID_OPCJE_ODTWARZAJPOKLIKNI32776 32776
|
||||
#define ID_OPCJE_POWTARZAJ 32777
|
||||
#define ID_OPCJE_ONCLICK 32778
|
||||
#define ID_OPCJE_LOOP 32779
|
||||
#define IDC_STATIC -1
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 129
|
||||
#define _APS_NEXT_COMMAND_VALUE 32780
|
||||
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||
#define _APS_NEXT_SYMED_VALUE 110
|
||||
#endif
|
||||
#endif
|
||||
Reference in new issue
Block a user