src/osd/winui/picker.c
| r7401 | r7402 | |
| 340 | 340 | LVCOLUMN col; |
| 341 | 341 | struct PickerInfo *pPickerInfo; |
| 342 | 342 | HRESULT res; |
| 343 | BOOL b_res; |
| 343 | 344 | |
| 344 | 345 | pPickerInfo = GetPickerInfo(hWnd); |
| 345 | 346 | |
| r7401 | r7402 | |
| 372 | 373 | { |
| 373 | 374 | nColumn = Picker_GetRealColumnFromViewColumn(hWnd, i++); |
| 374 | 375 | widths[nColumn] = col.cx; |
| 375 | | res = ListView_DeleteColumn(hWnd, 0); |
| 376 | b_res = ListView_DeleteColumn(hWnd, 0); |
| 376 | 377 | } |
| 377 | 378 | |
| 378 | 379 | pPickerInfo->pCallbacks->pfnSetColumnWidths(widths); |
| r7401 | r7402 | |
| 413 | 414 | } |
| 414 | 415 | |
| 415 | 416 | if (GetListFontColor() == RGB(255, 255, 255)) |
| 416 | | res = ListView_SetTextColor(hWnd, RGB(240, 240, 240)); |
| 417 | b_res = ListView_SetTextColor(hWnd, RGB(240, 240, 240)); |
| 417 | 418 | else |
| 418 | | res = ListView_SetTextColor(hWnd, GetListFontColor()); |
| 419 | b_res = ListView_SetTextColor(hWnd, GetListFontColor()); |
| 419 | 420 | |
| 420 | 421 | done: |
| 421 | 422 | if (widths) |
| r7401 | r7402 | |
| 676 | 677 | { |
| 677 | 678 | int nItem; |
| 678 | 679 | LV_ITEM lvi; |
| 679 | | HRESULT res; |
| 680 | BOOL res; |
| 680 | 681 | |
| 681 | 682 | nItem = ListView_GetNextItem(hWnd, -1, LVIS_SELECTED | LVIS_FOCUSED); |
| 682 | 683 | if (nItem < 0) |
| r7401 | r7402 | |
| 693 | 694 | |
| 694 | 695 | void Picker_SetSelectedPick(HWND hWnd, int nIndex) |
| 695 | 696 | { |
| 696 | | HRESULT res; |
| 697 | BOOL res; |
| 697 | 698 | |
| 698 | 699 | if (nIndex < 0) |
| 699 | 700 | nIndex = 0; |
| r7401 | r7402 | |
| 759 | 760 | HWND hwndHeader; |
| 760 | 761 | HD_ITEM hdi; |
| 761 | 762 | int i, nViewColumn; |
| 762 | | HRESULT res; |
| 763 | BOOL res; |
| 763 | 764 | |
| 764 | 765 | pPickerInfo = GetPickerInfo(hwndPicker); |
| 765 | 766 | |
| r7401 | r7402 | |
| 929 | 930 | struct PickerInfo *pPickerInfo; |
| 930 | 931 | struct CompareProcParams params; |
| 931 | 932 | int nItem; |
| 932 | | HRESULT res; |
| 933 | BOOL res; |
| 933 | 934 | |
| 934 | 935 | pPickerInfo = GetPickerInfo(hwndPicker); |
| 935 | 936 | |
| r7401 | r7402 | |
| 957 | 958 | struct CompareProcParams params; |
| 958 | 959 | int nCompareResult; |
| 959 | 960 | LVITEM lvi; |
| 960 | | HRESULT res; |
| 961 | BOOL res; |
| 961 | 962 | |
| 962 | 963 | pPickerInfo = GetPickerInfo(hwndPicker); |
| 963 | 964 | |
| r7401 | r7402 | |
| 1244 | 1245 | int nParent; |
| 1245 | 1246 | HBITMAP hBackground = GetBackgroundBitmap(); |
| 1246 | 1247 | MYBITMAPINFO *pbmDesc = GetBackgroundInfo(); |
| 1247 | | HRESULT res; |
| 1248 | BOOL res; |
| 1248 | 1249 | |
| 1249 | 1250 | pPickerInfo = GetPickerInfo(hWnd); |
| 1250 | 1251 | |
| r7401 | r7402 | |
| 1618 | 1619 | int *tmpOrder; |
| 1619 | 1620 | int nColumnMax, i; |
| 1620 | 1621 | BOOL bSuccess = FALSE; |
| 1621 | | HRESULT res; |
| 1622 | BOOL res; |
| 1622 | 1623 | |
| 1623 | 1624 | pPickerInfo = GetPickerInfo(hwndPicker); |
| 1624 | 1625 | |
src/osd/winui/winui.c
| r7401 | r7402 | |
| 1062 | 1062 | int tmpOrder[COLUMN_MAX]; |
| 1063 | 1063 | int nColumnMax; |
| 1064 | 1064 | int i; |
| 1065 | | HRESULT res; |
| 1065 | BOOL res; |
| 1066 | 1066 | |
| 1067 | 1067 | nColumnMax = Picker_GetNumColumns(hwndList); |
| 1068 | 1068 | |
| r7401 | r7402 | |
| 2168 | 2168 | MINMAXINFO *mminfo; |
| 2169 | 2169 | int i; |
| 2170 | 2170 | TCHAR szClass[128]; |
| 2171 | | HRESULT res; |
| 2171 | BOOL res; |
| 2172 | 2172 | |
| 2173 | 2173 | switch (message) |
| 2174 | 2174 | { |
| r7401 | r7402 | |
| 2561 | 2561 | LV_FINDINFO lvfi; |
| 2562 | 2562 | int nCount = ListView_GetItemCount(hwndList); |
| 2563 | 2563 | BOOL changed = FALSE; |
| 2564 | | HRESULT res; |
| 2564 | BOOL res; |
| 2565 | 2565 | |
| 2566 | 2566 | MSG msg; |
| 2567 | 2567 | for(i=0; i<nCount;i++) |
| r7401 | r7402 | |
| 2636 | 2636 | LV_FINDINFO lvfi; |
| 2637 | 2637 | int i; |
| 2638 | 2638 | BOOL changed = FALSE; |
| 2639 | | HRESULT res; |
| 2639 | BOOL res; |
| 2640 | 2640 | |
| 2641 | 2641 | if (game_index == 0) |
| 2642 | 2642 | ProgressBarShow(); |
| r7401 | r7402 | |
| 3842 | 3842 | BOOL no_selection = FALSE; |
| 3843 | 3843 | LPTREEFOLDER lpFolder = GetCurrentFolder(); |
| 3844 | 3844 | HRESULT res; |
| 3845 | BOOL b_res; |
| 3845 | 3846 | |
| 3846 | 3847 | if (!lpFolder) |
| 3847 | 3848 | { |
| r7401 | r7402 | |
| 3858 | 3859 | |
| 3859 | 3860 | SetWindowRedraw(hwndList,FALSE); |
| 3860 | 3861 | |
| 3861 | | res = ListView_DeleteAllItems(hwndList); |
| 3862 | b_res = ListView_DeleteAllItems(hwndList); |
| 3862 | 3863 | |
| 3863 | 3864 | // hint to have it allocate it all at once |
| 3864 | 3865 | ListView_SetItemCount(hwndList,driver_list_get_count(drivers)); |
| r7401 | r7402 | |
| 3991 | 3992 | TCHAR szClass[128]; |
| 3992 | 3993 | HWND hWnd; |
| 3993 | 3994 | HRESULT res; |
| 3995 | BOOL b_res; |
| 3994 | 3996 | |
| 3995 | 3997 | GetListFont(&font); |
| 3996 | 3998 | font.lfQuality = DEFAULT_QUALITY; |
| r7401 | r7402 | |
| 4026 | 4028 | { |
| 4027 | 4029 | if (!_tcscmp(szClass, TEXT("SysListView32"))) |
| 4028 | 4030 | { |
| 4029 | | res = ListView_SetTextColor(hWnd, textColor); |
| 4031 | b_res = ListView_SetTextColor(hWnd, textColor); |
| 4030 | 4032 | } |
| 4031 | 4033 | else if (!_tcscmp(szClass, TEXT("SysTreeView32"))) |
| 4032 | 4034 | { |
| r7401 | r7402 | |
| 4075 | 4077 | int i; |
| 4076 | 4078 | LPTREEFOLDER folder; |
| 4077 | 4079 | char* t_szFile; |
| 4078 | | HRESULT res; |
| 4080 | BOOL res; |
| 4079 | 4081 | |
| 4080 | 4082 | switch (id) |
| 4081 | 4083 | { |
| r7401 | r7402 | |
| 4961 | 4963 | LVBKIMAGE bki; |
| 4962 | 4964 | TCHAR path[MAX_PATH]; |
| 4963 | 4965 | TCHAR* t_bgdir; |
| 4964 | | HRESULT res; |
| 4966 | BOOL res; |
| 4965 | 4967 | |
| 4966 | 4968 | static const struct PickerCallbacks s_gameListCallbacks = |
| 4967 | 4969 | { |
| r7401 | r7402 | |
| 5400 | 5402 | static HICON GetSelectedPickItemIcon() |
| 5401 | 5403 | { |
| 5402 | 5404 | LV_ITEM lvi; |
| 5403 | | HRESULT res; |
| 5405 | BOOL res; |
| 5404 | 5406 | |
| 5405 | 5407 | lvi.iItem = GetSelectedPick(); |
| 5406 | 5408 | lvi.iSubItem = 0; |
| r7401 | r7402 | |
| 6005 | 6007 | static void MamePlayGameWithOptions(int nGame, const play_options *playopts) |
| 6006 | 6008 | { |
| 6007 | 6009 | DWORD dwExitCode; |
| 6008 | | HRESULT res; |
| 6010 | BOOL res; |
| 6009 | 6011 | |
| 6010 | 6012 | #ifdef MESS |
| 6011 | 6013 | if (!MessApproveImageList(hMain, nGame)) |
| r7401 | r7402 | |
| 6072 | 6074 | TCHAR szClass[128]; |
| 6073 | 6075 | HWND hWnd; |
| 6074 | 6076 | HRESULT res; |
| 6077 | BOOL b_res; |
| 6075 | 6078 | |
| 6076 | 6079 | /* WM_SETTINGCHANGE also */ |
| 6077 | 6080 | xtraX = GetSystemMetrics(SM_CXFIXEDFRAME); /* Dialog frame width */ |
| r7401 | r7402 | |
| 6099 | 6102 | { |
| 6100 | 6103 | if (!_tcscmp(szClass, TEXT("SysListView32"))) |
| 6101 | 6104 | { |
| 6102 | | res = ListView_SetBkColor(hWnd, GetSysColor(COLOR_WINDOW)); |
| 6103 | | res = ListView_SetTextColor(hWnd, textColor); |
| 6105 | b_res = ListView_SetBkColor(hWnd, GetSysColor(COLOR_WINDOW)); |
| 6106 | b_res = ListView_SetTextColor(hWnd, textColor); |
| 6104 | 6107 | } |
| 6105 | 6108 | else if (!_tcscmp(szClass, TEXT("SysTreeView32"))) |
| 6106 | 6109 | { |
| r7401 | r7402 | |
| 6208 | 6211 | HMENU hMenu; |
| 6209 | 6212 | TVHITTESTINFO hti; |
| 6210 | 6213 | POINT pt; |
| 6211 | | HRESULT res; |
| 6214 | BOOL res; |
| 6212 | 6215 | |
| 6213 | 6216 | if ((HWND)wParam != GetDlgItem(hWnd, IDC_TREE)) |
| 6214 | 6217 | return FALSE; |
| r7401 | r7402 | |
| 6741 | 6744 | { |
| 6742 | 6745 | LV_ITEM lvi; |
| 6743 | 6746 | POINT pt; |
| 6744 | | HRESULT res; |
| 6747 | BOOL res; |
| 6745 | 6748 | |
| 6746 | 6749 | lvi.iItem = pnmv->iItem; |
| 6747 | 6750 | lvi.mask = LVIF_PARAM; |
| r7401 | r7402 | |
| 6777 | 6780 | { |
| 6778 | 6781 | HTREEITEM htiTarget; |
| 6779 | 6782 | TV_HITTESTINFO tvht; |
| 6780 | | HRESULT res; |
| 6783 | BOOL res; |
| 6781 | 6784 | |
| 6782 | 6785 | POINT pt; |
| 6783 | 6786 | pt.x = p.x; |
| r7401 | r7402 | |
| 6811 | 6814 | HTREEITEM htiTarget; |
| 6812 | 6815 | TV_HITTESTINFO tvht; |
| 6813 | 6816 | TVITEM tvi; |
| 6814 | | HRESULT res; |
| 6817 | BOOL res; |
| 6815 | 6818 | |
| 6816 | 6819 | ReleaseCapture(); |
| 6817 | 6820 | |
| r7401 | r7402 | |
| 6876 | 6879 | { |
| 6877 | 6880 | HTREEITEM htree; |
| 6878 | 6881 | TVITEM tvi; |
| 6879 | | HRESULT res; |
| 6882 | BOOL res; |
| 6883 | |
| 6880 | 6884 | htree = TreeView_GetSelection(hTreeView); |
| 6881 | 6885 | if(htree != NULL) |
| 6882 | 6886 | { |
| r7401 | r7402 | |
| 6894 | 6898 | TVITEM tvi; |
| 6895 | 6899 | HIMAGELIST hSmall_icon; |
| 6896 | 6900 | LPTREEFOLDER folder; |
| 6897 | | HRESULT res; |
| 6901 | BOOL res; |
| 6902 | |
| 6898 | 6903 | htree = TreeView_GetSelection(hTreeView); |
| 6899 | 6904 | |
| 6900 | 6905 | if (htree != NULL) |
| r7401 | r7402 | |
| 6914 | 6919 | /* Updates all currently displayed Items in the List with the latest Data*/ |
| 6915 | 6920 | void UpdateListView(void) |
| 6916 | 6921 | { |
| 6917 | | HRESULT res; |
| 6922 | BOOL res; |
| 6923 | |
| 6918 | 6924 | if( (GetViewMode() == VIEW_GROUPED) || (GetViewMode() == VIEW_DETAILS ) ) |
| 6919 | 6925 | res = ListView_RedrawItems(hwndList,ListView_GetTopIndex(hwndList), |
| 6920 | 6926 | ListView_GetTopIndex(hwndList)+ ListView_GetCountPerPage(hwndList) ); |
src/mess/osd/winui/propertiesms.c
| r7401 | r7402 | |
| 75 | 75 | TCHAR outbuf[MAX_PATH]; |
| 76 | 76 | HWND hList; |
| 77 | 77 | LPTSTR lpIn; |
| 78 | | HRESULT res; |
| 78 | BOOL res; |
| 79 | 79 | |
| 80 | 80 | g_bModifiedSoftwarePaths = TRUE; |
| 81 | 81 | |
| r7401 | r7402 | |
| 120 | 120 | int nSelect; |
| 121 | 121 | int nItem; |
| 122 | 122 | HWND hList = GetDlgItem(hDlg, IDC_DIR_LIST); |
| 123 | | HRESULT res; |
| 123 | BOOL res; |
| 124 | 124 | |
| 125 | 125 | g_bModifiedSoftwarePaths = TRUE; |
| 126 | 126 | |
| r7401 | r7402 | |
| 285 | 285 | TCHAR buffer[2048]; |
| 286 | 286 | char *dir_list; |
| 287 | 287 | int i, pos, driver_index; |
| 288 | | HRESULT res; |
| 288 | BOOL res; |
| 289 | 289 | |
| 290 | 290 | // determine the directory count; note that one item is the "< >" entry |
| 291 | 291 | directory_count = ListView_GetItemCount(control); |
| r7401 | r7402 | |
| 334 | 334 | LV_COLUMN lvc; |
| 335 | 335 | RECT r; |
| 336 | 336 | HRESULT res; |
| 337 | BOOL b_res; |
| 337 | 338 | |
| 338 | 339 | // access the directory list, and convert to TCHARs |
| 339 | 340 | driver_index = PropertiesCurrentGame(dialog); |
| r7401 | r7402 | |
| 343 | 344 | return FALSE; |
| 344 | 345 | |
| 345 | 346 | // delete all items in the list control |
| 346 | | res = ListView_DeleteAllItems(control); |
| 347 | b_res = ListView_DeleteAllItems(control); |
| 347 | 348 | |
| 348 | 349 | // add the column |
| 349 | 350 | GetClientRect(control, &r); |