Changeset 1394 for trunk/dll/mainwnd.c


Ignore:
Timestamp:
Feb 5, 2009, 5:17:25 AM (17 years ago)
Author:
Steven Levine
Message:

Ticket 340: Convert GetPString to use STRINGTABLE.

Drop fm3dll.str and mkstr.exe from makefiles and wpi builders

Convert many functions to expect PCSZ arguments.
Correct walk, compare and dirsizes dialog setups to ignore saved dialog size
Drop copyright.c logic from makefile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/mainwnd.c

    r1391 r1394  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2001, 2008 Steven H. Levine
     9  Copyright (c) 2001, 2009 Steven H. Levine
    1010
    1111  11 Jun 02 SHL Drop obsolete xor code
     
    7777  30 Dec 08 GKY Initialize tool bar background color to palegray not black
    7878  03 Jan 09 GKY Check for system that is protectonly to gray out Dos/Win command lines and prevent
    79                 Dos/Win programs from being inserted into the execute dialog with message why.
     79                Dos/Win programs from being inserted into the execute dialog with message why.
    8080  11 Jan 09 GKY Replace font names in the string file with global set at compile in init.c
    8181
     
    942942}
    943943
    944 void BubbleHelp(HWND hwnd, BOOL other, BOOL drive, BOOL above, char *help)
     944void BubbleHelp(HWND hwnd, BOOL other, BOOL drive, BOOL above, PCSZ help)
    945945{
    946946  if (help && *help &&
     
    954954}
    955955
    956 VOID MakeBubble(HWND hwnd, BOOL above, CHAR * help)
     956VOID MakeBubble(HWND hwnd, BOOL above, PCSZ help)
    957957{
    958958  if (!hwnd || !help || !*help)
     
    997997    POINTL aptl[TXTBOX_COUNT], ptl, tptl;
    998998    LONG lxScreen, sx, sy, extra = 0, lyScreen;
    999     char *p, *pp, *wp;
     999    CHAR *p, *pp, *wp;
    10001000    SWP swp;
    10011001
     
    10071007    SetPresParams(hwndBubble, NULL, NULL, NULL, FNT_8HELVETICA);
    10081008    hps = WinGetPS(hwndBubble);
    1009     p = help;
     1009    // 03 Feb 09 SHL fixme to not overwrite?
     1010    p = (PSZ)help;
    10101011    tptl.x = tptl.y = 0;
    10111012    while (p && *p) {
     
    12281229        break;
    12291230      default:
    1230         //fixme to allow user to change presparams 1-10-09 GKY
     1231        //fixme to allow user to change presparams 1-10-09 GKY
    12311232        SetPresParams(hwnd,
    12321233                      &RGBGREY,
     
    13221323        id = (USHORT) WinDlgBox(HWND_DESKTOP, hwnd,
    13231324                                PickToolProc, FM3ModHandle,
    1324                                 PICKBTN_FRAME, GetPString(IDS_HIDETEXT));
     1325                                PICKBTN_FRAME, (PSZ)GetPString(IDS_HIDETEXT));
    13251326      if (id) {
    13261327        tool = find_tool(id);
     
    13481349        id =
    13491350          (USHORT) WinDlgBox(HWND_DESKTOP, hwnd, PickToolProc, FM3ModHandle,
    1350                              PICKBTN_FRAME, GetPString(IDS_DELETETEXT));
     1351                             PICKBTN_FRAME, (PSZ)GetPString(IDS_DELETETEXT));
    13511352      if (id)
    13521353        PostMsg(WinQueryWindow(hwnd, QW_PARENT), UM_SETUP,
     
    13611362        id =
    13621363          (USHORT) WinDlgBox(HWND_DESKTOP, hwnd, PickToolProc, FM3ModHandle,
    1363                              PICKBTN_FRAME, GetPString(IDS_EDITTEXT));
     1364                             PICKBTN_FRAME, (PSZ)GetPString(IDS_EDITTEXT));
    13641365      if (id) {
    13651366        tool = find_tool(id);
     
    22752276            Win_Error2(hwndT, HWND_DESKTOP, pszSrcFile, __LINE__,
    22762277                       IDS_WINCREATEWINDOW);
    2277           else {
    2278             //fixme to allow user to change presparams 1-10-09 GKY
     2278          else {
     2279            //fixme to allow user to change presparams 1-10-09 GKY
    22792280            SetPresParams(hwndB,
    22802281                          &RGBGREY,
     
    24042405    {
    24052406      USHORT id = WinQueryWindowUShort(hwnd, QWS_ID);
    2406       char *s = NULL;
     2407      PCSZ s = NULL;
    24072408
    24082409      if (fOtherHelp) {
     
    26422643      hps = WinBeginPaint(hwnd, (HPS)0, NULL);
    26432644      if (hps) {
    2644         GpiCreateLogColorTable(hps, 0, LCOLF_RGB, 0, 0, NULL);
    2645         if (!WinQueryPresParam(hwnd, PP_BACKGROUNDCOLOR, 0, NULL,
    2646                                sizeof(lColor), &lColor, 0))
    2647           lColor = 0x00CCCCCCL; //Palegray
     2645        GpiCreateLogColorTable(hps, 0, LCOLF_RGB, 0, 0, NULL);
     2646        if (!WinQueryPresParam(hwnd, PP_BACKGROUNDCOLOR, 0, NULL,
     2647                               sizeof(lColor), &lColor, 0))
     2648          lColor = 0x00CCCCCCL; //Palegray
    26482649        WinQueryWindowRect(hwnd, &rcl);
    26492650        WinFillRect(hps, &rcl, lColor);
     
    29232924 */
    29242925
    2925 INT SaveDirCnrState(HWND hwndClient, PSZ pszStateName)
     2926INT SaveDirCnrState(HWND hwndClient, PCSZ pszStateName)
    29262927{
    29272928  HENUM henum;
     
    34263427          if (hwndDir) {
    34273428            hwndC = WinWindowFromID(hwndDir, FID_CLIENT);
    3428             if (hwndC) {
     3429            if (hwndC) {
    34293430              HWND hwndCnr = WinWindowFromID(hwndC, DIR_CNR);
    34303431              if (!hwndPPSave) {
     
    35023503                                   MPFROMLONG(sizeof(CNRINFO)))) {
    35033504                      cnri.flWindowAttr = dcd->flWindowAttr;
    3504                       WinSendMsg(WinWindowFromID(hwndC, DIR_CNR),
    3505                                 CM_SETCNRINFO,
    3506                                 MPFROMP(&cnri),
    3507                                 MPFROMLONG(CMA_FLWINDOWATTR));
     3505                      WinSendMsg(WinWindowFromID(hwndC, DIR_CNR),
     3506                                CM_SETCNRINFO,
     3507                                MPFROMP(&cnri),
     3508                                MPFROMLONG(CMA_FLWINDOWATTR));
    35083509                    }
    35093510                  }
     
    35133514                if (!PostMsg(hwndCnr, UM_SETUP2, NULL, NULL))
    35143515                  WinSendMsg(hwndCnr, UM_SETUP2, NULL, NULL);
    3515               }
     3516              }
    35163517            }
    35173518            fRestored = TRUE;
     
    56255626    else {
    56265627      WinSubclassWindow(WinWindowFromID(hwndFrame, IDM_IDEALSIZE),
    5627                         IdealButtonProc);
     5628                        IdealButtonProc);
    56285629      //fixme to allow user to change presparams 1-10-09 GKY
    56295630      SetPresParams(WinWindowFromID(hwndFrame,
     
    57155716                                    WC_COMBOBOX,
    57165717                                    (PSZ) NULL,
    5717                                     //WS_VISIBLE |
    5718                                     CBS_DROPDOWN,
     5718                                    //WS_VISIBLE |
     5719                                    CBS_DROPDOWN,
    57195720                                    (swp.x +
    57205721                                     WinQuerySysValue(HWND_DESKTOP,
     
    59215922    /* start remaining child windows */
    59225923    if (!fNoSaveState && fSaveState) {
    5923       PSZ pszStatename = GetPString(IDS_SHUTDOWNSTATE);
     5924      PCSZ pszStatename = GetPString(IDS_SHUTDOWNSTATE);
    59245925      PostMsg(MainObjectHwnd, UM_RESTORE, MPFROMP(pszStatename), MPVOID);
    59255926      if (!add_setup(pszStatename))
Note: See TracChangeset for help on using the changeset viewer.