
#include "windows.h"
#include "uconvert.h"
#include "install.h"

uconvertIcon  ICON	uconvert.ico





uconvertMenu MENU
BEGIN

    POPUP "&File"
    BEGIN
        MENUITEM "&Open Source File ...",          MID_OPEN
        MENUITEM "&Save Destination As ...",       MID_SAVEAS
//        MENUITEM SEPARATOR
//        MENUITEM "&View Source...",                BID_VIEWSOURCE
//        MENUITEM "Vie&w Destination...",           BID_VIEWDESTINATION
        MENUITEM SEPARATOR
        MENUITEM "E&xit",                          MID_EXIT
    END

    POPUP "&Edit"
    BEGIN
        MENUITEM "&Copy Destination to Clipboard\aCtrl+C", MID_COPYDESTINATION
        MENUITEM "&Paste Clipboard to Source\aCtrl+V",     MID_PASTESOURCE
        MENUITEM SEPARATOR
        MENUITEM "Clear &Source",                  MID_CLEARSOURCE
        MENUITEM "Clear &Destination",             MID_CLEARDESTINATION
    END

    POPUP "&Conversion"
    BEGIN
        MENUITEM "&Convert Now \aF3",                  MID_CONVERTNOW
        MENUITEM SEPARATOR
        MENUITEM "Change &Source Options....",     MID_SOURCEOPT
        MENUITEM "Change &Destination Options....",MID_DESTINATIONOPT
        MENUITEM "Change Con&version Options....", MID_CONVERSIONOPT
        MENUITEM SEPARATOR
        MENUITEM "Swap &byte order in Source",      MID_SWAPSOURCE
        MENUITEM "Swap byte &order in Destination", MID_SWAPDESTINATION
        MENUITEM SEPARATOR
        MENUITEM "&Install new conversion tables ...",  MID_INSTALLTABLES
    END

    POPUP "&Help"
    BEGIN
        MENUITEM "&Contents",                  MID_HELP
        MENUITEM SEPARATOR
        MENUITEM "&About",                     MID_ABOUT
    END
END


/* Support Ctrl+C/V as well as <crtl>+<ins> and <shift>+<ins> */
uconvertAccel ACCELERATORS
BEGIN
  VK_INSERT, MID_COPYDESTINATION , CONTROL, VIRTKEY
  "^C",      MID_COPYDESTINATION
  VK_INSERT, MID_PASTESOURCE, SHIFT  , VIRTKEY
  "^V",      MID_PASTESOURCE
  VK_F3,     MID_CONVERTNOW,    VIRTKEY
  VK_F1,     MID_HELP,          VIRTKEY
  "S",       BID_VIEWSOURCE,      ALT
  "s",       BID_VIEWSOURCE,      ALT
  "D",       BID_VIEWDESTINATION, ALT
  "d",       BID_VIEWDESTINATION, ALT
END





// HACK.  Pick up real Windows About Box from slm.
aboutBox DIALOG 5, 10, 136, 90
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "About uconvert"
BEGIN
    ICON            "uconvertIcon", 101, 8, 20, 18, 20
    LTEXT           "MultiByte <-> WideChar", 103, 40, 25, 95, 8
    LTEXT           "version 1.0", 106, 40, 35, 95, 8
    DEFPUSHBUTTON   "OK", IDOK, 95, 6, 40, 14
    CONTROL         "", 108, "Static", SS_BLACKRECT, 0, 53, 136, 2
    CTEXT           "Microsoft Developer Support",      105, 0, 62, 136, 8
    CTEXT           "Copyright (c) 1992 Microsoft Corporation", 107, 0, 74, 
                    136, 8
END




