| 1912 | } |
| 1913 | |
| 1914 | bool SearchByString(HWND hwnd, UINT id, int* value, char* buf, iNES_HEADER* header) |
| 1915 | { |
| 1916 | if (buf[0] != ' ' && buf[0] != 0) |
| 1917 | { |
| 1918 | if (id == IDC_MAPPER_COMBO) |
| 1919 | { |
| 1920 | extern BMAPPINGLocal bmap[]; |
| 1921 | for (int i = 0; bmap[i].init; ++i) |
| 1922 | { |
| 1923 | if (!stricmp(buf, bmap[i].name)) |
| 1924 | { |
| 1925 | if (header) |
| 1926 | SendDlgItemMessage(hwnd, id, CB_SETCURSEL, i, 0); |
| 1927 | *value = SendDlgItemMessage(hwnd, id, CB_GETITEMDATA, i, 0); |
| 1928 | return true; |
| 1929 | } |
| 1930 | } |
| 1931 | } |
| 1932 | else |
| 1933 | { |
| 1934 | for (int i = 0; dropDownIdList[i]; ++i) |
| 1935 | { |
| 1936 | if (dropDownIdList[i] == id) |
| 1937 | { |
| 1938 | char** checkList = dropDownList[i]; |
| 1939 | for (int j = 0; checkList[j]; ++j) |
| 1940 | { |
| 1941 | if (!stricmp(buf, checkList[j])) |
| 1942 | { |
| 1943 | if (header) |
| 1944 | SendDlgItemMessage(hwnd, id, CB_SETCURSEL, j, 0); |
| 1945 | *value = SendDlgItemMessage(hwnd, id, CB_GETITEMDATA, j, 0); |
| 1946 | return true; |
| 1947 | } |
| 1948 | } |
| 1949 | break; |
| 1950 | } |
| 1951 | } |
| 1952 | } |
| 1953 | } |
| 1954 | |
| 1955 | return false; |
| 1956 | } |
no outgoing calls
no test coverage detected