Changeset 377 for trunk/dll/newview.c
- Timestamp:
- Jul 27, 2006, 8:28:31 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/newview.c
r368 r377 1780 1780 { 1781 1781 HWND temphwnd; 1782 1783 temphwnd = WinCreateWindow(WinQueryWindow(hwnd, QW_PARENT), 1782 HWND hwndFrame = WinQueryWindow(hwnd, QW_PARENT); 1783 1784 temphwnd = WinCreateWindow(hwndFrame, 1784 1785 WC_BUTTON, 1785 1786 "<", … … 1790 1791 0, 1791 1792 0, 1792 WinQueryWindow(hwnd, QW_PARENT),1793 hwndFrame, 1793 1794 HWND_TOP, 1794 1795 IDM_PREVBLANKLINE, 1795 1796 NULL, 1796 1797 NULL); 1797 WinSetPresParam(temphwnd, 1798 PP_FONTNAMESIZE, 1799 strlen(GetPString(IDS_8HELVTEXT)) + 1, 1800 (PVOID) GetPString(IDS_8HELVTEXT)); 1801 temphwnd = WinCreateWindow(WinQueryWindow(hwnd, QW_PARENT), 1798 if (!temphwnd) 1799 Win_Error2(hwndFrame,hwnd,pszSrcFile,__LINE__,IDS_WINCREATEWINDOW); 1800 else { 1801 WinSetPresParam(temphwnd, 1802 PP_FONTNAMESIZE, 1803 strlen(GetPString(IDS_8HELVTEXT)) + 1, 1804 (PVOID) GetPString(IDS_8HELVTEXT)); 1805 } 1806 temphwnd = WinCreateWindow(hwndFrame, 1802 1807 WC_BUTTON, 1803 1808 ">", … … 1808 1813 0, 1809 1814 0, 1810 WinQueryWindow(hwnd, QW_PARENT),1815 hwndFrame, 1811 1816 HWND_TOP, 1812 1817 IDM_NEXTBLANKLINE, 1813 1818 NULL, 1814 1819 NULL); 1815 WinSetPresParam(temphwnd, 1816 PP_FONTNAMESIZE, 1817 strlen(GetPString(IDS_8HELVTEXT)) + 1, 1818 (PVOID) GetPString(IDS_8HELVTEXT)); 1820 if (!temphwnd) 1821 Win_Error2(hwndFrame,hwnd,pszSrcFile,__LINE__,IDS_WINCREATEWINDOW); 1822 else { 1823 WinSetPresParam(temphwnd, 1824 PP_FONTNAMESIZE, 1825 strlen(GetPString(IDS_8HELVTEXT)) + 1, 1826 (PVOID)GetPString(IDS_8HELVTEXT)); 1827 } 1819 1828 WinStartTimer(WinQueryAnchorBlock(hwnd), 1820 1829 hwnd, … … 1839 1848 1840 1849 case UM_SETUP: 1841 if (!ad) {1850 if (!ad) 1842 1851 Runtime_Error(pszSrcFile, __LINE__, "no data"); 1843 }1844 1852 else { 1845 1853 CHAR s[CCHMAXPATH + 8]; … … 1848 1856 ad -> hvscroll = WinWindowFromID(ad -> hwndFrame, FID_VERTSCROLL); 1849 1857 ad -> hhscroll = WinWindowFromID(ad -> hwndFrame, FID_HORZSCROLL); 1850 WinSendMsg(ad -> hhscroll, 1851 SBM_SETTHUMBSIZE, 1852 MPFROM2SHORT(1, 1), 1853 MPVOID); 1854 WinSendMsg(ad -> hvscroll, 1855 SBM_SETTHUMBSIZE, 1856 MPFROM2SHORT(1, 1), 1857 MPVOID); 1858 sprintf(s, 1859 "%s: %s", 1860 FM2Str, 1861 ad -> filename); 1862 WinSetWindowText(ad -> hwndFrame, 1863 s); 1858 WinSendMsg(ad -> hhscroll,SBM_SETTHUMBSIZE,MPFROM2SHORT(1, 1),MPVOID); 1859 WinSendMsg(ad -> hvscroll,SBM_SETTHUMBSIZE,MPFROM2SHORT(1, 1),MPVOID); 1860 sprintf(s,"%s: %s",FM2Str,ad -> filename); 1861 WinSetWindowText(ad -> hwndFrame,s); 1864 1862 rc = DosCreateMutexSem(NULL, &ad -> ScanSem, 0L, FALSE); 1865 1863 if (rc) … … 1867 1865 else { 1868 1866 PFNWP oldproc; 1867 HWND hwndFrame = ad -> hwndFrame; 1869 1868 WinSendMsg(ad -> hvscroll, 1870 1869 SBM_SETSCROLLBAR, … … 1873 1872 WinSendMsg(ad -> hhscroll, SBM_SETSCROLLBAR, MPFROMSHORT(1), 1874 1873 MPFROM2SHORT(1, 1)); 1875 ad -> hwndStatus1 = WinCreateWindow( ad ->hwndFrame,1874 ad -> hwndStatus1 = WinCreateWindow(hwndFrame, 1876 1875 GetPString(IDS_WCVIEWSTATUS), 1877 1876 GetPString(IDS_LOADINGTEXT), … … 1882 1881 0, 1883 1882 0, 1884 ad ->hwndFrame,1883 hwndFrame, 1885 1884 HWND_TOP, 1886 1885 NEWVIEW_STATUS1, 1887 1886 NULL, 1888 1887 NULL); 1889 ad -> hwndStatus2 = WinCreateWindow(ad -> hwndFrame, 1888 if (!ad -> hwndStatus1) 1889 Win_Error2(hwndFrame,hwnd,pszSrcFile,__LINE__,IDS_WINCREATEWINDOW); 1890 1891 ad -> hwndStatus2 = WinCreateWindow(hwndFrame, 1890 1892 GetPString(IDS_WCVIEWSTATUS), 1891 1893 NULL, … … 1896 1898 0, 1897 1899 0, 1898 ad ->hwndFrame,1900 hwndFrame, 1899 1901 HWND_TOP, 1900 1902 NEWVIEW_STATUS2, 1901 1903 NULL, 1902 1904 NULL); 1903 ad -> hwndStatus3 = WinCreateWindow(ad -> hwndFrame, 1905 if (!ad -> hwndStatus2) 1906 Win_Error2(hwndFrame,hwnd,pszSrcFile,__LINE__,IDS_WINCREATEWINDOW); 1907 1908 ad -> hwndStatus3 = WinCreateWindow(hwndFrame, 1904 1909 GetPString(IDS_WCVIEWSTATUS), 1905 1910 NULL, … … 1910 1915 0, 1911 1916 0, 1912 ad ->hwndFrame,1917 hwndFrame, 1913 1918 HWND_TOP, 1914 1919 NEWVIEW_STATUS3, 1915 1920 NULL, 1916 1921 NULL); 1917 ad -> hwndListbox = WinCreateWindow(ad -> hwndFrame, 1922 if (!ad -> hwndStatus3) 1923 Win_Error2(hwndFrame,hwnd,pszSrcFile,__LINE__,IDS_WINCREATEWINDOW); 1924 1925 ad -> hwndListbox = WinCreateWindow(hwndFrame, 1918 1926 WC_LISTBOX, 1919 1927 NULL, … … 1923 1931 0, 1924 1932 0, 1925 ad ->hwndFrame,1933 hwndFrame, 1926 1934 HWND_TOP, 1927 1935 NEWVIEW_LISTBOX, 1928 1936 NULL, 1929 1937 NULL); 1930 ad -> hwndDrag = WinCreateWindow(ad -> hwndFrame, 1938 if (!ad -> hwndListbox) 1939 Win_Error2(hwndFrame,hwnd,pszSrcFile,__LINE__,IDS_WINCREATEWINDOW); 1940 1941 ad -> hwndDrag = WinCreateWindow(hwndFrame, 1931 1942 GetPString(IDS_WCVIEWSTATUS), 1932 1943 "#100", … … 1936 1947 0, 1937 1948 0, 1938 ad ->hwndFrame,1949 hwndFrame, 1939 1950 HWND_TOP, 1940 1951 NEWVIEW_DRAG, 1941 1952 NULL, 1942 1953 NULL); 1943 oldproc = WinSubclassWindow(ad -> hwndFrame, (PFNWP) ViewFrameWndProc); 1944 if (oldproc) 1945 WinSetWindowPtr(ad -> hwndFrame, QWL_USER, (PVOID) oldproc); 1954 if (!ad -> hwndDrag) 1955 Win_Error2(hwndFrame,hwnd,pszSrcFile,__LINE__,IDS_WINCREATEWINDOW); 1956 1957 oldproc = WinSubclassWindow(hwndFrame, ViewFrameWndProc); 1958 WinSetWindowPtr(hwndFrame, QWL_USER, (PVOID)oldproc); 1946 1959 ad -> hps = InitWindow(hwnd); 1947 1960 if (_beginthread(LoadFile, NULL, 524288, (PVOID) hwnd) == -1)
Note:
See TracChangeset
for help on using the changeset viewer.