Changeset 1498 for trunk/dll/mainwnd.c


Ignore:
Timestamp:
Jan 18, 2010, 1:57:01 AM (16 years ago)
Author:
Gregg Young
Message:

Changes to get FM2 to compile with the latest watcom 1.9 beta (mostly type casts of CHAR CONSTANT * to CHAR *). Changes to get the environment settings working everywhere again (broken by the change that moved commands to the INI); Added an environment size variable (set to 2048 which was the largest I found hard coded). Still need to find everywhere the environment size is set and use this variable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/mainwnd.c

    r1497 r1498  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2001, 2009 Steven H. Levine
     9  Copyright (c) 2001, 2010 Steven H. Levine
    1010
    1111  11 Jun 02 SHL Drop obsolete xor code
     
    104104                aren't user settable; realappname should be used for setting applicable to
    105105                one or more miniapp but not to FM/2
     106  17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *.
    106107
    107108***********************************************************************/
     
    390391                       MainObjectWndProc, 0, sizeof(PVOID));
    391392      MainObjectHwnd = WinCreateWindow(HWND_OBJECT,
    392                                        WC_OBJECTWINDOW,
     393                                       (CHAR *) WC_OBJECTWINDOW,
    393394                                       (PSZ) NULL,
    394395                                       0,
     
    852853          switch (id) {
    853854          case MAIN_CMDLIST:
    854             WinSetWindowText(hwndStatus2, GetPString(IDS_CMDLISTHELP));
     855            WinSetWindowText(hwndStatus2, (CHAR *) GetPString(IDS_CMDLISTHELP));
    855856            break;
    856857          case MAIN_SETUPLIST:
    857             WinSetWindowText(hwndStatus2, GetPString(IDS_SETUPLISTHELP));
     858            WinSetWindowText(hwndStatus2, (CHAR *) GetPString(IDS_SETUPLISTHELP));
    858859            break;
    859860          case MAIN_USERLIST:
    860             WinSetWindowText(hwndStatus2, GetPString(IDS_USERLISTHELP));
     861            WinSetWindowText(hwndStatus2, (CHAR *) GetPString(IDS_USERLISTHELP));
    861862            break;
    862863          case MAIN_DRIVELIST:
    863             WinSetWindowText(hwndStatus2, GetPString(IDS_DRIVELISTHELP));
     864            WinSetWindowText(hwndStatus2, (CHAR *) GetPString(IDS_DRIVELISTHELP));
    864865            break;
    865866          case MAIN_BUTTONLIST:
    866             WinSetWindowText(hwndStatus2, GetPString(IDS_BUTTONLISTHELP));
     867            WinSetWindowText(hwndStatus2, (CHAR *) GetPString(IDS_BUTTONLISTHELP));
    867868            break;
    868869          default:
     
    10021003
    10031004  hwndBubble = WinCreateWindow(HWND_DESKTOP,
    1004                                WC_BUBBLE,
    1005                                help,
     1005                               (CHAR *) WC_BUBBLE,
     1006                               (CHAR *) help,
    10061007                               WS_CLIPSIBLINGS | SS_TEXT |
    10071008                               DT_CENTER | DT_VCENTER,
     
    14711472                                     0);        /* Index to DRAGITEM */
    14721473        if (DrgVerifyRMF(pDItem,        /* Check valid rendering */
    1473                          DRM_OS2FILE,   /* mechanisms and data */
     1474                         (CHAR *) DRM_OS2FILE,   /* mechanisms and data */
    14741475                         NULL)) {       /* formats */
    14751476          if (!(tool->flags & T_EMPHASIZED)) {
     
    15721573      if (!(tool->flags & T_MYICON)) {
    15731574        hwndTool = WinCreateWindow(hwndT,
    1574                                    WC_TOOLBUTTONS,
     1575                                   (CHAR *) WC_TOOLBUTTONS,
    15751576                                   s,
    15761577                                   BS_NOPOINTERFOCUS |
     
    15911592          btc.hImage = hbm;
    15921593          hwndTool = WinCreateWindow(hwndT,
    1593                                      WC_TOOLBUTTONS,
     1594                                     (CHAR *) WC_TOOLBUTTONS,
    15941595                                     NullStr,
    15951596                                     BS_NOPOINTERFOCUS |
     
    16091610    if (!hwndTool) {
    16101611      hwndTool = WinCreateWindow(hwndT,
    1611                                  WC_TOOLBUTTONS,
     1612                                 (CHAR *) WC_TOOLBUTTONS,
    16121613                                 (!tool->text && tool->id >= IDM_COMMANDSTART
    16131614                                  && tool->id <
     
    16251626    if (fToolTitles && !fTextTools) {
    16261627      hwndTool = WinCreateWindow(hwndT,
    1627                                  WC_STATIC,
     1628                                 (CHAR *) WC_STATIC,
    16281629                                 tool->text,
    16291630                                 SS_TEXT | DT_LEFT | DT_VCENTER,
     
    16511652
    16521653  hwndTool = WinCreateWindow(hwndT,
    1653                              WC_BUTTON,
     1654                             (CHAR *) WC_BUTTON,
    16541655                             "#6010",
    16551656                             BS_NOPOINTERFOCUS |
     
    16631664              PCSZ_WINCREATEWINDOW);
    16641665  hwndTool =
    1665     WinCreateWindow(hwndT, WC_BUTTON, "#6011",
     1666    WinCreateWindow(hwndT, (CHAR *) WC_BUTTON, "#6011",
    16661667                    BS_NOPOINTERFOCUS | BS_BITMAP | BS_PUSHBUTTON, 1, 4, 14,
    16671668                    13, hwndT, HWND_TOP, IDM_TOOLRIGHT, NULL, NULL);
     
    23552356      if ((ulDriveMap & (1L << x)) && !(driveflags[x] & DRIVE_IGNORE)) {
    23562357        hwndB = WinCreateWindow(hwndT,
    2357                                 WC_DRIVEBUTTONS,
     2358                                (CHAR *) WC_DRIVEBUTTONS,
    23582359                                0,
    23592360                                BS_NOPOINTERFOCUS | BS_USERBUTTON,
     
    23722373    }                                   // for
    23732374    hwndB = WinCreateWindow(hwndT,
    2374                             WC_DRIVEBUTTONS,
     2375                            (CHAR *) WC_DRIVEBUTTONS,
    23752376                            "#7001",
    23762377                            BS_NOPOINTERFOCUS | BS_BITMAP | BS_PUSHBUTTON,
     
    23842385              PCSZ_WINCREATEWINDOW);
    23852386  hwndB = WinCreateWindow(hwndT,
    2386                           WC_DRIVEBUTTONS,
     2387                          (CHAR *) WC_DRIVEBUTTONS,
    23872388                          "#7000",
    23882389                          BS_NOPOINTERFOCUS | BS_BITMAP | BS_PUSHBUTTON,
     
    26222623        WinQueryWindowPos(hwnd, &swp);
    26232624        hwndB = WinCreateWindow(hwnd,
    2624                                 WC_BUTTON,
     2625                                (CHAR *) WC_BUTTON,
    26252626                                "+",
    26262627                                WS_VISIBLE | BS_PUSHBUTTON |
     
    26352636                    PCSZ_WINCREATEWINDOW);
    26362637        hwndE = WinCreateWindow(hwnd,
    2637                                 WC_ENTRYFIELD,
     2638                                (CHAR *) WC_ENTRYFIELD,
    26382639                                NULL,
    26392640                                WS_VISIBLE | ES_AUTOSCROLL,
     
    26552656          WinSetWindowText(hwndE, lastcmd);
    26562657        else
    2657           WinSetWindowText(hwndE, GetPString(IDS_HELPCMDTEXT));
     2658          WinSetWindowText(hwndE, (CHAR *) GetPString(IDS_HELPCMDTEXT));
    26582659        oldproce = WinSubclassWindow(hwndE, (PFNWP) CommandLineProc);
    26592660        if (oldproce)
     
    30563057  if (*lasttoolbar) {
    30573058    sprintf(szKey, "%sToolbar", szPrefix);
    3058     PrfWriteProfileString(fmprof, FM3Str, szKey, lasttoolbar);
     3059    PrfWriteProfileString(fmprof, (CHAR *) (CHAR *) FM3Str, szKey, lasttoolbar);
    30593060  }
    30603061
    30613062  if (!fIsShutDownState) {
    30623063    sprintf(szKey, "%sTargetDir", szPrefix);
    3063     PrfWriteProfileString(fmprof, FM3Str, szKey, targetdir);
     3064    PrfWriteProfileString(fmprof, (CHAR *) FM3Str, szKey, targetdir);
    30643065    sprintf(szKey, "%sVersion", szPrefix);
    3065     PrfWriteProfileString(fmprof, FM3Str, szKey, "3.16");
     3066    PrfWriteProfileString(fmprof, (CHAR *) FM3Str, szKey, "3.16");
    30663067  }
    30673068
     
    30873088            eos = &szKey[strlen(szKey)];
    30883089            strcpy(eos, "Pos");
    3089             PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & swp,
     3090            PrfWriteProfileData(fmprof, (CHAR *) FM3Str, szKey, (PVOID) & swp,
    30903091                                sizeof(SWP));
    30913092            dcd = WinQueryWindowPtr(WinWindowFromID(hwndC, DIR_CNR), QWL_USER);
    30923093            if (dcd) {
    30933094              strcpy(eos, "Sort");
    3094               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->sortFlags,
     3095              PrfWriteProfileData(fmprof, (CHAR *) FM3Str, szKey, (PVOID) & dcd->sortFlags,
    30953096                                  sizeof(INT));
    30963097              strcpy(eos, "Filter");
    3097               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->mask,
     3098              PrfWriteProfileData(fmprof, (CHAR *) FM3Str, szKey, (PVOID) & dcd->mask,
    30983099                                  sizeof(MASK));
    30993100              strcpy(eos, "View");
     
    31143115                  flWindowAttr |= CV_NAME;
    31153116              }
    3116               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) &flWindowAttr,
     3117              PrfWriteProfileData(fmprof, (CHAR *) FM3Str, szKey, (PVOID) &flWindowAttr,
    31173118                                  sizeof(ULONG));
    31183119              WriteDetailsSwitches(szKeyBase, &dcd->ds, TRUE);
     
    31203121            }
    31213122            strcpy(eos, "Dir");
    3122             PrfWriteProfileString(fmprof, FM3Str, szKey, szDir);
     3123            PrfWriteProfileString(fmprof, (CHAR *) FM3Str, szKey, szDir);
    31233124            numsaves++;
    31243125          }
     
    31303131
    31313132  sprintf(szKey, "%sNumDirsLastTime", szPrefix);
    3132   if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &previous_numsaves, &ulTemp)) {
     3133  if (PrfQueryProfileData(fmprof, (CHAR *) FM3Str, szKey, (PVOID) &previous_numsaves, &ulTemp)) {
    31333134    ULONG size = 0;
    31343135
    31353136    sprintf(szKey, "%sVersion", szPrefix);
    3136     PrfQueryProfileSize(fmprof, FM3Str, szKey, &size);
     3137    PrfQueryProfileSize(fmprof, (CHAR *) FM3Str, szKey, &size);
    31373138    if (!size && fSaveState) {
    31383139      for (ulTemp = 0; ulTemp < previous_numsaves; ulTemp++)
    31393140        RemoveOldCnrSwitches(szPrefix, ulTemp);
    31403141       sprintf(szKey, "%sVersion", szPrefix);
    3141        PrfWriteProfileString(fmprof, FM3Str, szKey, "3.16");
     3142       PrfWriteProfileString(fmprof, (CHAR *) FM3Str, szKey, "3.16");
    31423143      }
    31433144    for (ulTemp = numsaves; ulTemp < previous_numsaves; ulTemp++) {
     
    31483149  sprintf(szKey, "%sNumDirsLastTime", szPrefix);
    31493150  if (numsaves) {
    3150     PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) &numsaves, sizeof(ULONG));
     3151    PrfWriteProfileData(fmprof, (CHAR *) FM3Str, szKey, (PVOID) &numsaves, sizeof(ULONG));
    31513152    WinQueryWindowPos(WinQueryWindow(hwndClient, QW_PARENT), &swp);
    31523153    sprintf(szKey, "%sMySizeLastTime", szPrefix);
    3153     PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) &swp, sizeof(SWP));
     3154    PrfWriteProfileData(fmprof, (CHAR *) FM3Str, szKey, (PVOID) &swp, sizeof(SWP));
    31543155    if (WinQueryWindowPos(hwndTree, &swp)) {
    31553156      sprintf(szKey, "%sLastTreePos", szPrefix);
    3156       PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) &swp, sizeof(SWP));
     3157      PrfWriteProfileData(fmprof, (CHAR *) FM3Str, szKey, (PVOID) &swp, sizeof(SWP));
    31573158    }
    31583159  }
    31593160  else if (fIsShutDownState) {
    3160     PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) &numsaves, sizeof(ULONG));
     3161    PrfWriteProfileData(fmprof, (CHAR *) FM3Str, szKey, (PVOID) &numsaves, sizeof(ULONG));
    31613162  }
    31623163  return numsaves;
     
    32393240    if (fToolsChanged)
    32403241      save_tools(NULL);
    3241     PrfQueryProfileString(fmprof, FM3Str, szKey, NULL, lasttoolbar, sizeof(lasttoolbar));
    3242     PrfWriteProfileString(fmprof, FM3Str, "LastToolbar", lasttoolbar);
     3242    PrfQueryProfileString(fmprof, (CHAR *) FM3Str, szKey, NULL, lasttoolbar, sizeof(lasttoolbar));
     3243    PrfWriteProfileString(fmprof, (CHAR *) FM3Str, "LastToolbar", lasttoolbar);
    32433244    load_tools(NULL);
    32443245    PostMsg(hwndToolback, UM_SETUP2, MPVOID, MPVOID);
     
    32463247  sprintf(szKey, "%sTargetDir", szPrefix);
    32473248  {
    3248     PrfQueryProfileString(fmprof, FM3Str, szKey, NULL, targetdir, sizeof(targetdir));
    3249     PrfWriteProfileString(fmprof, FM3Str, "TargetDir", targetdir);
     3249    PrfQueryProfileString(fmprof, (CHAR *) FM3Str, szKey, NULL, targetdir, sizeof(targetdir));
     3250    PrfWriteProfileString(fmprof, (CHAR *) FM3Str, "TargetDir", targetdir);
    32503251    SetTargetDir(NULLHANDLE, TRUE);
    32513252  }
    32523253  size = sizeof(SWP);
    32533254  sprintf(szKey, "%sMySizeLastTime", szPrefix);
    3254   if (!PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &swpO, &size) ||
     3255  if (!PrfQueryProfileData(fmprof, (CHAR *) FM3Str, szKey, (PVOID) &swpO, &size) ||
    32553256      size != sizeof(SWP) || !swp.cx || !swp.cy)
    32563257  {
     
    32593260  // If restoring internally saved state, forget info
    32603261  if (fDeleteState)
    3261     PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L);
     3262    PrfWriteProfileData(fmprof, (CHAR *) FM3Str, szKey, NULL, 0L);
    32623263  WinQueryWindowPos(WinQueryWindow(hwndClient, QW_PARENT), &swpN);
    32633264  if (swpN.fl & (SWP_MINIMIZE | SWP_HIDE))
     
    32673268  size = sizeof(SWP);
    32683269  sprintf(szKey, "%sLastTreePos", szPrefix);
    3269   if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &swp, &size)) {
     3270  if (PrfQueryProfileData(fmprof, (CHAR *) FM3Str, szKey, (PVOID) &swp, &size)) {
    32703271    if (fDeleteState)
    3271       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L);
     3272      PrfWriteProfileData(fmprof, (CHAR *) FM3Str, szKey, NULL, 0L);
    32723273    swp.hwnd = hwndTree;
    32733274    TransformSwp(&swp, xtrans, ytrans);
     
    32983299  sprintf(szKey, "%sNumDirsLastTime", szPrefix);
    32993300  size = sizeof(ULONG);
    3300   if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &numsaves, &size)) {
     3301  if (PrfQueryProfileData(fmprof, (CHAR *) FM3Str, szKey, (PVOID) &numsaves, &size)) {
    33013302    if (fDeleteState)
    3302       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L);
     3303      PrfWriteProfileData(fmprof, (CHAR *) FM3Str, szKey, NULL, 0L);
    33033304    for (x = numsaves - 1; x >= 0; x--) {
    33043305      CHAR *eos = szKey;
     
    33103311      strcpy(eos, "Pos");
    33113312      size = sizeof(SWP);
    3312       if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &swp, &size)) {
     3313      if (PrfQueryProfileData(fmprof, (CHAR *) FM3Str, szKey, (PVOID) &swp, &size)) {
    33133314        strcpy(eos, "Dir"); ;
    33143315        size = sizeof(szDir);
    3315         if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) szDir, &size)) {
     3316        if (PrfQueryProfileData(fmprof, (CHAR *) FM3Str, szKey, (PVOID) szDir, &size)) {
    33163317          // If restoring shutdown state and drive marked no prescan
    33173318          // bypass window restore
     
    33323333              if (!hwndPPSave) {
    33333334                hwndPPSave = WinCreateWindow(hwndCnr,         // Create a window (used to save default presparams)
    3334                                              WC_CONTAINER,
     3335                                             (CHAR *) WC_CONTAINER,
    33353336                                             NULL,
    33363337                                             CCS_AUTOPOSITION | CCS_MINIICONS |
     
    33623363                strcpy(eos, "Sort");
    33633364                size = sizeof(INT);
    3364                 if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &dcd->sortFlags,
     3365                if (PrfQueryProfileData(fmprof, (CHAR *) FM3Str,        szKey, (PVOID) &dcd->sortFlags,
    33653366                                        &size)) {
    33663367                  if (!dcd->sortFlags)
     
    33693370                size = sizeof(MASK);
    33703371                strcpy(eos, "Filter");
    3371                 if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &dcd->mask, &size)) {
     3372                if (PrfQueryProfileData(fmprof, (CHAR *) FM3Str,        szKey, (PVOID) &dcd->mask, &size)) {
    33723373                  if (*dcd->mask.szMask)
    33733374                    WinSendMsg(WinWindowFromID(hwndC, DIR_CNR),
     
    33783379                if (!noview) {
    33793380                  size = sizeof(ULONG);
    3380                   if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &dcd->flWindowAttr,
     3381                  if (PrfQueryProfileData(fmprof, (CHAR *) FM3Str, szKey, (PVOID) &dcd->flWindowAttr,
    33813382                                          &size)) {
    33823383
     
    46964697                       GetPString(IDS_WARNINGTEXT),
    46974698                       GetPString(IDS_STATEADDFAILEDTEXT), szStateName);      // 15 Apr 07 SHL failed
    4698                 WinSetWindowText(hwndStatelist, GetPString(IDS_STATETEXT));
     4699                WinSetWindowText(hwndStatelist, (CHAR *) GetPString(IDS_STATETEXT));
    46994700              }
    47004701            }
     
    47044705                     GetPString(IDS_WARNINGTEXT),
    47054706                     GetPString(IDS_STATEDATASAVEFAILED));
    4706               WinSetWindowText(hwndStatelist, GetPString(IDS_STATETEXT));
     4707              WinSetWindowText(hwndStatelist, (CHAR *) GetPString(IDS_STATETEXT));
    47074708            }
    47084709          }
     
    47174718            sprintf(szKey, "%s.NumDirsLastTime", szStateName);
    47184719            size = sizeof(ULONG);
    4719             if (!PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &numsaves, &size)) {
     4720            if (!PrfQueryProfileData(fmprof, (CHAR *) FM3Str, szKey, (PVOID) &numsaves, &size)) {
    47204721              saymsg(MB_ENTER | MB_ICONASTERISK, hwnd,
    47214722                     GetPString(IDS_WARNINGTEXT),
     
    47254726              Runtime_Error(pszSrcFile, __LINE__, NULL);
    47264727            else {
    4727               PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L);
     4728              PrfWriteProfileData(fmprof, (CHAR *) FM3Str, szKey, NULL, 0L);
    47284729              for (x = 0; x < numsaves; x++) {
    47294730                sprintf(szKeyBase, "%s.DirCnr.%lu", szStateName, x);
     
    47314732                size = 0;
    47324733                sprintf(szKey, "%sVersion", szStateName);
    4733                 if (PrfQueryProfileSize(fmprof, FM3Str, szKey, &size) && size)
     4734                if (PrfQueryProfileSize(fmprof, (CHAR *) FM3Str, szKey, &size) && size)
    47344735                  RemoveOldCnrSwitches(szStateName, x);
    47354736              }
     
    50525053    else
    50535054      fComments = TRUE;
    5054     PrfWriteProfileData(fmprof, FM3Str, "Comments", &fComments, sizeof(BOOL));
     5055    PrfWriteProfileData(fmprof, (CHAR *) FM3Str, "Comments", &fComments, sizeof(BOOL));
    50555056    WinSetWindowText((fComments) ? hwndAutoview : hwndAutoMLE, NullStr);
    50565057    goto AutoChange;
     
    51245125      PostMsg(WinQueryWindow(hwnd, QW_PARENT), WM_UPDATEFRAME,
    51255126              MPFROMLONG(FCF_MENU), MPVOID);
    5126       PrfWriteProfileData(fmprof, FM3Str, "MenuInvisible",
     5127      PrfWriteProfileData(fmprof, (CHAR *) FM3Str, "MenuInvisible",
    51275128                          &MenuInvisible, sizeof(BOOL));
    51285129    }
     
    53985399            strcpy(lasttoolbar,
    53995400                   quicktool[SHORT1FROMMP(mp1) - IDM_QUICKTOOLSTART - 1]);
    5400             PrfWriteProfileString(fmprof, FM3Str, "LastToolbar", lasttoolbar);
     5401            PrfWriteProfileString(fmprof, (CHAR *) FM3Str, "LastToolbar", lasttoolbar);
    54015402          }
    54025403          PostMsg(hwndToolback, UM_SETUP2, MPVOID, MPVOID);
     
    54645465
    54655466    if (!WinCreateWindow(hwndFrame,
    5466                          WC_BUTTON,
     5467                         (CHAR *) WC_BUTTON,
    54675468                         "I",
    54685469                         WS_VISIBLE | BS_PUSHBUTTON | BS_NOPOINTERFOCUS,
     
    54965497
    54975498    hwndTmp = WinCreateWindow(hwndFrame,
    5498                               WC_BUTTON,
     5499                              (CHAR *) WC_BUTTON,
    54995500                              "#1019",
    55005501                              WS_VISIBLE | BS_PUSHBUTTON | BS_NOPOINTERFOCUS |
     
    55095510
    55105511    hwndTmp = WinCreateWindow(hwndFrame,
    5511                               WC_BUTTON,
     5512                              (CHAR *) WC_BUTTON,
    55125513                              "#3062",
    55135514                              WS_VISIBLE | BS_PUSHBUTTON | BS_NOPOINTERFOCUS |
     
    55225523
    55235524    hwndUserlist = WinCreateWindow(hwndFrame,
    5524                                    WC_COMBOBOX,
     5525                                   (CHAR *) WC_COMBOBOX,
    55255526                                   (PSZ) NULL,
    55265527                                   WS_VISIBLE | CBS_DROPDOWN |
     
    55415542                PCSZ_WINCREATEWINDOW);
    55425543    hwndCmdlist = WinCreateWindow(hwndFrame,
    5543                                   WC_COMBOBOX,
     5544                                  (CHAR *) WC_COMBOBOX,
    55445545                                  (PSZ) NULL,
    55455546                                  WS_VISIBLE | CBS_DROPDOWN |
     
    55595560      Win_Error(hwnd, hwnd, pszSrcFile, __LINE__,
    55605561                PCSZ_WINCREATEWINDOW);
    5561     WinSetWindowText(hwndCmdlist, GetPString(IDS_COMMANDSTEXT));
     5562    WinSetWindowText(hwndCmdlist, (CHAR *) GetPString(IDS_COMMANDSTEXT));
    55625563    hwndStatelist = WinCreateWindow(hwndFrame,
    5563                                     WC_COMBOBOX,
     5564                                    (CHAR *) WC_COMBOBOX,
    55645565                                    (PSZ) NULL,
    55655566                                    WS_VISIBLE | CBS_DROPDOWN |
     
    55815582
    55825583    hwndDrivelist = WinCreateWindow(hwndFrame,
    5583                                     WC_COMBOBOX,
     5584                                    (CHAR *) WC_COMBOBOX,
    55845585                                    (PSZ) NULL,
    55855586                                    //WS_VISIBLE |
     
    56025603                  NULL, NULL, NULL, FNT_10SYSTEMMONOTEXT);
    56035604    hwndButtonlist = WinCreateWindow(hwndFrame,
    5604                                      WC_COMBOBOX,
     5605                                     (CHAR *) WC_COMBOBOX,
    56055606                                     (PSZ) NULL,
    56065607                                     WS_VISIBLE | CBS_DROPDOWN |
     
    57065707
    57075708    size = sizeof(BOOL);
    5708     if (PrfQueryProfileData(fmprof, FM3Str, "MenuInvisible", &temp, &size) &&
     5709    if (PrfQueryProfileData(fmprof, (CHAR *) FM3Str, "MenuInvisible", &temp, &size) &&
    57095710        size && temp)
    57105711      WinSendMsg(hwnd, WM_COMMAND, MPFROM2SHORT(IDM_HIDEMENU, 0), MPVOID);
    57115712    size = sizeof(BOOL);
    5712     if (PrfQueryProfileData(fmprof, FM3Str, "FreeTree", &temp, &size) &&
     5713    if (PrfQueryProfileData(fmprof, (CHAR *) FM3Str, "FreeTree", &temp, &size) &&
    57135714        size && temp)
    57145715      WinSendMsg(hwnd, WM_COMMAND, MPFROM2SHORT(IDM_FREETREE, 0), MPVOID);
    57155716    size = sizeof(BOOL);
    5716     if (PrfQueryProfileData(fmprof, FM3Str, "AutoTile", &temp, &size) &&
     5717    if (PrfQueryProfileData(fmprof, (CHAR *) FM3Str, "AutoTile", &temp, &size) &&
    57175718        size && !temp)
    57185719      WinSendMsg(hwnd, WM_COMMAND, MPFROM2SHORT(IDM_AUTOTILE, 0), MPVOID);
     
    57455746        if (!fSaveState ||
    57465747            !PrfQueryProfileData(fmprof,
    5747                                  FM3Str,
     5748                                 (CHAR *) FM3Str,
    57485749                                 "LastTreePos",
    57495750                                 &swp, &size) || size != sizeof(SWP)) {
     
    57555756          size = sizeof(ratio);
    57565757          if (!PrfQueryProfileData(fmprof,
    5757                                    FM3Str,
     5758                                   (CHAR *) FM3Str,
    57585759                                   "TreeWindowRatio",
    57595760                                   (PVOID) & ratio,
     
    59465947      WinQueryWindowPos(WinQueryWindow(hwnd, QW_PARENT), &swp);
    59475948      if (!(swp.fl & (SWP_HIDE | SWP_MINIMIZE))) {
    5948         WinStoreWindowPos(FM2Str,
     5949        WinStoreWindowPos((CHAR *) FM2Str,
    59495950                          "MainWindowPos", WinQueryWindow(hwnd, QW_PARENT));
    59505951        if (!fNoSaveState && fSaveState)
     
    60846085        priority_bumped();
    60856086      }
    6086       WinSetWindowText(hwndButtonlist, GetPString(IDS_TOOLBARTEXT));
     6087      WinSetWindowText(hwndButtonlist, (CHAR *) GetPString(IDS_TOOLBARTEXT));
    60876088    }
    60886089    return 0;
     
    61916192                 MPFROM2SHORT(0, 0),
    61926193                 MPFROMP(GetPString(IDS_NEWDIRECTORYTEXT)));
    6193       WinSetWindowText(hwndUserlist, GetPString(IDS_COMMONDIRTEXT));
     6194      WinSetWindowText(hwndUserlist, (CHAR *) GetPString(IDS_COMMONDIRTEXT));
    61946195    }
    61956196    return 0;
     
    62656266                  strcpy(path, pFM2SaveDirectory);
    62666267                if (!PMMkDir(hwnd, path, TRUE)) {
    6267                   WinSetWindowText(hwndUL, GetPString(IDS_COMMONDIRTEXT));
     6268                  WinSetWindowText(hwndUL, (CHAR *) GetPString(IDS_COMMONDIRTEXT));
    62686269                  break;
    62696270                }
     
    62956296              load_tools(path);
    62966297              PrfWriteProfileString(fmprof,
    6297                                     FM3Str, "LastToolbar", lasttoolbar);
     6298                                    (CHAR *) FM3Str, "LastToolbar", lasttoolbar);
    62986299              PostMsg(hwndToolback, UM_SETUP2, MPVOID, MPVOID);
    6299               WinSetWindowText(hwndButtonlist, GetPString(IDS_TOOLBARTEXT));
     6300              WinSetWindowText(hwndButtonlist, (CHAR *) GetPString(IDS_TOOLBARTEXT));
    63006301            }
    63016302            else if (SHORT1FROMMP(mp1) == MAIN_SETUPLIST) {
     
    63086309              sprintf(szKey, "%s.NumDirsLastTime", path);       // path is state name
    63096310              if (!PrfQueryProfileData(fmprof,
    6310                                        FM3Str,
     6311                                       (CHAR *) FM3Str,
    63116312                                       szKey,
    63126313                                       (PVOID)&numsaves,
     
    63666367                           MPVOID);
    63676368              }
    6368                 WinSetWindowText(hwndCmdlist, GetPString(IDS_COMMANDSTEXT));
     6369                WinSetWindowText(hwndCmdlist, (CHAR *) GetPString(IDS_COMMANDSTEXT));
    63696370            }
    63706371          }
Note: See TracChangeset for help on using the changeset viewer.