[ROSAPPS] Add previously built templates back to build. Fix several warnings in dialog and mdi template. This should be it for rosapps stuff

svn path=/trunk/; revision=67435
This commit is contained in:
Daniel Reimer 2015-04-26 13:06:35 +00:00
parent b9f7c1566a
commit 6a5d0fedd8
11 changed files with 192 additions and 152 deletions

View file

@ -2,3 +2,4 @@ add_subdirectory(applications)
add_subdirectory(demos)
add_subdirectory(drivers)
add_subdirectory(lib)
add_subdirectory(templates)

View file

@ -0,0 +1,3 @@
add_subdirectory(dialog)
add_subdirectory(mdi)
add_subdirectory(old_wordpad)

View file

@ -0,0 +1,14 @@
list(APPEND SOURCE
dialog.c
memdlg.c
page1.c
page2.c
page3.c
trace.c)
add_executable(template_dialog ${SOURCE} dialog.rc)
set_module_type(template_dialog win32cui)
add_target_compile_flags(template_dialog "-Wno-unused-but-set-variable")
add_importlibs(template_dialog user32 gdi32 comctl32 msvcrt kernel32 ntdll)
add_cd_file(TARGET template_dialog DESTINATION reactos/system32 FOR all)

View file

@ -1,6 +1,6 @@
//Microsoft Developer Studio generated resource script.
//
#include "resrc1.h"
// #include "resrc1.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////

View file

@ -137,7 +137,7 @@ LRESULT CreateMemoryDialog(HINSTANCE hinst, HWND hwndOwner, LPSTR lpszMessage)
*lpw++ = 0x0082; // static class
for (lpwsz = (LPWSTR)lpw;
*lpwsz++ = (WCHAR)*lpszMessage++;
*lpwsz++ == (WCHAR)*lpszMessage++;
);
lpw = (LPWORD)lpwsz;
lpw = lpwAlign(lpw); // align creation data on DWORD boundary

View file

@ -0,0 +1,11 @@
list(APPEND SOURCE
about.c
framewnd.c
childwnd.c
main.c)
add_executable(template_mdi ${SOURCE} mdi.rc)
set_module_type(template_mdi win32cui)
add_importlibs(template_mdi advapi32 user32 gdi32 comctl32 msvcrt kernel32 ntdll)
add_cd_file(TARGET template_mdi DESTINATION reactos/system32 FOR all)

View file

@ -104,7 +104,6 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
ChildWnd* pChildWnd = (ChildWnd*)GetWindowLong(hWnd, GWL_USERDATA);
ASSERT(pChildWnd);
if (1) {
switch(message) {
case WM_CREATE:
return 0;
@ -114,7 +113,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
} else {
}
DrawMenuBar(hFrameWnd);
// return 0;
// return 0;
break;
case WM_PAINT:
@ -122,7 +121,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
return 0;
case WM_NCDESTROY:
//SetWindowLong(hWnd, GWL_USERDATA, 0);
// SetWindowLong(hWnd, GWL_USERDATA, 0);
break;
case WM_SETCURSOR:
@ -251,7 +250,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
OnSize(pChildWnd, wParam, lParam);
}
// fall through
default: def:
// default: def:
return DefMDIChildProc(hWnd, message, wParam, lParam);
}
return DefMDIChildProc(hWnd, message, wParam, lParam);

View file

@ -70,12 +70,12 @@ static void resize_frame_rect(HWND hWnd, PRECT prect)
MoveWindow(hMDIClient, prect->left-1,prect->top-1,prect->right+2,prect->bottom+1, TRUE);
}
static void resize_frame(HWND hWnd, int cx, int cy)
/* static void resize_frame(HWND hWnd, int cx, int cy)
{
RECT rect = {0, 0, cx, cy};
resize_frame_rect(hWnd, &rect);
}
}*/
void resize_frame_client(HWND hWnd)
{

View file

@ -92,28 +92,27 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
};
ATOM hChildWndClass = RegisterClass(&wcChild); // register child windows class
#else
WNDCLASSEX wcChild = {
sizeof(WNDCLASSEX),
CS_HREDRAW | CS_VREDRAW/*style*/,
ChildWndProc,
0/*cbClsExtra*/,
sizeof(HANDLE)/*cbWndExtra*/,
hInstance,
LoadIcon(hInstance, MAKEINTRESOURCE(IDI_MDI_APP)),
LoadCursor(0, IDC_ARROW),
0/*hbrBackground*/,
0/*lpszMenuName*/,
szChildClass,
(HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDC_MDI_APP), IMAGE_ICON,
GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED)
};
ATOM hChildWndClass = RegisterClassEx(&wcChild); // register child windows class
// WNDCLASSEX wcChild = {
// sizeof(WNDCLASSEX),
// CS_HREDRAW | CS_VREDRAW/*style*/,
// ChildWndProc,
// 0/*cbClsExtra*/,
// sizeof(HANDLE)/*cbWndExtra*/,
// hInstance,
// LoadIcon(hInstance, MAKEINTRESOURCE(IDI_MDI_APP)),
// LoadCursor(0, IDC_ARROW),
// 0/*hbrBackground*/,
// 0/*lpszMenuName*/,
// szChildClass,
// (HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDC_MDI_APP), IMAGE_ICON,
// GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED)
// };
// ATOM hChildWndClass = RegisterClassEx(&wcChild); // register child windows class
#endif
HMENU hMenu = LoadMenu(hInstance, MAKEINTRESOURCE(IDC_MDI_APP));
HMENU hMenuOptions = GetSubMenu(hMenu, ID_OPTIONS_MENU);
HMENU hChildMenu = LoadMenu(hInstance, MAKEINTRESOURCE(IDC_MDI_APP_CHILD));
// HMENU hChildMenu = LoadMenu(hInstance, MAKEINTRESOURCE(IDC_MDI_APP_CHILD));
INITCOMMONCONTROLSEX icc = {
sizeof(INITCOMMONCONTROLSEX),

View file

@ -33,7 +33,7 @@ extern "C" {
#include "resource.h"
#include "../../lib/ros2win/ros2win.h"
// #include "../../lib/ros2win/ros2win.h"
////////////////////////////////////////////////////////////////////////////////

View file

@ -0,0 +1,13 @@
list(APPEND SOURCE
dialogs.c
editwnd.c
mainwnd.c
misc.c
opensave.c
wordpad.c)
add_executable(old_wordpad ${SOURCE} wordpad.rc)
set_module_type(old_wordpad win32gui UNICODE)
add_importlibs(old_wordpad user32 gdi32 comdlg32 advapi32 shell32 comctl32 msvcrt kernel32 ntdll)
add_cd_file(TARGET old_wordpad DESTINATION reactos/system32 FOR all)