13#define IDC_MAIN_MDI 101
14#define IDC_MAIN_TOOL 102
15#define IDC_MAIN_STATUS 103
17#define IDC_CHILD_EDIT 101
19#define ID_MDI_FIRSTCHILD 50000
41 if(pszFileText !=
NULL)
75 DWORD dwBufferSize = dwTextLength + 1;
104 ofn.
lpstrFilter =
"Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0";
132 ofn.
lpstrFilter =
"Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0";
156 mcs.szTitle =
"[Untitled]";
183 int statwidths[] = {100, -1};
264 iToolHeight = rcTool.
bottom - rcTool.
top;
272 iStatusHeight = rcStatus.
bottom - rcStatus.
top;
278 iMDIHeight = rcClient.
bottom - iToolHeight - iStatusHeight;
369 HMENU hMenu, hFileMenu;
453 MessageBox(0,
"Could Not Register Child Window",
"Oh Oh...",
463 LPSTR lpCmdLine,
int nCmdShow)
497 "MDI Test Application",
static struct myctx * mcs
VOID WINAPI InitCommonControls(void)
#define OFN_OVERWRITEPROMPT
#define OFN_FILEMUSTEXIST
#define OFN_PATHMUSTEXIST
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
#define FILE_ATTRIBUTE_NORMAL
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
#define ID_WINDOW_CASCADE
const char g_szChildClassName[]
const char g_szClassName[]
BOOL SetUpMDIChildWindowClass(HINSTANCE hInstance)
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
void DoFileSave(HWND hwnd)
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
LRESULT CALLBACK MDIChildWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
void DoFileOpen(HWND hwnd)
BOOL LoadTextFileToEdit(HWND hEdit, LPCTSTR pszFileName)
#define ID_MDI_FIRSTCHILD
HWND CreateNewMDIChild(HWND hMDIClient)
BOOL SaveTextFileFromEdit(HWND hEdit, LPCTSTR pszFileName)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
#define WS_OVERLAPPEDWINDOW
#define TB_BUTTONSTRUCTSIZE
#define IDB_STD_SMALL_COLOR
TW_UINT32 TW_UINT16 TW_UINT16 MSG
WORD WORD PSZ PSZ pszFileName
SERVICE_STATUS_HANDLE hStatus
HGDIOBJ WINAPI GetStockObject(_In_ int)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define GetWindowTextLength
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define MDIS_ALLCHILDSTYLES
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI TranslateMDISysAccel(_In_ HWND, _In_ LPMSG)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
BOOL WINAPI DrawMenuBar(_In_ HWND)
BOOL WINAPI UpdateWindow(_In_ HWND)
#define MB_ICONEXCLAMATION
#define SendDlgItemMessage
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
HMENU WINAPI GetMenu(_In_ HWND)