Cleanup after extracting regedit code.

svn path=/trunk/; revision=3173
This commit is contained in:
Robert Dickenson 2002-07-03 18:11:49 +00:00
parent dc8c16d0fc
commit 7fe69e5501
9 changed files with 87 additions and 239 deletions

View file

@ -1,6 +1,6 @@
// stdafx.cpp : source file that includes just the standard includes
// regedt32.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
// regedt32.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"

View file

@ -10,7 +10,7 @@
#pragma once
#endif // _MSC_VER > 1000
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:

View file

@ -39,14 +39,14 @@
extern HINSTANCE hInst;
extern HWND hMainWnd;
//extern HWND hMainWnd;
LRESULT CALLBACK AboutDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
void OnAbout(void)
void ShowAboutBox(HWND hWnd)
{
DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hMainWnd, (DLGPROC)AboutDialogWndProc);
DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, (DLGPROC)AboutDialogWndProc);
}
LRESULT CALLBACK AboutDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)

View file

@ -24,7 +24,7 @@
#define __ABOUT_H__
void OnAbout(void);
void ShowAboutBox(HWND hWnd);
#endif // __ABOUT_H__

View file

@ -23,7 +23,7 @@
#ifdef _MSC_VER
#include "stdafx.h"
#else
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
#include <commctrl.h>
#include <stdlib.h>

View file