DataOptionsDlg DIALOG 5, 10, 160, 150
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Replace"
FONT 8, "MS Sans Serif"
BEGIN
    GROUPBOX        "", -1, 15, 6, 130, 78
    AUTORADIOBUTTON "&Unicode",   DID_RBUNICODE, 24, 14, 51, 10
    AUTORADIOBUTTON "&Ansi CodePage",   DID_RBANSICP,    24, 35, 75, 10
    AUTORADIOBUTTON "O&EM CodePage",   DID_RBOEMCP,     24, 50, 75, 10
    AUTORADIOBUTTON "Othe&r CodePage:", DID_RBOTHERCP,   24, 65, 70, 10
    COMBOBOX        DID_CODEPAGELIST, 96, 65, 40, 77, WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST | CBS_SORT

    PUSHBUTTON   "Cancel", IDCANCEL, 15, 120, 60, 18
    DEFPUSHBUTTON   "OK", IDOK,      85, 120, 60, 18
END





ConversionOptionsDlg DIALOG 10, 20, 160, 277
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Conversion Options"
FONT 8, "MS Sans Serif"
BEGIN
    GROUPBOX        "MulitByteToWideChar", -1, 10, 18, 140, 66
    RADIOBUTTON     "MB_PRECOMPOSED",   DID_PRECOMPOSED,   25, 34, 100, 10
    RADIOBUTTON     "MB_COMPOSITE",     DID_COMPOSITE,     25, 48, 100, 10
    AUTOCHECKBOX    "MB_USEGLYPHCHARS", DID_USEGLYPHCHARS, 25, 64, 100, 10

    GROUPBOX        "WideCharToMultiByte", -1, 10, 104, 140, 124
    AUTOCHECKBOX    "WC_COMPOSITECHECK", DID_COMPOSITECHECK, 25, 122, 100, 10
    AUTOCHECKBOX    "WC_DISCARDNS",      DID_DISCARDNS,      25, 142, 100, 10
    AUTOCHECKBOX    "WC_SEPCHARS",       DID_SEPCHARS,       25, 156, 100, 10
    AUTOCHECKBOX    "WC_DEFAULTCHAR",    DID_DEFAULTCHAR,    25, 170, 100, 10

    LTEXT           "&Default Char:", -1, 39, 194, 46, 8
    EDITTEXT        DID_EFDEFAULTCHAR, 88, 193, 21, 12, ES_AUTOHSCROLL
    AUTOCHECKBOX    "Used Default Char", DID_USEDDEFAULTCHAR, 36, 209, 79, 10

    PUSHBUTTON   "Cancel", IDCANCEL, 15, 250, 60, 18
    DEFPUSHBUTTON   "OK", IDOK,      85, 250, 60, 18
END



ShowTextDlg DIALOG  5, 10, 280, 190
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
STYLE WS_THICKFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "View Text"
BEGIN
    LTEXT           "-", DID_NAME,     55, 4, 300, 8
    LTEXT           "-", DID_TYPE, 55, 12, 300, 8
    LTEXT  "Warning: Font character set may not match text character set.", DID_FONT, 55, 20, 300, 8

    DEFPUSHBUTTON   "OK", IDOK, 10, 10, 35, 14
    EDITTEXT        DID_TEXT, 2, 34, 276, 135, ES_AUTOVSCROLL | ES_MULTILINE | ES_READONLY | WS_VSCROLL
END




InstallTableDlg DIALOG 5, 10, 234, 136
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Conversion Tables"
FONT 8, "MS Sans Serif"
BEGIN
    LISTBOX         DID_LISTBOX, 7, 26, 168, 107, LBS_SORT | WS_VSCROLL | WS_TABSTOP
    LTEXT           "Installed Tables:", -1, 5, 9, 80, 8
    DEFPUSHBUTTON   "OK", IDOK, 186, 25, 40, 14
    PUSHBUTTON      "&Add...", BID_ADD, 186, 45, 40, 14
    PUSHBUTTON      "&Remove...", -1, 186, 65, 40, 14, WS_DISABLED
    PUSHBUTTON      "&Help...", -1, 186, 85, 40, 14, WS_DISABLED
END
