Esempio n. 1
0
void CellEdit_OnInitDialog (HWND hDlg)
{
   PCELLDBLINE pLine = (PCELLDBLINE)PropSheet_FindTabParam (hDlg);
   if (pLine)
      {
      CELLDBLINEINFO Info;
      CSDB_CrackLine (&Info, pLine->szLine);
      SetDlgItemText (hDlg, IDC_CELL, Info.szCell);
      SetDlgItemText (hDlg, IDC_COMMENT, Info.szComment);

      int iOrder = 0;
      for (pLine = pLine->pNext; pLine; pLine = pLine->pNext)
         {
         CELLDBLINEINFO Info;
         if (!CSDB_CrackLine (&Info, pLine->szLine))
            break;
         if (Info.szCell[0])
            break;

         CellEdit_AddServerEntry (hDlg, pLine, iOrder++);
         }
      }

   // Prepare the columns on the server list
   //
   HWND hList = GetDlgItem (hDlg, IDC_LIST);

   FASTLISTCOLUMN Column;
   Column.dwFlags = FLCF_JUSTIFY_LEFT;
   Column.cxWidth = 200;
   GetString (Column.szText, IDS_SVRCOL_COMMENT);
   FastList_SetColumn (hList, 0, &Column);

   Column.dwFlags = FLCF_JUSTIFY_LEFT;
   Column.cxWidth = 100;
   GetString (Column.szText, IDS_SVRCOL_SERVER);
   FastList_SetColumn (hList, 1, &Column);

   FastList_SetSortFunction (hList, CellEdit_SortFunction);

   // Remove the Context Help [?] thing from the title bar
   //
   DWORD dwStyle = GetWindowLong (GetParent (hDlg), GWL_STYLE);
   dwStyle &= ~DS_CONTEXTHELP;
   SetWindowLong (GetParent (hDlg), GWL_STYLE, dwStyle);

   dwStyle = GetWindowLong (GetParent (hDlg), GWL_EXSTYLE);
   dwStyle &= ~WS_EX_CONTEXTHELP;
   SetWindowLong (GetParent (hDlg), GWL_EXSTYLE, dwStyle);

   // A little cleanup and we're done!
   //
   CellEdit_Enable (hDlg);
   CellEdit_OnSelect (hDlg);
}
Esempio n. 2
0
static void AddColumn(int nWidth, LPCTSTR pszTitle)
{
    static int nCol = 1;
    FASTLISTCOLUMN col;
	
    col.dwFlags = FLCF_JUSTIFY_LEFT;
    col.cxWidth = nWidth;
    lstrcpy(col.szText, pszTitle);
	
    FastList_SetColumn(m_hDriveList, nCol++, &col);
}
Esempio n. 3
0
void AutoMap_OnInitDialog (HWND hDlg)
{
   // Prepare the columns
   HWND hList = GetDlgItem (hDlg, IDC_GLOBAL_DRIVE_LIST);

   FASTLISTCOLUMN Column;
   Column.dwFlags = FLCF_JUSTIFY_LEFT;
   Column.cxWidth = 65;
   GetString (Column.szText, IDS_DRIVE);
   FastList_SetColumn (hList, 0, &Column);

   Column.dwFlags = FLCF_JUSTIFY_LEFT;
   Column.cxWidth = 266;
   GetString (Column.szText, IDS_SUBCOL_PATH);
   FastList_SetColumn (hList, 1, &Column);

	gethostname(szHostName, sizeof(szHostName));

   Config_GetGlobalDriveList(&GlobalDrives);

   ShowDriveList(hDlg, GlobalDrives);
}