@ -23,7 +23,7 @@
#ifdef _MSC_VER
#include "stdafx.h"
#else
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
#include <commctrl.h>
#include <stdlib.h>
@ -66,7 +66,7 @@ ATOM MyRegisterClass2(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
@ -128,8 +128,7 @@ ATOM MyRegisterClass(HINSTANCE hInstance)
wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_REGEDT32);
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)SS_BLACKRECT/*(COLOR_WINDOW+1)*/;
// wcex.lpszMenuName = (LPCSTR)IDC_REGEDT32;
// wcex.lpszMenuName = (LPCSTR)IDR_REGEDIT_MENU;
// wcex.lpszMenuName = (LPCSTR)IDC_REGEDT32;
wcex.lpszMenuName = (LPCSTR)IDR_REGEDT32_MENU;
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = LoadIcon((HINSTANCE)wcex.hInstance, (LPCTSTR)IDI_SMALL);
@ -149,8 +148,7 @@ ATOM MyRegisterClass2(HINSTANCE hInstance)
wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_REGEDT32);
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = (LPCSTR)IDR_REGEDIT_MENU;
// wcex.lpszMenuName = (LPCSTR)IDR_REGEDT32_MENU;
wcex.lpszMenuName = (LPCSTR)IDR_REGEDT32_MENU;
wcex.lpszClassName = szFrameClass;
wcex.hIconSm = LoadIcon((HINSTANCE)wcex.hInstance, (LPCTSTR)IDI_SMALL);
return RegisterClassEx(&wcex);
@ -188,7 +186,7 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
// Create the status bar
hStatusWnd = CreateStatusWindow(WS_VISIBLE|WS_CHILD|WS_CLIPSIBLINGS|SBT_NOBORDERS,
"", hMainWnd, STATUS_WINDOW);
"", hMainWnd, STATUS_WINDOW);
if (!hStatusWnd)
return FALSE;
@ -249,7 +247,7 @@ void OnExitMenuLoop(HWND hWnd)
{
RECT rc;
int nParts[3];
TCHAR text[260];
// TCHAR text[260];
bInMenuLoop = FALSE;
// Update the status bar pane sizes
@ -297,8 +295,8 @@ LRESULT CALLBACK FrameWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
// Parse the menu selections:
switch (wmId) {
case IDM_ABOUT:
// DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);
{
// ShowAboutBox(hWnd);
{
HICON hIcon = LoadIcon(hInst, (LPCTSTR)IDI_REGEDT32);
ShellAbout(hWnd, szTitle, "FrameWndProc", hIcon);
//if (hIcon) DestroyIcon(hIcon); // NOT REQUIRED
@ -360,20 +358,20 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
//PageSetupDlg(&psd);
break;
case ID_REGISTRY_OPENLOCAL:
{
{
HWND hChildWnd;
// hChildWnd = CreateWindow(szFrameClass, szTitle, WS_OVERLAPPEDWINDOW | WS_CHILD,
// CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, hWnd, NULL, hInst, NULL);
hChildWnd = CreateWindow(szFrameClass, szTitle, WS_OVERLAPPEDWINDOW | WS_CHILD,
0, 0, 150, 170, hWnd, NULL, hInst, NULL);
if (hChildWnd) {
ShowWindow(hChildWnd, 1);
UpdateWindow(hChildWnd);
}
if (hChildWnd) {
ShowWindow(hChildWnd, 1);
UpdateWindow(hChildWnd);
}
}
break;
case IDM_ABOUT:
// DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);
// ShowAboutBox(hWnd);
{
HICON hIcon = LoadIcon(hInst, (LPCTSTR)IDI_REGEDT32);
ShellAbout(hWnd, szTitle, "", hIcon);
@ -419,19 +417,3 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
}
return 0;
}
// Mesage handler for about box.
LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
case WM_INITDIALOG:
return TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) {
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
break;
}
return FALSE;
}

View file

@ -39,166 +39,6 @@ IDI_SMALL ICON DISCARDABLE "SMALL.ICO"
// Menu
//
IDC_REGEDT32 MENU DISCARDABLE
BEGIN
POPUP "&File"
BEGIN
MENUITEM "E&xit", IDM_EXIT
END
POPUP "&Help"
BEGIN
MENUITEM "&About ...", IDM_ABOUT
END
END
/////////////////////////////////////////////////////////////////////////////
//
// Accelerator
//
#ifdef _MSC_VER
IDC_REGEDT32 ACCELERATORS MOVEABLE PURE
BEGIN
"?", IDM_ABOUT, ASCII, ALT
"/", IDM_ABOUT, ASCII, ALT
END
#endif
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_ABOUTBOX DIALOG DISCARDABLE 22, 17, 230, 75
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "About"
FONT 8, "System"
BEGIN
ICON IDI_REGEDT32,IDC_MYICON,14,9,16,16
LTEXT "ReactOS regedt32 Version 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX
LTEXT "Copyright (C) 2002 ReactOS Team",IDC_STATIC,49,20,119,8
DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP
END
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""windows.h""\r\n"
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""resource.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_APP_TITLE "ReactOS Registry Editor"
IDS_HELLO "Hello World!"
IDC_REGEDT32 "REGED32"
IDC_REGEDT32_FRAME "REGED32_FRAME"
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// English (Australia) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENA)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Menu
//
IDR_REGEDIT_MENU MENU DISCARDABLE
BEGIN
POPUP "&Registry"
BEGIN
MENUITEM "&Import Registry File...", ID_REGISTRY_IMPORTREGISTRYFILE
MENUITEM "&Export Registry File...", ID_REGISTRY_EXPORTREGISTRYFILE
MENUITEM SEPARATOR
MENUITEM "&Connect Network Registry...",
ID_REGISTRY_CONNECTNETWORKREGISTRY
MENUITEM "&Disconnect Network Registry...",
ID_REGISTRY_DISCONNECTNETWORKREGISTRY
, GRAYED
MENUITEM SEPARATOR
MENUITEM "&Print\tCtrl+P", ID_REGISTRY_PRINT
MENUITEM SEPARATOR
MENUITEM "E&xit", IDM_EXIT
END
POPUP "&Edit"
BEGIN
MENUITEM "&Modify", ID_EDIT_MODIFY
MENUITEM SEPARATOR
POPUP "&New"
BEGIN
MENUITEM "&Key", ID_EDIT_NEW_KEY
MENUITEM SEPARATOR
MENUITEM "&String Value", ID_EDIT_NEW_STRINGVALUE
MENUITEM "&Binary Value", ID_EDIT_NEW_BINARYVALUE
MENUITEM "&DWORD Value", ID_EDIT_NEW_DWORDVALUE
END
MENUITEM SEPARATOR
MENUITEM "&Delete\tDel", ID_EDIT_DELETE
MENUITEM "&Rename", ID_EDIT_RENAME
MENUITEM SEPARATOR
MENUITEM "&Copy Key Name", ID_EDIT_COPYKEYNAME
MENUITEM SEPARATOR
MENUITEM "&Find\tCtrl+F", ID_EDIT_FIND
MENUITEM "Find Ne&xt\tF3", ID_EDIT_FINDNEXT
END
POPUP "&View"
BEGIN
MENUITEM "Status &Bar", ID_VIEW_STATUSBAR
MENUITEM SEPARATOR
MENUITEM "Sp&lit", ID_VIEW_SPLIT
MENUITEM SEPARATOR
MENUITEM "&Refresh\tF5", ID_VIEW_REFRESH
END
POPUP "&Favorites"
BEGIN
MENUITEM "&Add to Favourites", ID_FAVORITES_ADDTOFAVOURITES
MENUITEM "&Remove Favourite", ID_FAVORITES_REMOVEFAVOURITE
, GRAYED
END
POPUP "&Help"
BEGIN
MENUITEM "&Help Topics", ID_HELP_HELPTOPICS
MENUITEM SEPARATOR
MENUITEM "&About Registry Editor", IDM_ABOUT
END
END
IDR_REGEDT32_MENU MENU DISCARDABLE
BEGIN
POPUP "&Registry"
@ -299,16 +139,69 @@ END
// Dialog
//
IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 186, 95
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
IDD_ABOUTBOX DIALOG DISCARDABLE 22, 17, 230, 75
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "About"
FONT 8, "System"
BEGIN
DEFPUSHBUTTON "OK",IDOK,129,7,50,14
PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14
ICON IDI_REGEDT32,IDI_REGEDT32,14,9,16,16
LTEXT "ReactOS regedt32 Version 1.0",IDC_STATIC,49,10,119,8,
SS_NOPREFIX
LTEXT "Copyright (C) 2002 ReactOS Team",IDC_STATIC,49,20,119,8
DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP
END
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""windows.h""\r\n"
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""resource.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_APP_TITLE "ReactOS Registry Editor"
IDC_REGEDT32 "REGED32"
IDC_REGEDT32_FRAME "REGED32_FRAME"
IDS_HELLO "Hello World!"
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// English (Australia) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENA)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
@ -323,25 +216,6 @@ END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_DIALOG1, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 179
TOPMARGIN, 7
BOTTOMMARGIN, 88
END
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// String Table
@ -350,10 +224,6 @@ END
STRINGTABLE DISCARDABLE
BEGIN
ID_HELP_HELPTOPICS "Opens Registry Editor Help."
END
STRINGTABLE DISCARDABLE
BEGIN
IDM_ABOUT "Displays program information, version number, and copyright."
END

View file

@ -2,8 +2,6 @@
// Microsoft Developer Studio generated include file.
// Used by regedt32.rc
//
#define IDC_MYICON 2
#define IDD_REGED_DIALOG 102
#define IDD_ABOUTBOX 103
#define IDS_APP_TITLE 103
#define IDM_ABOUT 104
@ -13,10 +11,8 @@
#define IDI_SMALL 108
#define IDC_REGEDT32 109
#define IDC_REGEDT32_FRAME 110
#define IDR_MAINFRAME 128
#define IDR_REGEDIT_MENU 129
#define IDR_REGEDT32_MENU 130
#define IDD_DIALOG1 131
#define IDR_REGEDT32_MENU 129
#define IDR_REGEDT_MENU 130
#define ID_HELP_HELPTOPICS 32771
#define ID_FAVORITES_ADDTOFAVOURITES 32772
#define ID_FAVORITES_REMOVEFAVOURITE 32773