#include "progman.h"
+#include <commdlg.h>
+
/***********************************************************************
*
* DIALOG_Browse
class.cbClsExtra = 0;
class.cbWndExtra = sizeof(LONG_PTR);
class.hInstance = Globals.hInstance;
- class.hIcon = LoadIconW(0, (LPWSTR)IDI_WINLOGO);
- class.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW);
+ class.hIcon = LoadIconW (0, (LPWSTR)IDI_WINLOGO);
+ class.hCursor = LoadCursorW (0, (LPWSTR)IDC_ARROW);
class.hbrBackground = GetStockObject (WHITE_BRUSH);
class.lpszMenuName = 0;
class.lpszClassName = STRING_GROUP_WIN_CLASS_NAME;
cs.style = 0;
cs.lParam = 0;
+#ifdef __REACTOS__
group->hWnd = (HWND)SendMessageW(Globals.hMDIWnd, WM_MDICREATE, 0, (LPARAM)&cs);
+#else
+ group->hWnd = (HWND)SendMessageA(Globals.hMDIWnd, WM_MDICREATE, 0, (LPARAM)&cs);
+#endif
SetWindowTextA( group->hWnd, lpszName );
SetWindowLongPtrW(group->hWnd, 0, (LONG_PTR) hGroup);
*/
#include "progman.h"
-// #include <mmsystem.h>
#define MALLOCHUNK 1000
if (iconANDbits_ptr + iconANDsize > buffer + size ||
iconXORbits_ptr + iconXORsize > buffer + size) return(0);
- hIcon = CreateIcon( Globals.hInstance, width, height, planes, bpp, (PBYTE)iconANDbits_ptr, (PBYTE)iconXORbits_ptr );
+#ifdef __REACTOS__
+ hIcon = CreateIcon(Globals.hInstance, width, height, planes, bpp, (PBYTE)iconANDbits_ptr, (PBYTE)iconXORbits_ptr);
+#else
+ hIcon = CreateIcon( Globals.hInstance, width, height, planes, bpp, iconANDbits_ptr, iconXORbits_ptr );
+#endif
lpszName = buffer + GET_USHORT(program_ptr, 18);
lpszCmdLine = buffer + GET_USHORT(program_ptr, 20);
HLOCAL hProgram;
INT NumProg, Title, Progs, Icons, Extension;
INT CurrProg, CurrIcon, nCmdShow, ptr, seqnum;
- UINT sizeAnd, sizeXor;
+#ifdef __REACTOS__
+ UINT sizeAnd, sizeXor;
+#else
+ DWORD sizeAnd, sizeXor;
+#endif
BOOL need_extension;
LPCSTR lpszTitle = LocalLock(group->hName);
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-// #define OEMRESOURCE
#include "progman.h"
+#include <shellapi.h>
+
GLOBALS Globals;
static VOID MAIN_CreateGroups(void);
* WinMain
*/
-int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show)
+#ifdef __REACTOS__
+int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show)
+#else
+int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show)
+#endif
{
MSG msg;
Globals.lpszIniFile = "progman.ini";
+#ifndef __REACTOS__
+ Globals.lpszIcoFile = "progman.ico";
+#endif
Globals.hInstance = hInstance;
Globals.hGroups = 0;
GetPrivateProfileIntA("Settings", "SaveSettings", 0, Globals.lpszIniFile);
/* Load default icons */
- Globals.hMainIcon = LoadIconW(Globals.hInstance, MAKEINTRESOURCEW(IDI_APPICON));
- Globals.hGroupIcon = Globals.hMainIcon; // ExtractIconA(Globals.hInstance, Globals.lpszIcoFile, 0);
- Globals.hDefaultIcon = Globals.hMainIcon; // ExtractIconA(Globals.hInstance, Globals.lpszIcoFile, 0);
+#ifdef __REACTOS__
+ Globals.hMainIcon = LoadIconW(Globals.hInstance, MAKEINTRESOURCEW(IDI_APPICON));
+ Globals.hGroupIcon = Globals.hMainIcon;
+ Globals.hDefaultIcon = Globals.hMainIcon;
+#else
+ Globals.hMainIcon = ExtractIconA(Globals.hInstance, Globals.lpszIcoFile, 0);
+ Globals.hGroupIcon = ExtractIconA(Globals.hInstance, Globals.lpszIcoFile, 0);
+ Globals.hDefaultIcon = ExtractIconA(Globals.hInstance, Globals.lpszIcoFile, 0);
+#endif
if (!Globals.hMainIcon) Globals.hMainIcon = LoadIconW(0, (LPWSTR)DEFAULTICON);
if (!Globals.hGroupIcon) Globals.hGroupIcon = LoadIconW(0, (LPWSTR)DEFAULTICON);
if (!Globals.hDefaultIcon) Globals.hDefaultIcon = LoadIconW(0, (LPWSTR)DEFAULTICON);
break;
case PM_ABOUT_WINE:
+#ifdef __REACTOS__
{
WCHAR szTitle[MAX_STRING_LEN];
LoadStringW(Globals.hInstance, IDS_PROGRAM_MANAGER, szTitle, ARRAYSIZE(szTitle));
ShellAboutW(hWnd, szTitle, NULL, NULL);
break;
}
+#else
+ ShellAboutA(hWnd, "WINE", "Program Manager", 0);
+ break;
+#endif
default:
MAIN_MessageBoxIDS(IDS_NOT_IMPLEMENTED, IDS_ERROR, MB_OK);
class.cbWndExtra = 0;
class.hInstance = Globals.hInstance;
class.hIcon = Globals.hMainIcon;
- class.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW);
+ class.hCursor = LoadCursorW (0, (LPWSTR)IDC_ARROW);
class.hbrBackground = GetStockObject (NULL_BRUSH);
class.lpszMenuName = 0;
class.lpszClassName = STRING_MAIN_WIN_CLASS_NAME;
#define PROGMAN_H
#include <stdio.h>
-#include <string.h>
-#define WIN32_LEAN_AND_MEAN
-
-#include <windows.h>
+#define WIN32_NO_STATUS
#include <windef.h>
-#include <commdlg.h>
-#include <shellapi.h>
-
+#include <winbase.h>
+#include <wingdi.h>
+#include <winuser.h>
#define MAX_STRING_LEN 255
#define MAX_PATHNAME_LEN 1024
#define MAX_LANGUAGE_NUMBER (PM_LAST_LANGUAGE - PM_FIRST_LANGUAGE)
-
#include "resource.h"
/* Fallback icon */
HMENU hWindowsMenu;
HMENU hLanguageMenu;
LPCSTR lpszIniFile;
+#ifndef __REACTOS__
+ LPCSTR lpszIcoFile;
+#endif
BOOL bAutoArrange;
BOOL bSaveSettings;
BOOL bMinOnRun;
extern WCHAR STRING_PROGRAM_WIN_CLASS_NAME[];
#endif /* PROGMAN_H */
+
+/* Local Variables: */
+/* c-file-style: "GNU" */
+/* End: */
#include <windef.h>
#include <winuser.h>
-// #include <commctrl.h>
#include "resource.h"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
-#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Program Manager"
-#define REACTOS_STR_INTERNAL_NAME "progman"
-#define REACTOS_STR_ORIGINAL_FILENAME "progman.exe"
+#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Program Manager"
+#define REACTOS_STR_INTERNAL_NAME "progman"
+#define REACTOS_STR_ORIGINAL_FILENAME "progman.exe"
#include <reactos/version.rc>
IDI_APPICON ICON "res/progman.ico"
-
-
-
-
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
MAIN_MENU MENU
EDITTEXT PM_DIRECTORY, 95, 40, 90, 15, WS_TABSTOP
LTEXT "&Key combination:", PM_HOT_KEY_TXT, 5, 55, 75, 10
EDITTEXT PM_HOT_KEY, 95, 55, 90, 15, WS_TABSTOP
+#ifdef __REACTOS__
ICON "", PM_ICON, 20, 70, 20, 20
+#else
+ICON "", PM_ICON, 20, 70
+#endif
CHECKBOX "&Minimize at launch", PM_SYMBOL, 95, 75, 90, 10, WS_TABSTOP
DEFPUSHBUTTON "OK", IDOK, 200, 5, 70, 15, WS_TABSTOP
PUSHBUTTON "Cancel", IDCANCEL, 200, 25, 70, 15, WS_TABSTOP
class.cbWndExtra = sizeof(LONG_PTR);
class.hInstance = Globals.hInstance;
class.hIcon = 0;
- class.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW);
+ class.hCursor = LoadCursorW (0, (LPWSTR)IDC_ARROW);
class.hbrBackground = GetStockObject (WHITE_BRUSH);
class.lpszMenuName = 0;
class.lpszClassName = STRING_PROGRAM_WIN_CLASS_NAME;
VOID STRING_LoadMenus(VOID)
{
- WCHAR caption[MAX_STRING_LEN];
- HMENU hMainMenu;
-
- /* Set frame caption */
- LoadStringW(Globals.hInstance, IDS_PROGRAM_MANAGER, caption, sizeof(caption));
- SetWindowTextW(Globals.hMainWnd, caption);
-
- /* Create menu */
- hMainMenu = LoadMenuW(Globals.hInstance, MAKEINTRESOURCEW(MAIN_MENU));
- Globals.hFileMenu = GetSubMenu(hMainMenu, 0);
- Globals.hOptionMenu = GetSubMenu(hMainMenu, 1);
- Globals.hWindowsMenu = GetSubMenu(hMainMenu, 2);
- Globals.hLanguageMenu = GetSubMenu(hMainMenu, 3);
-
- if (Globals.hMDIWnd)
- {
- SendMessageW(Globals.hMDIWnd, WM_MDISETMENU,
- (WPARAM)hMainMenu, (LPARAM)Globals.hWindowsMenu);
- }
- else
- {
- SetMenu(Globals.hMainWnd, hMainMenu);
- }
-
- /* Destroy old menu */
- if (Globals.hMainMenu) DestroyMenu(Globals.hMainMenu);
- Globals.hMainMenu = hMainMenu;
+#ifdef __REACTOS__
+ WCHAR caption[MAX_STRING_LEN];
+#else
+ CHAR caption[MAX_STRING_LEN];
+#endif
+ HMENU hMainMenu;
+
+ /* Set frame caption */
+#ifdef __REACTOS__
+ LoadStringW(Globals.hInstance, IDS_PROGRAM_MANAGER, caption, sizeof(caption));
+ SetWindowTextW(Globals.hMainWnd, caption);
+#else
+ LoadStringA(Globals.hInstance, IDS_PROGRAM_MANAGER, caption, sizeof(caption));
+ SetWindowTextA(Globals.hMainWnd, caption);
+#endif
+
+ /* Create menu */
+ hMainMenu = LoadMenuW(Globals.hInstance, MAKEINTRESOURCEW(MAIN_MENU));
+ Globals.hFileMenu = GetSubMenu(hMainMenu, 0);
+ Globals.hOptionMenu = GetSubMenu(hMainMenu, 1);
+ Globals.hWindowsMenu = GetSubMenu(hMainMenu, 2);
+ Globals.hLanguageMenu = GetSubMenu(hMainMenu, 3);
+
+ if (Globals.hMDIWnd)
+ SendMessageW(Globals.hMDIWnd, WM_MDISETMENU,
+ (WPARAM) hMainMenu,
+ (LPARAM) Globals.hWindowsMenu);
+ else SetMenu(Globals.hMainWnd, hMainMenu);
+
+ /* Destroy old menu */
+ if (Globals.hMainMenu) DestroyMenu(Globals.hMainMenu);
+ Globals.hMainMenu = hMainMenu;
}
reactos/base/applications/winhlp32 # Synced to WineStaging-1.9.4
reactos/base/applications/wordpad # Synced to WineStaging-1.7.55
reactos/base/services/rpcss # Synced to WineStaging-1.7.55
+reactos/base/shell/progman # Synced to WineStaging-1.9.4
reactos/base/system/expand # Synced to WineStaging-1.7.55
reactos/base/system/msiexec # Synced to WineStaging-1.9.4
reactos/modules/rosapps/winfile # Autosync