>
# include "resource.h"
# ifdef __ cplusplus
# define IMPORT extern "C" __ declspec (dllimport)
# else
# define IMPORT __ declspec (dllimport)
# endif
// Вантажимо наші функції з DLL за допомогою Fat32Info.lib
# pragma comment (lib, "Fat32Info.lib")
// Список імпортованих функційvoid ReadBoot (HWND hDlg, UINT uIDC_DAMP, UINT uIDC_DATA, LPCTSTR path); void ReadTable (HWND hDlg, UINT uIDC_DAMP, UINT uIDC_DATA, LPCTSTR path); void ReadRoot (HWND hDlg, UINT uIDC_DAMP, UINT uIDC_DATA, LPCTSTR path, UINT uIDC_N, UINT uIDC_CHAIN, int pos); ResizeWnd (HWND hDlg, RECT pWndRect) ;//Функція перерісокі елементів вікна при зміні його размераCALLBACK DlgProc (HWND, UINT, WPARAM, LPARAM); APIENTRY WinMain (HINSTANCE hInstance, hPrevInstance, lpCmdLine, nCmdShow)
{
// TODO: Place code here.msg; (hInstance, MAKEINTRESOURCE (IDD_DIALOG1), NULL, DlgProc);
// Main message loop: (GetMessage (& msg, NULL, 0, 0))
{(& msg); (& msg);
} msg.wParam;
} ResizeWnd (HWND hDlg, RECT pWndRect)
{Width = pWndRect.right - pWndRect.left; Height = pWndRect.bottom-pWndRect.top; (GetDlgItem (hDlg, IDC_INFO_FAT), 0, 2, Width /2 - 1, 14, TRUE); (GetDlgItem (hDlg, IDC_DATA) , 0,20, Width/2 - 1, Height - 100, TRUE); (GetDlgItem (hDlg, IDC_DAMP_FAT), Width/2, 2, Width/2 - 1, 14, TRUE); (GetDlgItem (hDlg, IDC_DAMP) , Width/2,20, Width/2 - 6, Height - 100, TRUE); (GetDlgItem (hDlg, IDC_SHOW_GETDRV), 5, Height - 70,135, 18, TRUE); (GetDlgItem (hDlg, IDC_GETDRV) , 142, Height - 72, 30, 22, TRUE); (GetDlgItem (hDlg, IDC_SETDEVICE), 175, Height - 72, Width - 175 - 40, 22, TRUE); (GetDlgItem (hDlg, IDC_SETDRV), Width - 35, Height - 72, 30, 22, TRUE); (GetDlgItem (hDlg, IDC_CLUSTERS), 0, Height - 48,2 * Width/3, 14, TRUE); (GetDlgItem (hDlg, IDC_BUTTONL), 4, Height - 30,24, 23, TRUE); (GetDlgItem (hDlg, IDC_N), 28, Height - 30,28, 22, TRUE ); (GetDlgItem (hDlg, IDC_BUTTONR), 58, Height - 30,24, 23, TRUE); (GetDlgItem (hDlg, IDC_CHAIN), 84, Height - 30, Width - 84 - 160, 23, TRUE); (GetDlgItem (hDlg, IDC_RELOAD), Width - 158, Height - 30,75, 23, TRUE); (GetDlgItem (hDlg, IDCANCEL), Width - 82, Height - 30,75, 23, TRUE); p>
} szDrvPath [16] = {0}; pos = -1, func = -1; CALLBACK DlgProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{bRet = FALSE; bCmd = FALSE; pRect = {0}; hBrush;// колір фону діалогового окнаbuf [2] = {0}; (message)
{WM_CTLCOLORDLG:...