Changeset 1548 for trunk/src


Ignore:
Timestamp:
Nov 2, 1999, 8:09:43 PM (26 years ago)
Author:
sandervl
Message:

Port of Wine common dialogs (not all)

Location:
trunk/src/comdlg32
Files:
10 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comdlg32/comdlg32.cpp

    r1419 r1548  
    1 /* $Id: comdlg32.cpp,v 1.15 1999-10-23 17:29:30 cbratschi Exp $ */
     1/* $Id: comdlg32.cpp,v 1.16 1999-11-02 19:09:42 sandervl Exp $ */
    22
    33/*
     
    7676 *****************************************************************************/
    7777
    78 ODINFUNCTION1(BOOL, GetSaveFileNameA,
     78ODINFUNCTION1(BOOL, GetSaveFileNameA32,
    7979              LPOPENFILENAMEA, lpofn)
    8080{
    8181  Win32WindowProc *wndproc;
    8282
     83  if(lpofn->Flags & (OFN_ENABLETEMPLATE|OFN_ENABLETEMPLATEHANDLE)) {
     84        return GetFileDialog95A(lpofn, SAVE_DIALOG);
     85  }
     86
    8387  COMDLG32_CHECKHOOK(lpofn, OFN_ENABLEHOOK, WNDPROC)
    8488
     
    8690}
    8791
    88 
    89 /*****************************************************************************
    90  * Name      :
    91  * Purpose   :
    92  * Parameters:
    93  * Variables :
    94  * Result    :
    95  * Remark    :
    96  * Status    :
    97  *
    98  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
    99  *****************************************************************************/
    100 
    101 ODINFUNCTION1(BOOL, GetOpenFileNameA,
     92/*****************************************************************************
     93 * Name      :
     94 * Purpose   :
     95 * Parameters:
     96 * Variables :
     97 * Result    :
     98 * Remark    :
     99 * Status    :
     100 *
     101 * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
     102 *****************************************************************************/
     103
     104ODINFUNCTION1(BOOL, GetSaveFileNameW32,
     105              LPOPENFILENAMEW, lpofn)
     106{
     107  Win32WindowProc *wndproc;
     108  OPENFILENAMEA   ofn;
     109  char*           szFile;
     110  char*           szFileTitle;
     111  char*           szCustFilter;
     112  BOOL            bResult;
     113
     114  if(lpofn->Flags & (OFN_ENABLETEMPLATE|OFN_ENABLETEMPLATEHANDLE)) {
     115        return GetFileDialog95W(lpofn, SAVE_DIALOG);
     116  }
     117
     118  memcpy(&ofn,          // make binary copy first to save all the fields
     119         lpofn,
     120         sizeof(ofn));
     121
     122    // convert to ASCII string
     123  if ((lpofn->Flags && OFN_ENABLETEMPLATE) &&
     124      (lpofn->lpTemplateName != NULL))
     125    ofn.lpTemplateName = UnicodeToAsciiString((WCHAR*)lpofn->lpTemplateName);
     126  else
     127    ofn.lpTemplateName = NULL;
     128
     129  if (lpofn->lpstrFilter != NULL)
     130    ofn.lpstrFilter = UnicodeToAsciiString((WCHAR*)lpofn->lpstrFilter);
     131
     132  if (lpofn->lpstrInitialDir != NULL)
     133    ofn.lpstrInitialDir = UnicodeToAsciiString((WCHAR*)lpofn->lpstrInitialDir);
     134
     135  if (lpofn->lpstrTitle != NULL)
     136    ofn.lpstrTitle = UnicodeToAsciiString((WCHAR*)lpofn->lpstrTitle);
     137
     138  if (lpofn->lpstrDefExt != NULL)
     139    ofn.lpstrDefExt = UnicodeToAsciiString((WCHAR*)lpofn->lpstrDefExt);
     140
     141  szFile             = (char*)malloc(lpofn->nMaxFile);
     142  szFile[0]          = 0;
     143
     144  if (*lpofn->lpstrFile != 0)
     145    UnicodeToAscii(lpofn->lpstrFile,
     146                   szFile);
     147
     148  if (lpofn->lpstrFileTitle != NULL)
     149  {
     150    szFileTitle        = (char*)malloc(lpofn->nMaxFileTitle);
     151    szFileTitle[0]     = 0;
     152
     153    if (*lpofn->lpstrFileTitle != 0)
     154      UnicodeToAscii(lpofn->lpstrFileTitle,
     155                     szFileTitle);
     156  }
     157  else
     158    szFileTitle = NULL;
     159
     160  if (lpofn->lpstrCustomFilter != NULL)
     161  {
     162    szCustFilter       = (char*)malloc(lpofn->nMaxCustFilter);
     163    szCustFilter[0]    = 0;
     164
     165
     166    if (*lpofn->lpstrCustomFilter != 0)
     167       UnicodeToAscii(lpofn->lpstrCustomFilter,
     168                      szCustFilter);
     169  }
     170  else
     171    szCustFilter = NULL;
     172
     173  ofn.lpstrFile         = szFile;
     174  ofn.lpstrFileTitle    = szFileTitle;
     175  ofn.lpstrCustomFilter = szCustFilter;
     176
     177  COMDLG32_CHECKHOOK((&ofn), OFN_ENABLEHOOK, WNDPROC)
     178
     179  bResult =  O32_GetSaveFileName(&ofn);
     180
     181  if (ofn.lpTemplateName    != NULL) FreeAsciiString((char*)ofn.lpTemplateName);
     182  if (ofn.lpstrFilter       != NULL) FreeAsciiString((char*)ofn.lpstrFilter);
     183  if (ofn.lpstrInitialDir   != NULL) FreeAsciiString((char*)ofn.lpstrInitialDir);
     184  if (ofn.lpstrTitle        != NULL) FreeAsciiString((char*)ofn.lpstrTitle);
     185  if (ofn.lpstrDefExt       != NULL) FreeAsciiString((char*)ofn.lpstrDefExt);
     186
     187  // transform back the result
     188  AsciiToUnicode(ofn.lpstrFile,
     189                 lpofn->lpstrFile);
     190  free(szFile);
     191
     192  if (lpofn->lpstrFileTitle != NULL)
     193  {
     194    AsciiToUnicode(ofn.lpstrFileTitle,
     195                   lpofn->lpstrFileTitle);
     196    free(szFileTitle);
     197  }
     198
     199  if (lpofn->lpstrCustomFilter != NULL)
     200  {
     201    AsciiToUnicode(ofn.lpstrCustomFilter,
     202                   lpofn->lpstrCustomFilter);
     203    free(szCustFilter);
     204  }
     205
     206  // copy over some altered flags
     207  lpofn->nFilterIndex   = ofn.nFilterIndex;
     208  lpofn->Flags          = ofn.Flags;
     209  lpofn->nFileOffset    = ofn.nFileOffset;
     210  lpofn->nFileExtension = ofn.nFileExtension;
     211
     212  return bResult;
     213}
     214
     215/*****************************************************************************
     216 * Name      :
     217 * Purpose   :
     218 * Parameters:
     219 * Variables :
     220 * Result    :
     221 * Remark    :
     222 * Status    :
     223 *
     224 * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
     225 *****************************************************************************/
     226
     227ODINFUNCTION1(BOOL, GetOpenFileNameA32,
    102228              LPOPENFILENAMEA, lpofn)
    103229{
    104230  Win32WindowProc *wndproc;
    105231
     232  if(lpofn->Flags & (OFN_ENABLETEMPLATE|OFN_ENABLETEMPLATEHANDLE)) {
     233        return GetFileDialog95A(lpofn, OPEN_DIALOG);
     234  }
    106235  COMDLG32_CHECKHOOK(lpofn, OFN_ENABLEHOOK, WNDPROC)
    107236
     
    109238}
    110239
    111 
    112 /*****************************************************************************
    113  * Name      :
    114  * Purpose   :
    115  * Parameters:
    116  * Variables :
    117  * Result    :
    118  * Remark    :
    119  * Status    :
    120  *
    121  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
    122  *****************************************************************************/
    123 
    124 ODINFUNCTION3(INT16, GetFileTitleA,
     240/*****************************************************************************
     241 * Name      :
     242 * Purpose   :
     243 * Parameters:
     244 * Variables :
     245 * Result    :
     246 * Remark    :
     247 * Status    :
     248 *
     249 * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
     250 *****************************************************************************/
     251
     252ODINFUNCTION1(BOOL, GetOpenFileNameW32,
     253              LPOPENFILENAMEW, lpofn)
     254{
     255  Win32WindowProc *wndproc;
     256  OPENFILENAMEA   ofn;
     257  char*           szFile;
     258  char*           szFileTitle;
     259  char*           szCustFilter;
     260  BOOL            bResult;
     261
     262  if(lpofn->Flags & (OFN_ENABLETEMPLATE|OFN_ENABLETEMPLATEHANDLE)) {
     263        return GetFileDialog95W(lpofn, OPEN_DIALOG);
     264  }
     265
     266  memcpy(&ofn,          // make binary copy first to save all the fields
     267         lpofn,
     268         sizeof(ofn));
     269
     270    // convert to ASCII string
     271  if ((lpofn->Flags && OFN_ENABLETEMPLATE) &&
     272      (lpofn->lpTemplateName != NULL))
     273    ofn.lpTemplateName = UnicodeToAsciiString((WCHAR*)lpofn->lpTemplateName);
     274  else
     275    ofn.lpTemplateName = NULL;
     276
     277  if (lpofn->lpstrFilter != NULL)
     278    ofn.lpstrFilter = UnicodeToAsciiString((WCHAR*)lpofn->lpstrFilter);
     279
     280  if (lpofn->lpstrInitialDir != NULL)
     281    ofn.lpstrInitialDir = UnicodeToAsciiString((WCHAR*)lpofn->lpstrInitialDir);
     282
     283  if (lpofn->lpstrTitle != NULL)
     284    ofn.lpstrTitle = UnicodeToAsciiString((WCHAR*)lpofn->lpstrTitle);
     285
     286  if (lpofn->lpstrDefExt != NULL)
     287    ofn.lpstrDefExt = UnicodeToAsciiString((WCHAR*)lpofn->lpstrDefExt);
     288
     289  szFile             = (char*)malloc(lpofn->nMaxFile);
     290  szFile[0]          = 0;
     291
     292  if (*lpofn->lpstrFile != 0)
     293    UnicodeToAscii(lpofn->lpstrFile,
     294                   szFile);
     295
     296  if (lpofn->lpstrFileTitle != NULL)
     297  {
     298    szFileTitle        = (char*)malloc(lpofn->nMaxFileTitle);
     299    szFileTitle[0]     = 0;
     300
     301    if (*lpofn->lpstrFileTitle != 0)
     302      UnicodeToAscii(lpofn->lpstrFileTitle,
     303                     szFileTitle);
     304  }
     305  else
     306    szFileTitle = NULL;
     307
     308  if (lpofn->lpstrCustomFilter != NULL)
     309  {
     310    szCustFilter       = (char*)malloc(lpofn->nMaxCustFilter);
     311    szCustFilter[0]    = 0;
     312
     313
     314    if (*lpofn->lpstrCustomFilter != 0)
     315       UnicodeToAscii(lpofn->lpstrCustomFilter,
     316                      szCustFilter);
     317  }
     318  else
     319    szCustFilter = NULL;
     320
     321  ofn.lpstrFile         = szFile;
     322  ofn.lpstrFileTitle    = szFileTitle;
     323  ofn.lpstrCustomFilter = szCustFilter;
     324
     325  COMDLG32_CHECKHOOK((&ofn), OFN_ENABLEHOOK, WNDPROC)
     326
     327  bResult =  O32_GetOpenFileName(&ofn);
     328
     329  if (ofn.lpTemplateName    != NULL) FreeAsciiString((char*)ofn.lpTemplateName);
     330  if (ofn.lpstrFilter       != NULL) FreeAsciiString((char*)ofn.lpstrFilter);
     331  if (ofn.lpstrInitialDir   != NULL) FreeAsciiString((char*)ofn.lpstrInitialDir);
     332  if (ofn.lpstrTitle        != NULL) FreeAsciiString((char*)ofn.lpstrTitle);
     333  if (ofn.lpstrDefExt       != NULL) FreeAsciiString((char*)ofn.lpstrDefExt);
     334
     335  // transform back the result
     336  AsciiToUnicode(ofn.lpstrFile,
     337                 lpofn->lpstrFile);
     338  free(szFile);
     339
     340  if (lpofn->lpstrFileTitle != NULL)
     341  {
     342    AsciiToUnicode(ofn.lpstrFileTitle,
     343                   lpofn->lpstrFileTitle);
     344    free(szFileTitle);
     345  }
     346
     347  if (lpofn->lpstrCustomFilter != NULL)
     348  {
     349    AsciiToUnicode(ofn.lpstrCustomFilter,
     350                   lpofn->lpstrCustomFilter);
     351    free(szCustFilter);
     352  }
     353
     354  // copy over some altered flags
     355  lpofn->nFilterIndex   = ofn.nFilterIndex;
     356  lpofn->Flags          = ofn.Flags;
     357  lpofn->nFileOffset    = ofn.nFileOffset;
     358  lpofn->nFileExtension = ofn.nFileExtension;
     359
     360  return bResult;
     361}
     362
     363/*****************************************************************************
     364 * Name      :
     365 * Purpose   :
     366 * Parameters:
     367 * Variables :
     368 * Result    :
     369 * Remark    :
     370 * Status    :
     371 *
     372 * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
     373 *****************************************************************************/
     374
     375ODINFUNCTION3(INT16, GetFileTitleA32,
    125376              LPCSTR, lpFile,
    126377              LPSTR, lpTitle,
     
    325576 *****************************************************************************/
    326577
    327 ODINFUNCTION0(DWORD, CommDlgExtendedError)
     578ODINFUNCTION0(DWORD, CommDlgExtendedError32)
    328579{
    329580  return O32_CommDlgExtendedError();
     
    343594 *****************************************************************************/
    344595
    345 ODINFUNCTION1(HWND, FindTextA,
     596ODINFUNCTION1(HWND, FindTextA32,
    346597              LPFINDREPLACEA, lpfr)
    347598{
     
    366617 *****************************************************************************/
    367618
    368 ODINFUNCTION1(HWND, FindTextW,
     619ODINFUNCTION1(HWND, FindTextW32,
    369620              LPFINDREPLACEW, lpfr)
    370621{
     
    436687 *****************************************************************************/
    437688
    438 ODINFUNCTION3(INT16, GetFileTitleW,
     689ODINFUNCTION3(INT16, GetFileTitleW32,
    439690              LPCWSTR, lpFile,
    440691              LPWSTR, lpTitle,
     
    458709  return iResult;
    459710}
    460 
    461 
    462 /*****************************************************************************
    463  * Name      :
    464  * Purpose   :
    465  * Parameters:
    466  * Variables :
    467  * Result    :
    468  * Remark    :
    469  * Status    :
    470  *
    471  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
    472  *****************************************************************************/
    473 
    474 ODINFUNCTION1(BOOL, GetOpenFileNameW,
    475               LPOPENFILENAMEW, lpofn)
    476 {
    477   Win32WindowProc *wndproc;
    478   OPENFILENAMEA   ofn;
    479   char*           szFile;
    480   char*           szFileTitle;
    481   char*           szCustFilter;
    482   BOOL            bResult;
    483 
    484   memcpy(&ofn,          // make binary copy first to save all the fields
    485          lpofn,
    486          sizeof(ofn));
    487 
    488     // convert to ASCII string
    489   if ((lpofn->Flags && OFN_ENABLETEMPLATE) &&
    490       (lpofn->lpTemplateName != NULL))
    491     ofn.lpTemplateName = UnicodeToAsciiString((WCHAR*)lpofn->lpTemplateName);
    492   else
    493     ofn.lpTemplateName = NULL;
    494 
    495   if (lpofn->lpstrFilter != NULL)
    496     ofn.lpstrFilter = UnicodeToAsciiString((WCHAR*)lpofn->lpstrFilter);
    497 
    498   if (lpofn->lpstrInitialDir != NULL)
    499     ofn.lpstrInitialDir = UnicodeToAsciiString((WCHAR*)lpofn->lpstrInitialDir);
    500 
    501   if (lpofn->lpstrTitle != NULL)
    502     ofn.lpstrTitle = UnicodeToAsciiString((WCHAR*)lpofn->lpstrTitle);
    503 
    504   if (lpofn->lpstrDefExt != NULL)
    505     ofn.lpstrDefExt = UnicodeToAsciiString((WCHAR*)lpofn->lpstrDefExt);
    506 
    507   szFile             = (char*)malloc(lpofn->nMaxFile);
    508   szFile[0]          = 0;
    509 
    510   if (*lpofn->lpstrFile != 0)
    511     UnicodeToAscii(lpofn->lpstrFile,
    512                    szFile);
    513 
    514   if (lpofn->lpstrFileTitle != NULL)
    515   {
    516     szFileTitle        = (char*)malloc(lpofn->nMaxFileTitle);
    517     szFileTitle[0]     = 0;
    518 
    519     if (*lpofn->lpstrFileTitle != 0)
    520       UnicodeToAscii(lpofn->lpstrFileTitle,
    521                      szFileTitle);
    522   }
    523   else
    524     szFileTitle = NULL;
    525 
    526   if (lpofn->lpstrCustomFilter != NULL)
    527   {
    528     szCustFilter       = (char*)malloc(lpofn->nMaxCustFilter);
    529     szCustFilter[0]    = 0;
    530 
    531 
    532     if (*lpofn->lpstrCustomFilter != 0)
    533        UnicodeToAscii(lpofn->lpstrCustomFilter,
    534                       szCustFilter);
    535   }
    536   else
    537     szCustFilter = NULL;
    538 
    539   ofn.lpstrFile         = szFile;
    540   ofn.lpstrFileTitle    = szFileTitle;
    541   ofn.lpstrCustomFilter = szCustFilter;
    542 
    543   COMDLG32_CHECKHOOK((&ofn), OFN_ENABLEHOOK, WNDPROC)
    544 
    545   bResult =  O32_GetOpenFileName(&ofn);
    546 
    547   if (ofn.lpTemplateName    != NULL) FreeAsciiString((char*)ofn.lpTemplateName);
    548   if (ofn.lpstrFilter       != NULL) FreeAsciiString((char*)ofn.lpstrFilter);
    549   if (ofn.lpstrInitialDir   != NULL) FreeAsciiString((char*)ofn.lpstrInitialDir);
    550   if (ofn.lpstrTitle        != NULL) FreeAsciiString((char*)ofn.lpstrTitle);
    551   if (ofn.lpstrDefExt       != NULL) FreeAsciiString((char*)ofn.lpstrDefExt);
    552 
    553   // transform back the result
    554   AsciiToUnicode(ofn.lpstrFile,
    555                  lpofn->lpstrFile);
    556   free(szFile);
    557 
    558   if (lpofn->lpstrFileTitle != NULL)
    559   {
    560     AsciiToUnicode(ofn.lpstrFileTitle,
    561                    lpofn->lpstrFileTitle);
    562     free(szFileTitle);
    563   }
    564 
    565   if (lpofn->lpstrCustomFilter != NULL)
    566   {
    567     AsciiToUnicode(ofn.lpstrCustomFilter,
    568                    lpofn->lpstrCustomFilter);
    569     free(szCustFilter);
    570   }
    571 
    572   // copy over some altered flags
    573   lpofn->nFilterIndex   = ofn.nFilterIndex;
    574   lpofn->Flags          = ofn.Flags;
    575   lpofn->nFileOffset    = ofn.nFileOffset;
    576   lpofn->nFileExtension = ofn.nFileExtension;
    577 
    578   return bResult;
    579 }
    580 
    581 
    582 /*****************************************************************************
    583  * Name      :
    584  * Purpose   :
    585  * Parameters:
    586  * Variables :
    587  * Result    :
    588  * Remark    :
    589  * Status    :
    590  *
    591  * Author    : Patrick Haller [Tue, 1998/02/10 01:55]
    592  *****************************************************************************/
    593 
    594 ODINFUNCTION1(BOOL, GetSaveFileNameW,
    595               LPOPENFILENAMEW, lpofn)
    596 {
    597   Win32WindowProc *wndproc;
    598   OPENFILENAMEA   ofn;
    599   char*           szFile;
    600   char*           szFileTitle;
    601   char*           szCustFilter;
    602   BOOL            bResult;
    603 
    604   memcpy(&ofn,          // make binary copy first to save all the fields
    605          lpofn,
    606          sizeof(ofn));
    607 
    608     // convert to ASCII string
    609   if ((lpofn->Flags && OFN_ENABLETEMPLATE) &&
    610       (lpofn->lpTemplateName != NULL))
    611     ofn.lpTemplateName = UnicodeToAsciiString((WCHAR*)lpofn->lpTemplateName);
    612   else
    613     ofn.lpTemplateName = NULL;
    614 
    615   if (lpofn->lpstrFilter != NULL)
    616     ofn.lpstrFilter = UnicodeToAsciiString((WCHAR*)lpofn->lpstrFilter);
    617 
    618   if (lpofn->lpstrInitialDir != NULL)
    619     ofn.lpstrInitialDir = UnicodeToAsciiString((WCHAR*)lpofn->lpstrInitialDir);
    620 
    621   if (lpofn->lpstrTitle != NULL)
    622     ofn.lpstrTitle = UnicodeToAsciiString((WCHAR*)lpofn->lpstrTitle);
    623 
    624   if (lpofn->lpstrDefExt != NULL)
    625     ofn.lpstrDefExt = UnicodeToAsciiString((WCHAR*)lpofn->lpstrDefExt);
    626 
    627   szFile             = (char*)malloc(lpofn->nMaxFile);
    628   szFile[0]          = 0;
    629 
    630   if (*lpofn->lpstrFile != 0)
    631     UnicodeToAscii(lpofn->lpstrFile,
    632                    szFile);
    633 
    634   if (lpofn->lpstrFileTitle != NULL)
    635   {
    636     szFileTitle        = (char*)malloc(lpofn->nMaxFileTitle);
    637     szFileTitle[0]     = 0;
    638 
    639     if (*lpofn->lpstrFileTitle != 0)
    640       UnicodeToAscii(lpofn->lpstrFileTitle,
    641                      szFileTitle);
    642   }
    643   else
    644     szFileTitle = NULL;
    645 
    646   if (lpofn->lpstrCustomFilter != NULL)
    647   {
    648     szCustFilter       = (char*)malloc(lpofn->nMaxCustFilter);
    649     szCustFilter[0]    = 0;
    650 
    651 
    652     if (*lpofn->lpstrCustomFilter != 0)
    653        UnicodeToAscii(lpofn->lpstrCustomFilter,
    654                       szCustFilter);
    655   }
    656   else
    657     szCustFilter = NULL;
    658 
    659   ofn.lpstrFile         = szFile;
    660   ofn.lpstrFileTitle    = szFileTitle;
    661   ofn.lpstrCustomFilter = szCustFilter;
    662 
    663   COMDLG32_CHECKHOOK((&ofn), OFN_ENABLEHOOK, WNDPROC)
    664 
    665   bResult =  O32_GetSaveFileName(&ofn);
    666 
    667   if (ofn.lpTemplateName    != NULL) FreeAsciiString((char*)ofn.lpTemplateName);
    668   if (ofn.lpstrFilter       != NULL) FreeAsciiString((char*)ofn.lpstrFilter);
    669   if (ofn.lpstrInitialDir   != NULL) FreeAsciiString((char*)ofn.lpstrInitialDir);
    670   if (ofn.lpstrTitle        != NULL) FreeAsciiString((char*)ofn.lpstrTitle);
    671   if (ofn.lpstrDefExt       != NULL) FreeAsciiString((char*)ofn.lpstrDefExt);
    672 
    673   // transform back the result
    674   AsciiToUnicode(ofn.lpstrFile,
    675                  lpofn->lpstrFile);
    676   free(szFile);
    677 
    678   if (lpofn->lpstrFileTitle != NULL)
    679   {
    680     AsciiToUnicode(ofn.lpstrFileTitle,
    681                    lpofn->lpstrFileTitle);
    682     free(szFileTitle);
    683   }
    684 
    685   if (lpofn->lpstrCustomFilter != NULL)
    686   {
    687     AsciiToUnicode(ofn.lpstrCustomFilter,
    688                    lpofn->lpstrCustomFilter);
    689     free(szCustFilter);
    690   }
    691 
    692   // copy over some altered flags
    693   lpofn->nFilterIndex   = ofn.nFilterIndex;
    694   lpofn->Flags          = ofn.Flags;
    695   lpofn->nFileOffset    = ofn.nFileOffset;
    696   lpofn->nFileExtension = ofn.nFileExtension;
    697 
    698   return bResult;
    699 }
    700 
    701711
    702712/*****************************************************************************
     
    794804 *****************************************************************************/
    795805
    796 ODINFUNCTION1(HWND, ReplaceTextA,
     806ODINFUNCTION1(HWND, ReplaceTextA32,
    797807              LPFINDREPLACEA, lpfr)
    798808{
     
    817827 *****************************************************************************/
    818828
    819 ODINFUNCTION1(HWND, ReplaceTextW,
     829ODINFUNCTION1(HWND, ReplaceTextW32,
    820830              LPFINDREPLACEW, lpfr)
    821831{
  • trunk/src/comdlg32/comdlg32.def

    r97 r1548  
    1 ; $Id: comdlg32.def,v 1.2 1999-06-10 17:07:28 phaller Exp $
     1; $Id: comdlg32.def,v 1.3 1999-11-02 19:09:42 sandervl Exp $
    22
    33;Created by BLAST for IBM's compiler
     
    1010    ChooseFontA                = _ChooseFontA@4              @3
    1111    ChooseFontW                = _ChooseFontW@4              @4
    12     CommDlgExtendedError       = _CommDlgExtendedError@0     @5
     12    CommDlgExtendedError       = _CommDlgExtendedError32@0   @5
    1313    FindTextA                  = _FindTextA@4                @6
    1414    FindTextW                  = _FindTextW@4                @7
    15     GetFileTitleA              = _GetFileTitleA@12           @8
    16     GetFileTitleW              = _GetFileTitleW@12           @9
    17     GetOpenFileNameA           = _GetOpenFileNameA@4         @10
    18     GetOpenFileNameW           = _GetOpenFileNameW@4         @11
    19     GetSaveFileNameA           = _GetSaveFileNameA@4         @12
    20     GetSaveFileNameW           = _GetSaveFileNameW@4         @13
     15    GetFileTitleA              = _GetFileTitleA32@12           @8
     16    GetFileTitleW              = _GetFileTitleW32@12           @9
     17    GetOpenFileNameA           = _GetOpenFileNameA32@4         @10
     18    GetOpenFileNameW           = _GetOpenFileNameW32@4         @11
     19    GetSaveFileNameA           = _GetSaveFileNameA32@4         @12
     20    GetSaveFileNameW           = _GetSaveFileNameW32@4         @13
    2121    PageSetupDlgA              = _PageSetupDlgA@4            @14
    2222    PageSetupDlgW              = _PageSetupDlgW@4            @15
  • trunk/src/comdlg32/initterm.cpp

    r951 r1548  
    1 /* $Id: initterm.cpp,v 1.7 1999-09-15 23:26:06 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.8 1999-11-02 19:09:42 sandervl Exp $ */
    22
    33/*
     
    3939void CDECL _ctordtorInit( void );
    4040void CDECL _ctordtorTerm( void );
     41
     42 //Win32 resource table (produced by wrc)
     43 extern DWORD _Resource_PEResTab;
     44
     45 BOOL WINAPI COMDLG32_DllEntryPoint(HINSTANCE hInstance, DWORD Reason, LPVOID Reserved);
    4146}
    4247
     
    8186         /*******************************************************************/
    8287
    83          if(RegisterLxDll(hModule, 0, 0) == FALSE)
     88         if(RegisterLxDll(hModule, COMDLG32_DllEntryPoint, (PVOID)&_Resource_PEResTab) == FALSE)
    8489                return 0UL;
    8590
  • trunk/src/comdlg32/makefile

    r604 r1548  
    1 # $Id: makefile,v 1.7 1999-08-21 12:29:29 sandervl Exp $
     1# $Id: makefile,v 1.8 1999-11-02 19:09:43 sandervl Exp $
    22
    33#
     
    1010PDWIN32_LIB = ..\..\lib
    1111PDWIN32_BIN = ..\..\bin
     12PDWIN32_TOOLS = ..\..\tools\bin
    1213
    1314
     
    1819CXXFLAGS = $(CXXFLAGS) -I$(PDWIN32_INCLUDE)
    1920
     21RC = $(PDWIN32_TOOLS)\wrc
     22RCFLAGS = -s -I. -I$(CPPMAIN)\include -I$(PDWIN32_INCLUDE) -I$(PDWIN32_INCLUDE)\win
     23
    2024
    2125TARGET = comdlg32
    2226
    23 OBJS =  comdlg32.obj initterm.obj
     27OBJS =  comdlg32.obj initterm.obj resource.obj cdlg32.obj finddlg32.obj filedlg95.obj \
     28        filedlgbrowser.obj filetitle.obj comdlgguid.obj
    2429
    2530all: $(TARGET).dll $(TARGET).lib
     
    3035              $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
    3136              $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/odincrt.lib \
    32               OS2386.LIB $(RTLLIB_O)
     37              $(PDWIN32_LIB)/shell32.lib $(PDWIN32_LIB)/gdi32.lib OS2386.LIB $(RTLLIB_O)
    3338        $(CP) $@ $(PDWIN32_BIN)
    3439
     
    3843        $(CP) $@ $(PDWIN32_LIB)
    3944
     45resource.asm: rsrc.rc
     46    $(RC) $(RCFLAGS) -o resource.asm rsrc.rc
     47
     48resource.obj: resource.asm
     49
    4050comdlg32.obj: comdlg32.cpp $(PDWIN32_INCLUDE)\wndproc.h
    4151initterm.obj: initterm.cpp
    4252
     53cdlg32.obj: cdlg32.cpp cdlg.h
     54finddlg32.obj: finddlg32.cpp cdlg.h
     55filedlg95.obj: filedlg95.cpp filedlgbrowser.h cdlg.h
     56filedlgbrowser.obj: filedlgbrowser.cpp filedlgbrowser.h cdlg.h
     57filetitle.obj: filetitle.cpp cdlg.h
     58comdlgguid.obj: comdlgguid.cpp
     59
    4360clean:
    44         $(RM) *.obj *.lib *.dll *~ *.map *.pch 
     61        $(RM) *.obj *.lib *.dll *.map *.pch     
    4562        $(RM) $(PDWIN32_BIN)\$(TARGET).dll
    4663        $(RM) $(PDWIN32_LIB)\$(TARGET).lib
Note: See TracChangeset for help on using the changeset viewer.