============================================================================= DriveBox_GetSelDrive
| 1242 | // DriveBox_GetSelDrive |
| 1243 | // |
| 1244 | BOOL DriveBox_GetSelDrive(HWND hwnd,LPWSTR lpszDrive,int nDrive,BOOL fNoSlash) |
| 1245 | { |
| 1246 | |
| 1247 | COMBOBOXEXITEM cbei; |
| 1248 | LPDC_ITEMDATA lpdcid; |
| 1249 | int i = (int)SendMessage(hwnd,CB_GETCURSEL,0,0); |
| 1250 | |
| 1251 | // CB_ERR means no Selection |
| 1252 | if (i == CB_ERR) |
| 1253 | return FALSE; |
| 1254 | |
| 1255 | // Get DC_ITEMDATA* of selected Item |
| 1256 | cbei.mask = CBEIF_LPARAM; |
| 1257 | cbei.iItem = i; |
| 1258 | SendMessage(hwnd,CBEM_GETITEM,0,(LPARAM)&cbei); |
| 1259 | lpdcid = (LPDC_ITEMDATA)cbei.lParam; |
| 1260 | |
| 1261 | // Get File System Path for Drive |
| 1262 | IL_GetDisplayName(lpdcid->lpsf,lpdcid->pidl,SHGDN_FORPARSING,lpszDrive,nDrive); |
| 1263 | |
| 1264 | // Remove Backslash if required (makes Drive relative!!!) |
| 1265 | if (fNoSlash) |
| 1266 | PathRemoveBackslash(lpszDrive); |
| 1267 | |
| 1268 | return TRUE; |
| 1269 | |
| 1270 | } |
| 1271 | |
| 1272 | |
| 1273 | //============================================================================= |
nothing calls this directly
no test coverage detected