#define IDB_BITMAP1 104
#define IDB_TREEICON 104
#define IDC_TREE1 1001
-#define IDC_EDIT1 1002
#define IDC_EDSFNAME 1002
+#define IDC_EDSFLABEL 1003
#define ID_FILE_OPENSOUNDFONT 40001
#define ID_FILE_QUIT 40002
#define ID_FILE_SAVETIMIDITYCONFIGFILE 40003
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 105
#define _APS_NEXT_COMMAND_VALUE 40013
-#define _APS_NEXT_CONTROL_VALUE 1003
+#define _APS_NEXT_CONTROL_VALUE 1004
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
END
101 DIALOGEX 0, 0, 255, 195
-STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU
+STYLE WS_OVERLAPPEDWINDOW
EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Soundfont Viewer 1.01"
MENU IDR_MENU1
FONT 9, "MS UI Gothic", FW_NORMAL, 0, 128
BEGIN
CONTROL "", IDC_TREE1, WC_TREEVIEW, WS_TABSTOP | WS_HSCROLL | WS_BORDER | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT, 0, 0, 255, 182
- LTEXT "Soundfont Path", -1, 0, 183, 56, 12, SS_LEFT
+ LTEXT "Soundfont Path", IDC_EDSFLABEL, 0, 183, 56, 12, SS_LEFT
EDITTEXT IDC_EDSFNAME, 57, 183, 198, 12, NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY
END
#define _CRT_SECURE_NO_WARNINGS
#pragma warning(disable:4530) // \83A\83\93\83\8f\83C\83\93\83h \83Z\83}\83\93\83e\83B\83N\83X\82ª\96³\8cø
#include <windows.h>
+#include <windowsx.h>
#include <commctrl.h>
#include "resource.h"
#pragma comment(lib, "shlwapi.lib")
return TRUE;
}
+LRESULT DlgMainProc_SIZE(HWND hDlg, WPARAM wParam, LPARAM lParam)
+{
+ if (wParam != SC_MINIMIZE) {
+ SetWindowPos(
+ GetDlgItem(hDlg, IDC_TREE1),
+ NULL,
+ 0,
+ 0,
+ GET_X_LPARAM(lParam),
+ GET_Y_LPARAM(lParam) - 17,
+ SWP_NOACTIVATE | SWP_NOZORDER
+ );
+
+ SetWindowPos(
+ GetDlgItem(hDlg, IDC_EDSFLABEL),
+ NULL,
+ 0,
+ GET_Y_LPARAM(lParam) - 16,
+ 99,
+ 16,
+ SWP_NOACTIVATE | SWP_NOZORDER
+ );
+
+ SetWindowPos(
+ GetDlgItem(hDlg, IDC_EDSFNAME),
+ NULL,
+ 100,
+ GET_Y_LPARAM(lParam) - 16,
+ GET_X_LPARAM(lParam) - 100,
+ 16,
+ SWP_NOACTIVATE | SWP_NOZORDER
+ );
+ }
+
+ return TRUE;
+}
+
LRESULT CALLBACK DlgMainProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
#define SET_MYWINMSG(VN) case WM_ ## VN: return DlgMainProc_## VN(hDlg, wParam, lParam);
SET_MYWINMSG(DROPFILES);
SET_MYWINMSG(COMMAND);
SET_MYWINMSG(CLOSE);
+ SET_MYWINMSG(SIZE);
}
#undef SET_MYWINMSG
return FALSE;