void ShowDlls()
{

  /***************************************************************************/
  /* As the actual dimensions of the dialog box is determined at a later     */
  /* point of time, the display of the dialog is also deferred until that    */
  /* point (INIT_DIALOG in the dialog function of the dialog).               */
  /***************************************************************************/
  ProcessDialog( &Dia_Dll, &Dia_Dll_Choices, TRUE, NULL );
  RemoveDialog( &Dia_Dll );
}
void SetExceptions()
{
  /***************************************************************************/
  /*  - Get the Screen write access.                                         */
  /*  - Display the Exceptions Dialog.                                       */
  /*  - Process the Events in the Exceptions Dialog.                         */
  /*  - Remove the Exceptions Dialog.                                        */
  /*  - Restore the Screen write access.                                     */
  /***************************************************************************/
  GetScrAccess();
  DisplayDialog( &Dia_Excep, TRUE );
  ProcessDialog( &Dia_Excep, &Dia_Excep_Choices, TRUE, NULL );
  RemoveDialog( &Dia_Excep );
  SetScrAccess();
  xSetExceptions(ExceptionMap,sizeof(ExceptionMap) );
}
示例#3
0
bool CRCFile::ProcessRCFile()
{
    int iPos;
    CString strData;
    std::vector<CString> vStrTable;
    for (std::vector<CString>::iterator it=m_vInRCFile.begin(); it != m_vInRCFile.end(); it++)
    {
        if ( (iPos=it->Find(_T(" MENU "))) != -1 )
        {
            // add the line to the output rc with no change
            m_vOutRCFile.push_back(*it);

            UINT uiID = GetResourceID(it->Left(iPos));

            // begin enumerating items
            it++;

            // process the menu
            ProcessMenu(uiID, &it);
        }
        else if ( (iPos=it->Find(_T(" DIALOGEX "))) != -1)
        {
            // add the line to the output rc with no change
            m_vOutRCFile.push_back(*it);

            UINT uiID = GetResourceID(it->Left(iPos));
            // begin processing dialog template
            it++;
            ProcessDialog(uiID, &it);
        }
        else if ( (iPos=it->Find(_T("STRINGTABLE "))) != -1)
        {
            // begin of the string table
            it++;
            ProcessStringTable(0, &it);
        }
        else
            m_vOutRCFile.push_back(*it);
    }

    return true;
}
uint Cua_ActiveProcsMenu( AFILE **fpp )                                 /*701*/
{                                                                       /*701*/
  int     i, rc, MaxSymLen, SymLen, LongSymLen;                    /*811  701*/
  uint    key;                                                          /*701*/
  uchar   *cp, *buf, *SaveBuffer = NULL;                                /*701*/
  DEBFILE *pdf;                                                         /*701*/
  DIALOGCHOICE  *chptr;                                                 /*701*/
  CALLSTACKPARAM ClstkParam;                                            /*701*/
  int     buflen;
  int     ScrollBar;                                                    /*701*/

  for( ;; )                                                             /*701*/
  {                                                                     /*701*/
    chptr = &Dia_Clstk_Choices;                                         /*701*/

    MaxSymLen = VideoCols - 6;                                          /*811*/
    buflen = ( (NActFrames + 1)*(MaxSymLen+2) ) + 1 ;
    cp = buf = Talloc( buflen);                                    /*811  701*/

    LongSymLen = 0;                                                     /*811*/
    SymLen    = 0;                                                      /*811*/
    for( i = (short)NActFrames; --i >= 0;  )                            /*701*/
    {                                                                   /*701*/
     pdf = FindExeOrDllWithAddr( ActFaddrs[i] );                        /*701*/
     if(pdf != NULL )
      FormatProcName( cp, ActFaddrs[i], ActScopes[i], pdf,              /*824*/
                               ActCSAtrs[i], MaxSymLen);                /*824*/
     else
      sprintf(cp,"%08X Invalid Frame Address",ActFaddrs[i]);

     SymLen = strlen(cp);                                               /*824*/
     if( SymLen > MaxSymLen )                                           /*824*/
     {                                                                  /*824*/
      SymLen = MaxSymLen;                                               /*824*/
      cp[SymLen] = '\0';                                                /*824*/
     }                                                                  /*824*/
     if( SymLen > LongSymLen )                                          /*824*/
      LongSymLen = SymLen;                                              /*824*/
     cp += SymLen + 1;                                                  /*824*/
    }                                                                   /*824*/
    /* 906 if terminating check was removed */                          /*701*/
    {                                                                   /*824*/

     pdf = FindExeOrDllWithAddr( GetExecAddr() );                       /*901*/
     if( pdf != NULL )
      FormatProcName( cp, GetExecAddr(), ExecScope, pdf,                /*901*/
                           AppPTB.CSAtr, MaxSymLen);                    /*824*/
     else
      sprintf(cp,"%08X Invalid Frame Address",GetExecAddr() );
     SymLen = strlen(cp);                                               /*824*/
     if( SymLen > MaxSymLen )                                           /*824*/
     {                                                                  /*824*/
      SymLen = MaxSymLen;                                               /*824*/
      cp[SymLen] = '\0';                                                /*824*/
     }                                                                  /*824*/
     if( SymLen > LongSymLen )                                          /*824*/
      LongSymLen = SymLen;                                              /*824*/
    }                                                                   /*824*/

    chptr->entries = NActFrames + 1;
    chptr->labels  = buf;

    if( chptr->entries > 10 )
    {
      chptr->MaxRows = 10;
      Dia_Clstk.length = chptr->MaxRows + 8;
      ScrollBar = TRUE;
    }
    else
    {
      Dia_Clstk.length = chptr->entries + 8;
      chptr->MaxRows = chptr->entries;
      ScrollBar = FALSE;
    }

    /*************************************************************************/
    /* At this point, LongSymLen <= MaxSymLen.                               */
    /*************************************************************************/
    Dia_Clstk.width = LongSymLen + 6;
    if( Dia_Clstk.width < 36 )
      Dia_Clstk.width = 36;
    Dia_Clstk.row = (VideoRows - Dia_Clstk.length) / 2;
    Dia_Clstk.col = (VideoCols - Dia_Clstk.width) / 2;
    Dia_Clstk.Buttons[0].row = Dia_Clstk.row + chptr->MaxRows + 4;
    Dia_Clstk.Buttons[0].col = Dia_Clstk.col + 5;
    Dia_Clstk.Buttons[1].row = Dia_Clstk.row + chptr->MaxRows + 4;
    Dia_Clstk.Buttons[1].col = Dia_Clstk.col + Dia_Clstk.width - 16;
    Dia_Clstk.Buttons[2].row = Dia_Clstk.row + chptr->MaxRows + 5;
    Dia_Clstk.Buttons[2].col = Dia_Clstk.col + 5;
    Dia_Clstk.Buttons[3].row = Dia_Clstk.row + chptr->MaxRows + 5;
    Dia_Clstk.Buttons[3].col = Dia_Clstk.col + Dia_Clstk.width - 16;
    Dia_Clstk.Buttons[4].row = Dia_Clstk.row + chptr->MaxRows + 6;
    Dia_Clstk.Buttons[4].col = Dia_Clstk.col + 5;
    Dia_Clstk.Buttons[5].row = Dia_Clstk.row + chptr->MaxRows + 6;
    Dia_Clstk.Buttons[5].col = Dia_Clstk.col + Dia_Clstk.width - 16;

    if( SaveBuffer )
    {
      RemoveMsgBox( "Unwinding...", SaveBuffer );
      SaveBuffer = NULL;
    }
    DisplayDialog( &Dia_Clstk, ScrollBar );
    rc = 0;
    ClstkParam.rc = &rc;
    ClstkParam.fpp= fpp;
    key = ProcessDialog( &Dia_Clstk, &Dia_Clstk_Choices, ScrollBar,
                         (void *)&ClstkParam );
    RemoveDialog( &Dia_Clstk );

    if( rc != RECIRCULATE )
      return( key );
    else
    {
      SaveBuffer = SayMsgBox4( "Unwinding..." );
      if( key == key_a || key == key_A )
      {
        SetShowAll( TRUE );
        SetActFrames();
        SetShowAll( FALSE );
      }
      else
      {
        SetActFrames();
      }
    }
  }
}