Merge pull request #363 from google/import_wtl_9.1.5321
Import a subset of WTL 9.1.5321.
Yohei Yukawa
8 years ago
1777 | 1777 | <div class="licence"> |
1778 | 1778 | <h3>WTL is licensed as follows:</h3> |
1779 | 1779 | <pre> |
1780 | Common Public License Version 1.0 | |
1781 | ||
1782 | THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. | |
1783 | ||
1784 | ||
1785 | 1. DEFINITIONS | |
1786 | ||
1787 | "Contribution" means: | |
1788 | ||
1789 | a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and | |
1790 | ||
1791 | b) in the case of each subsequent Contributor: | |
1792 | ||
1793 | i) changes to the Program, and | |
1794 | ||
1795 | ii) additions to the Program; | |
1796 | ||
1797 | where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. | |
1798 | ||
1799 | "Contributor" means any person or entity that distributes the Program. | |
1800 | ||
1801 | "Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. | |
1802 | ||
1803 | "Program" means the Contributions distributed in accordance with this Agreement. | |
1804 | ||
1805 | "Recipient" means anyone who receives the Program under this Agreement, including all Contributors. | |
1806 | ||
1807 | ||
1808 | 2. GRANT OF RIGHTS | |
1809 | ||
1810 | a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. | |
1811 | ||
1812 | b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. | |
1813 | ||
1814 | c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. | |
1815 | ||
1816 | d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. | |
1817 | ||
1818 | ||
1819 | 3. REQUIREMENTS | |
1820 | ||
1821 | A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: | |
1822 | ||
1823 | a) it complies with the terms and conditions of this Agreement; and | |
1824 | ||
1825 | b) its license agreement: | |
1826 | ||
1827 | i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; | |
1828 | ||
1829 | ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; | |
1830 | ||
1831 | iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and | |
1832 | ||
1833 | iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. | |
1834 | ||
1835 | When the Program is made available in source code form: | |
1836 | ||
1837 | a) it must be made available under this Agreement; and | |
1838 | ||
1839 | b) a copy of this Agreement must be included with each copy of the Program. | |
1840 | ||
1841 | Contributors may not remove or alter any copyright notices contained within the Program. | |
1842 | ||
1843 | Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. | |
1844 | ||
1845 | ||
1846 | 4. COMMERCIAL DISTRIBUTION | |
1847 | ||
1848 | Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. | |
1849 | ||
1850 | For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. | |
1851 | ||
1852 | ||
1853 | 5. NO WARRANTY | |
1854 | ||
1855 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. | |
1856 | ||
1857 | ||
1858 | 6. DISCLAIMER OF LIABILITY | |
1859 | ||
1860 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. | |
1861 | ||
1862 | ||
1863 | 7. GENERAL | |
1864 | ||
1865 | If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. | |
1866 | ||
1867 | If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. | |
1868 | ||
1869 | All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. | |
1870 | ||
1871 | Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. | |
1872 | ||
1873 | This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. | |
1780 | Microsoft Public License (MS-PL) | |
1781 | ||
1782 | This license governs use of the accompanying software. If you use the software, you | |
1783 | accept this license. If you do not accept the license, do not use the software. | |
1784 | ||
1785 | 1. Definitions | |
1786 | The terms "reproduce," "reproduction," "derivative works," and "distribution" have the | |
1787 | same meaning here as under U.S. copyright law. | |
1788 | A "contribution" is the original software, or any additions or changes to the software. | |
1789 | A "contributor" is any person that distributes its contribution under this license. | |
1790 | "Licensed patents" are a contributor's patent claims that read directly on its contribution. | |
1791 | ||
1792 | 2. Grant of Rights | |
1793 | (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. | |
1794 | (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. | |
1795 | ||
1796 | 3. Conditions and Limitations | |
1797 | (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. | |
1798 | (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. | |
1799 | (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. | |
1800 | (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. | |
1801 | (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. | |
1874 | 1802 | </pre> |
1875 | 1803 | </div> |
1876 | 1804 | </div> |
1777 | 1777 | <div class="licence"> |
1778 | 1778 | <h3>WTL のライセンス:</h3> |
1779 | 1779 | <pre> |
1780 | Common Public License Version 1.0 | |
1781 | ||
1782 | THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. | |
1783 | ||
1784 | ||
1785 | 1. DEFINITIONS | |
1786 | ||
1787 | "Contribution" means: | |
1788 | ||
1789 | a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and | |
1790 | ||
1791 | b) in the case of each subsequent Contributor: | |
1792 | ||
1793 | i) changes to the Program, and | |
1794 | ||
1795 | ii) additions to the Program; | |
1796 | ||
1797 | where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. | |
1798 | ||
1799 | "Contributor" means any person or entity that distributes the Program. | |
1800 | ||
1801 | "Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. | |
1802 | ||
1803 | "Program" means the Contributions distributed in accordance with this Agreement. | |
1804 | ||
1805 | "Recipient" means anyone who receives the Program under this Agreement, including all Contributors. | |
1806 | ||
1807 | ||
1808 | 2. GRANT OF RIGHTS | |
1809 | ||
1810 | a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. | |
1811 | ||
1812 | b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. | |
1813 | ||
1814 | c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. | |
1815 | ||
1816 | d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. | |
1817 | ||
1818 | ||
1819 | 3. REQUIREMENTS | |
1820 | ||
1821 | A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: | |
1822 | ||
1823 | a) it complies with the terms and conditions of this Agreement; and | |
1824 | ||
1825 | b) its license agreement: | |
1826 | ||
1827 | i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; | |
1828 | ||
1829 | ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; | |
1830 | ||
1831 | iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and | |
1832 | ||
1833 | iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. | |
1834 | ||
1835 | When the Program is made available in source code form: | |
1836 | ||
1837 | a) it must be made available under this Agreement; and | |
1838 | ||
1839 | b) a copy of this Agreement must be included with each copy of the Program. | |
1840 | ||
1841 | Contributors may not remove or alter any copyright notices contained within the Program. | |
1842 | ||
1843 | Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. | |
1844 | ||
1845 | ||
1846 | 4. COMMERCIAL DISTRIBUTION | |
1847 | ||
1848 | Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. | |
1849 | ||
1850 | For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. | |
1851 | ||
1852 | ||
1853 | 5. NO WARRANTY | |
1854 | ||
1855 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. | |
1856 | ||
1857 | ||
1858 | 6. DISCLAIMER OF LIABILITY | |
1859 | ||
1860 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. | |
1861 | ||
1862 | ||
1863 | 7. GENERAL | |
1864 | ||
1865 | If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. | |
1866 | ||
1867 | If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. | |
1868 | ||
1869 | All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. | |
1870 | ||
1871 | Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. | |
1872 | ||
1873 | This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. | |
1780 | Microsoft Public License (MS-PL) | |
1781 | ||
1782 | This license governs use of the accompanying software. If you use the software, you | |
1783 | accept this license. If you do not accept the license, do not use the software. | |
1784 | ||
1785 | 1. Definitions | |
1786 | The terms "reproduce," "reproduction," "derivative works," and "distribution" have the | |
1787 | same meaning here as under U.S. copyright law. | |
1788 | A "contribution" is the original software, or any additions or changes to the software. | |
1789 | A "contributor" is any person that distributes its contribution under this license. | |
1790 | "Licensed patents" are a contributor's patent claims that read directly on its contribution. | |
1791 | ||
1792 | 2. Grant of Rights | |
1793 | (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. | |
1794 | (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. | |
1795 | ||
1796 | 3. Conditions and Limitations | |
1797 | (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. | |
1798 | (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. | |
1799 | (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. | |
1800 | (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. | |
1801 | (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. | |
1874 | 1802 | </pre> |
1875 | 1803 | </div> |
1876 | 1804 | </div> |
0 | 0 | MAJOR=2 |
1 | 1 | MINOR=17 |
2 | BUILD=2319 | |
2 | BUILD=2320 | |
3 | 3 | REVISION=102 |
4 | 4 | # NACL_DICTIONARY_VERSION is the target version of the system dictionary to be |
5 | 5 | # downloaded by NaCl Mozc. |
0 | Common Public License Version 1.0 | |
1 | ||
2 | THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. | |
3 | ||
4 | ||
5 | 1. DEFINITIONS | |
6 | ||
7 | "Contribution" means: | |
8 | ||
9 | a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and | |
10 | ||
11 | b) in the case of each subsequent Contributor: | |
12 | ||
13 | i) changes to the Program, and | |
14 | ||
15 | ii) additions to the Program; | |
16 | ||
17 | where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. | |
18 | ||
19 | "Contributor" means any person or entity that distributes the Program. | |
20 | ||
21 | "Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. | |
22 | ||
23 | "Program" means the Contributions distributed in accordance with this Agreement. | |
24 | ||
25 | "Recipient" means anyone who receives the Program under this Agreement, including all Contributors. | |
26 | ||
27 | ||
28 | 2. GRANT OF RIGHTS | |
29 | ||
30 | a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. | |
31 | ||
32 | b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. | |
33 | ||
34 | c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. | |
35 | ||
36 | d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. | |
37 | ||
38 | ||
39 | 3. REQUIREMENTS | |
40 | ||
41 | A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: | |
42 | ||
43 | a) it complies with the terms and conditions of this Agreement; and | |
44 | ||
45 | b) its license agreement: | |
46 | ||
47 | i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; | |
48 | ||
49 | ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; | |
50 | ||
51 | iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and | |
52 | ||
53 | iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. | |
54 | ||
55 | When the Program is made available in source code form: | |
56 | ||
57 | a) it must be made available under this Agreement; and | |
58 | ||
59 | b) a copy of this Agreement must be included with each copy of the Program. | |
60 | ||
61 | Contributors may not remove or alter any copyright notices contained within the Program. | |
62 | ||
63 | Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. | |
64 | ||
65 | ||
66 | 4. COMMERCIAL DISTRIBUTION | |
67 | ||
68 | Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. | |
69 | ||
70 | For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. | |
71 | ||
72 | ||
73 | 5. NO WARRANTY | |
74 | ||
75 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. | |
76 | ||
77 | ||
78 | 6. DISCLAIMER OF LIABILITY | |
79 | ||
80 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. | |
81 | ||
82 | ||
83 | 7. GENERAL | |
84 | ||
85 | If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. | |
86 | ||
87 | If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. | |
88 | ||
89 | All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. | |
90 | ||
91 | Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. | |
92 | ||
93 | This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLAPP_H__ |
12 | 9 | #define __ATLAPP_H__ |
78 | 75 | /////////////////////////////////////////////////////////////////////////////// |
79 | 76 | // WTL version number |
80 | 77 | |
81 | #define _WTL_VER 0x0900 | |
78 | #define _WTL_VER 0x0910 | |
82 | 79 | |
83 | 80 | |
84 | 81 | /////////////////////////////////////////////////////////////////////////////// |
765 | 762 | |
766 | 763 | #endif // !_WIN32_WCE |
767 | 764 | |
768 | inline int SizeOf_REBARBANDINFO() | |
769 | { | |
770 | int nSize = sizeof(REBARBANDINFO); | |
765 | inline UINT SizeOf_REBARBANDINFO() | |
766 | { | |
767 | UINT uSize = sizeof(REBARBANDINFO); | |
771 | 768 | #if !defined(_WTL_NO_RUNTIME_STRUCT_SIZE) && (_WIN32_WINNT >= 0x0600) |
772 | 769 | if(!(IsVista() && IsCommCtrl6())) |
773 | nSize = REBARBANDINFO_V6_SIZE; | |
770 | uSize = REBARBANDINFO_V6_SIZE; | |
774 | 771 | #endif // !defined(_WTL_NO_RUNTIME_STRUCT_SIZE) && (_WIN32_WINNT >= 0x0600) |
775 | return nSize; | |
772 | return uSize; | |
776 | 773 | } |
777 | 774 | |
778 | 775 | #if (_WIN32_WINNT >= 0x501) |
779 | inline int SizeOf_LVGROUP() | |
780 | { | |
781 | int nSize = sizeof(LVGROUP); | |
776 | inline UINT SizeOf_LVGROUP() | |
777 | { | |
778 | UINT uSize = sizeof(LVGROUP); | |
782 | 779 | #if !defined(_WTL_NO_RUNTIME_STRUCT_SIZE) && (_WIN32_WINNT >= 0x0600) |
783 | 780 | if(!IsVista()) |
784 | nSize = LVGROUP_V5_SIZE; | |
781 | uSize = LVGROUP_V5_SIZE; | |
785 | 782 | #endif // !defined(_WTL_NO_RUNTIME_STRUCT_SIZE) && (_WIN32_WINNT >= 0x0600) |
786 | return nSize; | |
787 | } | |
788 | ||
789 | inline int SizeOf_LVTILEINFO() | |
790 | { | |
791 | int nSize = sizeof(LVTILEINFO); | |
783 | return uSize; | |
784 | } | |
785 | ||
786 | inline UINT SizeOf_LVTILEINFO() | |
787 | { | |
788 | UINT uSize = sizeof(LVTILEINFO); | |
792 | 789 | #if !defined(_WTL_NO_RUNTIME_STRUCT_SIZE) && (_WIN32_WINNT >= 0x0600) |
793 | 790 | if(!IsVista()) |
794 | nSize = LVTILEINFO_V5_SIZE; | |
791 | uSize = LVTILEINFO_V5_SIZE; | |
795 | 792 | #endif // !defined(_WTL_NO_RUNTIME_STRUCT_SIZE) && (_WIN32_WINNT >= 0x0600) |
796 | return nSize; | |
793 | return uSize; | |
797 | 794 | } |
798 | 795 | #endif // (_WIN32_WINNT >= 0x501) |
799 | 796 | |
800 | inline int SizeOf_MCHITTESTINFO() | |
801 | { | |
802 | int nSize = sizeof(MCHITTESTINFO); | |
797 | inline UINT SizeOf_MCHITTESTINFO() | |
798 | { | |
799 | UINT uSize = sizeof(MCHITTESTINFO); | |
803 | 800 | #if !defined(_WTL_NO_RUNTIME_STRUCT_SIZE) && defined(NTDDI_VERSION) && (NTDDI_VERSION >= NTDDI_LONGHORN) |
804 | 801 | if(!(IsVista() && IsCommCtrl6())) |
805 | nSize = MCHITTESTINFO_V1_SIZE; | |
802 | uSize = MCHITTESTINFO_V1_SIZE; | |
806 | 803 | #endif // !defined(_WTL_NO_RUNTIME_STRUCT_SIZE) && defined(NTDDI_VERSION) && (NTDDI_VERSION >= NTDDI_LONGHORN) |
807 | return nSize; | |
804 | return uSize; | |
808 | 805 | } |
809 | 806 | |
810 | 807 | #ifndef _WIN32_WCE |
811 | inline int SizeOf_NONCLIENTMETRICS() | |
812 | { | |
813 | int nSize = sizeof(NONCLIENTMETRICS); | |
808 | inline UINT SizeOf_NONCLIENTMETRICS() | |
809 | { | |
810 | UINT uSize = sizeof(NONCLIENTMETRICS); | |
814 | 811 | #if !defined(_WTL_NO_RUNTIME_STRUCT_SIZE) && (WINVER >= 0x0600) |
815 | 812 | if(!IsVista()) |
816 | nSize = NONCLIENTMETRICS_V1_SIZE; | |
813 | uSize = NONCLIENTMETRICS_V1_SIZE; | |
817 | 814 | #endif // !defined(_WTL_NO_RUNTIME_STRUCT_SIZE) && (WINVER >= 0x0600) |
818 | return nSize; | |
819 | } | |
820 | ||
821 | inline int SizeOf_TOOLINFO() | |
822 | { | |
823 | int nSize = sizeof(TOOLINFO); | |
815 | return uSize; | |
816 | } | |
817 | ||
818 | inline UINT SizeOf_TOOLINFO() | |
819 | { | |
820 | UINT uSize = sizeof(TOOLINFO); | |
824 | 821 | #if !defined(_WTL_NO_RUNTIME_STRUCT_SIZE) && (_WIN32_WINNT >= 0x0501) |
825 | 822 | if(!IsVista()) |
826 | nSize = TTTOOLINFO_V2_SIZE; | |
823 | uSize = TTTOOLINFO_V2_SIZE; | |
827 | 824 | #endif // !defined(_WTL_NO_RUNTIME_STRUCT_SIZE) && (_WIN32_WINNT >= 0x0501) |
828 | return nSize; | |
825 | return uSize; | |
829 | 826 | } |
830 | 827 | #endif // !_WIN32_WCE |
831 | 828 | }; |
1175 | 1172 | |
1176 | 1173 | inline ATOM Register() |
1177 | 1174 | { |
1175 | #ifndef _WIN32_WCE | |
1178 | 1176 | WNDCLASSEX wc = { sizeof(WNDCLASSEX) }; |
1177 | #else | |
1178 | WNDCLASS wc = { 0 }; | |
1179 | #endif | |
1179 | 1180 | wc.lpfnWndProc = ::DefWindowProc; |
1180 | 1181 | wc.hInstance = ModuleHelper::GetModuleInstance(); |
1181 | 1182 | wc.hCursor = ::LoadCursor(NULL, IDC_ARROW); |
1182 | 1183 | wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); |
1183 | 1184 | wc.lpszClassName = GetName(); |
1185 | #ifndef _WIN32_WCE | |
1184 | 1186 | ATOM atom = ::RegisterClassEx(&wc); |
1187 | #else | |
1188 | ATOM atom = ::RegisterClass(&wc); | |
1189 | #endif | |
1185 | 1190 | ATLASSERT(atom != 0); |
1186 | 1191 | return atom; |
1187 | 1192 | } |
1769 | 1774 | } |
1770 | 1775 | |
1771 | 1776 | // COM Server methods |
1777 | #if (_MSC_VER >= 1300) | |
1778 | LONG Unlock() throw() | |
1779 | #else | |
1772 | 1780 | LONG Unlock() |
1781 | #endif | |
1773 | 1782 | { |
1774 | 1783 | LONG lRet = CComModule::Unlock(); |
1775 | 1784 | if(lRet == 0) |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLCRACK_H__ |
12 | 9 | #define __ATLCRACK_H__ |
48 | 45 | BOOL _ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& lResult, DWORD dwMsgMapID) \ |
49 | 46 | { \ |
50 | 47 | BOOL bHandled = TRUE; \ |
51 | hWnd; \ | |
52 | uMsg; \ | |
53 | wParam; \ | |
54 | lParam; \ | |
55 | lResult; \ | |
56 | bHandled; \ | |
48 | (hWnd); \ | |
49 | (uMsg); \ | |
50 | (wParam); \ | |
51 | (lParam); \ | |
52 | (lResult); \ | |
53 | (bHandled); \ | |
57 | 54 | switch(dwMsgMapID) \ |
58 | 55 | { \ |
59 | 56 | case 0: |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLCTRLS_H__ |
12 | 9 | #define __ATLCTRLS_H__ |
1724 | 1721 | BOOL HasSelection() const |
1725 | 1722 | { |
1726 | 1723 | const T* pT = static_cast<const T*>(this); |
1727 | int nMin, nMax; | |
1724 | int nMin = 0, nMax = 0; | |
1728 | 1725 | ::SendMessage(pT->m_hWnd, EM_GETSEL, (WPARAM)&nMin, (LPARAM)&nMax); |
1729 | 1726 | return (nMin != nMax); |
1730 | 1727 | } |
1810 | 1807 | #ifndef _WIN32_WCE |
1811 | 1808 | int GetScrollLimit() const |
1812 | 1809 | { |
1813 | int nMin = 0, nMax = 0; | |
1814 | ::GetScrollRange(m_hWnd, SB_CTL, &nMin, &nMax); | |
1815 | SCROLLINFO info = { sizeof(SCROLLINFO), SIF_PAGE }; | |
1816 | if(::GetScrollInfo(m_hWnd, SB_CTL, &info)) | |
1817 | nMax -= ((info.nPage - 1) > 0) ? (info.nPage - 1) : 0; | |
1818 | ||
1819 | return nMax; | |
1810 | SCROLLINFO info = { sizeof(SCROLLINFO), SIF_RANGE | SIF_PAGE }; | |
1811 | ::GetScrollInfo(m_hWnd, SB_CTL, &info); | |
1812 | if(info.nPage > 1) | |
1813 | info.nMax -= info.nPage - 1; | |
1814 | ||
1815 | return info.nMax; | |
1820 | 1816 | } |
1821 | 1817 | |
1822 | 1818 | #if (WINVER >= 0x0500) |
1885 | 1881 | |
1886 | 1882 | void Attach(HIMAGELIST hImageList) |
1887 | 1883 | { |
1888 | ATLASSERT(m_hImageList == NULL); | |
1889 | ATLASSERT(hImageList != NULL); | |
1890 | 1884 | if(t_bManaged && (m_hImageList != NULL) && (m_hImageList != hImageList)) |
1891 | 1885 | ImageList_Destroy(m_hImageList); |
1892 | 1886 | m_hImageList = hImageList; |
2224 | 2218 | class CToolInfo : public TOOLINFO |
2225 | 2219 | { |
2226 | 2220 | public: |
2227 | CToolInfo(UINT nFlags, HWND hWnd, UINT nIDTool = 0, LPRECT lpRect = NULL, LPTSTR lpstrText = LPSTR_TEXTCALLBACK, LPARAM lUserParam = NULL) | |
2221 | CToolInfo(UINT nFlags, HWND hWnd, UINT_PTR nIDTool = 0, LPRECT lpRect = NULL, LPTSTR lpstrText = LPSTR_TEXTCALLBACK, LPARAM lUserParam = NULL) | |
2228 | 2222 | { |
2229 | 2223 | Init(nFlags, hWnd, nIDTool, lpRect, lpstrText, lUserParam); |
2230 | 2224 | } |
2233 | 2227 | |
2234 | 2228 | operator LPARAM() { return (LPARAM)this; } |
2235 | 2229 | |
2236 | void Init(UINT nFlags, HWND hWnd, UINT nIDTool = 0, LPRECT lpRect = NULL, LPTSTR lpstrText = LPSTR_TEXTCALLBACK, LPARAM lUserParam = NULL) | |
2230 | void Init(UINT nFlags, HWND hWnd, UINT_PTR nIDTool = 0, LPRECT lpRect = NULL, LPTSTR lpstrText = LPSTR_TEXTCALLBACK, LPARAM lUserParam = NULL) | |
2237 | 2231 | { |
2238 | 2232 | ATLASSERT(::IsWindow(hWnd)); |
2239 | 2233 | memset(this, 0, sizeof(TOOLINFO)); |
2291 | 2285 | ::SendMessage(m_hWnd, TTM_GETTEXT, 0, (LPARAM)&lpToolInfo); |
2292 | 2286 | } |
2293 | 2287 | |
2294 | void GetText(LPTSTR lpstrText, HWND hWnd, UINT nIDTool = 0) const | |
2288 | void GetText(LPTSTR lpstrText, HWND hWnd, UINT_PTR nIDTool = 0) const | |
2295 | 2289 | { |
2296 | 2290 | ATLASSERT(::IsWindow(m_hWnd)); |
2297 | 2291 | ATLASSERT(hWnd != NULL); |
2305 | 2299 | return (BOOL)::SendMessage(m_hWnd, TTM_GETTOOLINFO, 0, (LPARAM)lpToolInfo); |
2306 | 2300 | } |
2307 | 2301 | |
2308 | BOOL GetToolInfo(HWND hWnd, UINT nIDTool, UINT* puFlags, LPRECT lpRect, LPTSTR lpstrText) const | |
2302 | BOOL GetToolInfo(HWND hWnd, UINT_PTR nIDTool, UINT* puFlags, LPRECT lpRect, LPTSTR lpstrText) const | |
2309 | 2303 | { |
2310 | 2304 | ATLASSERT(::IsWindow(m_hWnd)); |
2311 | 2305 | ATLASSERT(hWnd != NULL); |
2333 | 2327 | ::SendMessage(m_hWnd, TTM_NEWTOOLRECT, 0, (LPARAM)lpToolInfo); |
2334 | 2328 | } |
2335 | 2329 | |
2336 | void SetToolRect(HWND hWnd, UINT nIDTool, LPCRECT lpRect) | |
2330 | void SetToolRect(HWND hWnd, UINT_PTR nIDTool, LPCRECT lpRect) | |
2337 | 2331 | { |
2338 | 2332 | ATLASSERT(::IsWindow(m_hWnd)); |
2339 | 2333 | ATLASSERT(hWnd != NULL); |
2424 | 2418 | return size; |
2425 | 2419 | } |
2426 | 2420 | |
2427 | BOOL SetTitle(UINT uIcon, LPCTSTR lpstrTitle) | |
2421 | BOOL SetTitle(UINT_PTR uIcon, LPCTSTR lpstrTitle) | |
2428 | 2422 | { |
2429 | 2423 | ATLASSERT(::IsWindow(m_hWnd)); |
2430 | 2424 | return (BOOL)::SendMessage(m_hWnd, TTM_SETTITLE, uIcon, (LPARAM)lpstrTitle); |
2425 | } | |
2426 | ||
2427 | BOOL SetTitle(HICON hIcon, LPCTSTR lpstrTitle) | |
2428 | { | |
2429 | ATLASSERT(::IsWindow(m_hWnd)); | |
2430 | return (BOOL)::SendMessage(m_hWnd, TTM_SETTITLE, (WPARAM)hIcon, (LPARAM)lpstrTitle); | |
2431 | 2431 | } |
2432 | 2432 | #endif // (_WIN32_IE >= 0x0500) |
2433 | 2433 | |
2458 | 2458 | return (BOOL)::SendMessage(m_hWnd, TTM_ADDTOOL, 0, (LPARAM)lpToolInfo); |
2459 | 2459 | } |
2460 | 2460 | |
2461 | BOOL AddTool(HWND hWnd, ATL::_U_STRINGorID text = LPSTR_TEXTCALLBACK, LPCRECT lpRectTool = NULL, UINT nIDTool = 0) | |
2461 | BOOL AddTool(HWND hWnd, ATL::_U_STRINGorID text = LPSTR_TEXTCALLBACK, LPCRECT lpRectTool = NULL, UINT_PTR nIDTool = 0) | |
2462 | 2462 | { |
2463 | 2463 | ATLASSERT(::IsWindow(m_hWnd)); |
2464 | 2464 | ATLASSERT(hWnd != NULL); |
2475 | 2475 | ::SendMessage(m_hWnd, TTM_DELTOOL, 0, (LPARAM)lpToolInfo); |
2476 | 2476 | } |
2477 | 2477 | |
2478 | void DelTool(HWND hWnd, UINT nIDTool = 0) | |
2478 | void DelTool(HWND hWnd, UINT_PTR nIDTool = 0) | |
2479 | 2479 | { |
2480 | 2480 | ATLASSERT(::IsWindow(m_hWnd)); |
2481 | 2481 | ATLASSERT(hWnd != NULL); |
2521 | 2521 | ::SendMessage(m_hWnd, TTM_UPDATETIPTEXT, 0, (LPARAM)lpToolInfo); |
2522 | 2522 | } |
2523 | 2523 | |
2524 | void UpdateTipText(ATL::_U_STRINGorID text, HWND hWnd, UINT nIDTool = 0) | |
2524 | void UpdateTipText(ATL::_U_STRINGorID text, HWND hWnd, UINT_PTR nIDTool = 0) | |
2525 | 2525 | { |
2526 | 2526 | ATLASSERT(::IsWindow(m_hWnd)); |
2527 | 2527 | ATLASSERT(hWnd != NULL); |
2530 | 2530 | ::SendMessage(m_hWnd, TTM_UPDATETIPTEXT, 0, ti); |
2531 | 2531 | } |
2532 | 2532 | |
2533 | BOOL EnumTools(UINT nTool, LPTOOLINFO lpToolInfo) const | |
2533 | BOOL EnumTools(UINT_PTR nTool, LPTOOLINFO lpToolInfo) const | |
2534 | 2534 | { |
2535 | 2535 | ATLASSERT(::IsWindow(m_hWnd)); |
2536 | 2536 | return (BOOL)::SendMessage(m_hWnd, TTM_ENUMTOOLS, nTool, (LPARAM)lpToolInfo); |
2548 | 2548 | ::SendMessage(m_hWnd, TTM_TRACKACTIVATE, bActivate, (LPARAM)lpToolInfo); |
2549 | 2549 | } |
2550 | 2550 | |
2551 | void TrackActivate(HWND hWnd, UINT nIDTool, BOOL bActivate) | |
2551 | void TrackActivate(HWND hWnd, UINT_PTR nIDTool, BOOL bActivate) | |
2552 | 2552 | { |
2553 | 2553 | ATLASSERT(::IsWindow(m_hWnd)); |
2554 | 2554 | ATLASSERT(hWnd != NULL); |
4543 | 4543 | #if (_WIN32_IE >= 0x0600) |
4544 | 4544 | HTREEITEM GetNextSelectedItem() const |
4545 | 4545 | { |
4546 | #ifndef TVGN_NEXTSELECTED | |
4547 | const WORD TVGN_NEXTSELECTED = 0x000B; | |
4548 | #endif | |
4546 | 4549 | ATLASSERT(::IsWindow(m_hWnd)); |
4547 | 4550 | return (HTREEITEM)::SendMessage(m_hWnd, TVM_GETNEXTITEM, TVGN_NEXTSELECTED, 0L); |
4548 | 4551 | } |
4912 | 4915 | #if (_WIN32_IE >= 0x0600) |
4913 | 4916 | CTreeItemT<TBase> GetNextSelectedItem() const |
4914 | 4917 | { |
4918 | #ifndef TVGN_NEXTSELECTED | |
4919 | const WORD TVGN_NEXTSELECTED = 0x000B; | |
4920 | #endif | |
4915 | 4921 | ATLASSERT(::IsWindow(m_hWnd)); |
4916 | 4922 | HTREEITEM hTreeItem = (HTREEITEM)::SendMessage(m_hWnd, TVM_GETNEXTITEM, TVGN_NEXTSELECTED, 0L); |
4917 | 4923 | return CTreeItemT<TBase>(hTreeItem, (CTreeViewCtrlExT<TBase>*)this); |
8686 | 8692 | #if (_WIN32_IE >= 0x0600) |
8687 | 8693 | DWORD GetExtendedStyle() const |
8688 | 8694 | { |
8695 | #ifndef RB_GETEXTENDEDSTYLE | |
8696 | const UINT RB_GETEXTENDEDSTYLE = WM_USER + 42; | |
8697 | #endif | |
8689 | 8698 | ATLASSERT(::IsWindow(m_hWnd)); |
8690 | 8699 | return (DWORD)::SendMessage(m_hWnd, RB_GETEXTENDEDSTYLE, 0, 0L); |
8691 | 8700 | } |
8692 | 8701 | |
8693 | 8702 | DWORD SetExtendedStyle(DWORD dwStyle, DWORD dwMask) |
8694 | 8703 | { |
8704 | #ifndef RB_SETEXTENDEDSTYLE | |
8705 | const UINT RB_SETEXTENDEDSTYLE = WM_USER + 41; | |
8706 | #endif | |
8695 | 8707 | ATLASSERT(::IsWindow(m_hWnd)); |
8696 | 8708 | return (DWORD)::SendMessage(m_hWnd, RB_SETEXTENDEDSTYLE, dwMask, dwStyle); |
8697 | 8709 | } |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLCTRLW_H__ |
12 | 9 | #define __ATLCTRLW_H__ |
1096 | 1093 | #ifdef _CMDBAR_EXTRA_TRACE |
1097 | 1094 | ATLTRACE2(atlTraceUI, 0, _T("CmdBar - OnKeyDown\n")); |
1098 | 1095 | #endif |
1096 | if(m_bAttachedMenu) // nothing to do in this mode | |
1097 | { | |
1098 | bHandled = FALSE; | |
1099 | return 1; | |
1100 | } | |
1101 | ||
1099 | 1102 | bHandled = FALSE; |
1100 | 1103 | // Simulate Alt+Space for the parent |
1101 | 1104 | if(wParam == VK_SPACE) |
1130 | 1133 | #ifdef _CMDBAR_EXTRA_TRACE |
1131 | 1134 | ATLTRACE2(atlTraceUI, 0, _T("CmdBar - OnKeyUp\n")); |
1132 | 1135 | #endif |
1136 | if(m_bAttachedMenu) // nothing to do in this mode | |
1137 | { | |
1138 | bHandled = FALSE; | |
1139 | return 1; | |
1140 | } | |
1141 | ||
1133 | 1142 | if(wParam != VK_SPACE) |
1134 | 1143 | bHandled = FALSE; |
1144 | ||
1135 | 1145 | return 0; |
1136 | 1146 | } |
1137 | 1147 | |
1140 | 1150 | #ifdef _CMDBAR_EXTRA_TRACE |
1141 | 1151 | ATLTRACE2(atlTraceUI, 0, _T("CmdBar - OnChar\n")); |
1142 | 1152 | #endif |
1153 | if(m_bAttachedMenu) // nothing to do in this mode | |
1154 | { | |
1155 | bHandled = FALSE; | |
1156 | return 1; | |
1157 | } | |
1158 | ||
1143 | 1159 | if(wParam != VK_SPACE) |
1144 | 1160 | bHandled = FALSE; |
1145 | 1161 | else |
1421 | 1437 | |
1422 | 1438 | LRESULT OnSettingChange(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& /*bHandled*/) |
1423 | 1439 | { |
1424 | #ifndef SPI_GETKEYBOARDCUES | |
1440 | #ifndef SPI_SETKEYBOARDCUES | |
1425 | 1441 | const UINT SPI_SETKEYBOARDCUES = 0x100B; |
1426 | #endif // !SPI_GETKEYBOARDCUES | |
1442 | #endif // !SPI_SETKEYBOARDCUES | |
1427 | 1443 | #ifndef SPI_GETFLATMENU |
1428 | 1444 | const UINT SPI_SETFLATMENU = 0x1023; |
1429 | 1445 | #endif // !SPI_GETFLATMENU |
2370 | 2386 | void DrawMenuText(CDCHandle& dc, RECT& rc, LPCTSTR lpstrText, COLORREF color) |
2371 | 2387 | { |
2372 | 2388 | int nTab = -1; |
2373 | for(int i = 0; i < lstrlen(lpstrText); i++) | |
2389 | const int nLen = lstrlen(lpstrText); | |
2390 | for(int i = 0; i < nLen; i++) | |
2374 | 2391 | { |
2375 | 2392 | if(lpstrText[i] == _T('\t')) |
2376 | 2393 | { |
4101 | 4118 | #ifndef _WTL_NO_AUTO_THEME |
4102 | 4119 | if(m_hTheme != NULL) |
4103 | 4120 | { |
4104 | #ifndef TMSCHEMA_H | |
4121 | #if !defined(TMSCHEMA_H) && !defined(__VSSYM32_H__) | |
4105 | 4122 | const int WP_MDICLOSEBUTTON = 20; |
4106 | 4123 | const int CBS_NORMAL = 1; |
4107 | 4124 | const int CBS_PUSHED = 3; |
4114 | 4131 | const int MINBS_NORMAL = 1; |
4115 | 4132 | const int MINBS_PUSHED = 3; |
4116 | 4133 | const int MINBS_DISABLED = 4; |
4117 | #endif // TMSCHEMA_H | |
4134 | #endif // !defined(TMSCHEMA_H) && !defined(__VSSYM32_H__) | |
4118 | 4135 | if(nBtn == -1 || nBtn == 0) |
4119 | 4136 | m_pfnDrawThemeBackground(m_hTheme, dc, WP_MDICLOSEBUTTON, m_bParentActive ? ((m_nBtnPressed == 0) ? CBS_PUSHED : CBS_NORMAL) : CBS_DISABLED, &pRects[0], NULL); |
4120 | 4137 | if(nBtn == -1 || nBtn == 1) |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLCTRLX_H__ |
12 | 9 | #define __ATLCTRLX_H__ |
1140 | 1137 | bool bRet = true; |
1141 | 1138 | if(IsNotifyButton()) |
1142 | 1139 | { |
1143 | NMHDR nmhdr = { m_hWnd, GetDlgCtrlID(), NM_CLICK }; | |
1140 | NMHDR nmhdr = { m_hWnd, (UINT_PTR)GetDlgCtrlID(), NM_CLICK }; | |
1144 | 1141 | ::SendMessage(GetParent(), WM_NOTIFY, GetDlgCtrlID(), (LPARAM)&nmhdr); |
1145 | 1142 | } |
1146 | 1143 | else if(IsCommandButton()) |
2292 | 2289 | // CPaneContainer - provides header with title and close button for panes |
2293 | 2290 | |
2294 | 2291 | // pane container extended styles |
2295 | #define PANECNT_NOCLOSEBUTTON 0x00000001 | |
2296 | #define PANECNT_VERTICAL 0x00000002 | |
2297 | #define PANECNT_FLATBORDER 0x00000004 | |
2298 | #define PANECNT_NOBORDER 0x00000008 | |
2292 | #define PANECNT_NOCLOSEBUTTON 0x00000001 | |
2293 | #define PANECNT_VERTICAL 0x00000002 | |
2294 | #define PANECNT_FLATBORDER 0x00000004 | |
2295 | #define PANECNT_NOBORDER 0x00000008 | |
2296 | #define PANECNT_DIVIDER 0x00000010 | |
2297 | #define PANECNT_GRADIENT 0x00000020 | |
2298 | ||
2299 | // Note: PANECNT_GRADIENT doesn't work with _ATL_NO_MSIMG | |
2299 | 2300 | |
2300 | 2301 | template <class T, class TBase = ATL::CWindow, class TWinTraits = ATL::CControlWinTraits> |
2301 | 2302 | class ATL_NO_VTABLE CPaneContainerImpl : public ATL::CWindowImpl< T, TBase, TWinTraits >, public CCustomDraw< T > |
2382 | 2383 | { |
2383 | 2384 | bUpdate = true; |
2384 | 2385 | } |
2386 | ||
2387 | #if (!defined(_WIN32_WCE) && !defined(_ATL_NO_MSIMG)) || (_WIN32_WCE >= 420) | |
2388 | if((dwPrevStyle & PANECNT_GRADIENT) != (m_dwExtendedStyle & PANECNT_GRADIENT)) // change background | |
2389 | { | |
2390 | bUpdate = true; | |
2391 | } | |
2392 | #endif // (!defined(_WIN32_WCE) && !defined(_ATL_NO_MSIMG)) || (_WIN32_WCE >= 420) | |
2385 | 2393 | |
2386 | 2394 | if(bUpdate) |
2387 | 2395 | pT->UpdateLayout(); |
2575 | 2583 | return 0; |
2576 | 2584 | } |
2577 | 2585 | |
2578 | LRESULT OnEraseBackground(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) | |
2579 | { | |
2580 | return 1; // no background needed | |
2586 | LRESULT OnEraseBackground(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& /*bHandled*/) | |
2587 | { | |
2588 | T* pT = static_cast<T*>(this); | |
2589 | pT->DrawPaneTitleBackground((HDC)wParam); | |
2590 | ||
2591 | return 1; | |
2581 | 2592 | } |
2582 | 2593 | |
2583 | 2594 | LRESULT OnPaint(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& /*bHandled*/) |
2647 | 2658 | return CDRF_NOTIFYITEMDRAW; // we need per-item notifications |
2648 | 2659 | } |
2649 | 2660 | |
2650 | DWORD OnItemPrePaint(int /*idCtrl*/, LPNMCUSTOMDRAW lpNMCustomDraw) | |
2651 | { | |
2652 | CDCHandle dc = lpNMCustomDraw->hdc; | |
2653 | #if (_WIN32_IE >= 0x0400) | |
2654 | RECT& rc = lpNMCustomDraw->rc; | |
2655 | #else // !(_WIN32_IE >= 0x0400) | |
2656 | RECT rc = { 0 }; | |
2657 | m_tb.GetItemRect(0, &rc); | |
2658 | #endif // !(_WIN32_IE >= 0x0400) | |
2659 | ||
2660 | dc.FillRect(&rc, COLOR_3DFACE); | |
2661 | ||
2661 | DWORD OnItemPrePaint(int /*idCtrl*/, LPNMCUSTOMDRAW /*lpNMCustomDraw*/) | |
2662 | { | |
2662 | 2663 | return CDRF_NOTIFYPOSTPAINT; |
2663 | 2664 | } |
2664 | 2665 | |
2785 | 2786 | m_tb.SetButtonSize(m_cxImageTB + m_cxyBtnAddTB, m_cyImageTB + m_cxyBtnAddTB); |
2786 | 2787 | |
2787 | 2788 | if(IsVertical()) |
2788 | m_tb.SetWindowPos(NULL, m_cxyBorder + m_cxyBtnOffset, m_cxyBorder + m_cxyBtnOffset, m_cxImageTB + m_cxyBtnAddTB, m_cyImageTB + m_cxyBtnAddTB, SWP_NOZORDER | SWP_NOACTIVATE); | |
2789 | m_tb.SetWindowPos(NULL, m_cxyBorder + m_cxyBtnOffset, m_cxyBorder + m_cxyBtnOffset, m_cxImageTB + m_cxyBtnAddTB, m_cyImageTB + m_cxyBtnAddTB + 1, SWP_NOZORDER | SWP_NOACTIVATE); | |
2789 | 2790 | else |
2790 | m_tb.SetWindowPos(NULL, 0, 0, m_cxImageTB + m_cxyBtnAddTB, m_cyImageTB + m_cxyBtnAddTB, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE); | |
2791 | m_tb.SetWindowPos(NULL, 0, 0, m_cxImageTB + m_cxyBtnAddTB, m_cyImageTB + m_cxyBtnAddTB + 1, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE); | |
2791 | 2792 | } |
2792 | 2793 | } |
2793 | 2794 | |
2807 | 2808 | font.GetLogFont(lf); |
2808 | 2809 | if(IsVertical()) |
2809 | 2810 | { |
2810 | m_cxyHeader = m_cxImageTB + m_cxyBtnAddTB + m_cxyBorder; | |
2811 | m_cxyHeader = m_cxImageTB + m_cxyBtnAddTB + m_cxyBorder + 1; | |
2811 | 2812 | } |
2812 | 2813 | else |
2813 | 2814 | { |
2814 | 2815 | int cyFont = abs(lf.lfHeight) + m_cxyBorder + 2 * m_cxyTextOffset; |
2815 | int cyBtn = m_cyImageTB + m_cxyBtnAddTB + m_cxyBorder + 2 * m_cxyBtnOffset; | |
2816 | int cyBtn = m_cyImageTB + m_cxyBtnAddTB + m_cxyBorder + 2 * m_cxyBtnOffset + 1; | |
2816 | 2817 | m_cxyHeader = __max(cyFont, cyBtn); |
2817 | 2818 | } |
2818 | 2819 | } |
2852 | 2853 | uBorder |= BF_FLAT; |
2853 | 2854 | dc.DrawEdge(&rect, EDGE_ETCHED, uBorder); |
2854 | 2855 | } |
2855 | dc.FillRect(&rect, COLOR_3DFACE); | |
2856 | ||
2857 | if((m_dwExtendedStyle & PANECNT_DIVIDER) != 0) | |
2858 | { | |
2859 | uBorder = BF_FLAT | BF_ADJUST | (IsVertical() ? BF_RIGHT : BF_BOTTOM); | |
2860 | dc.DrawEdge(&rect, BDR_SUNKENOUTER, uBorder); | |
2861 | } | |
2856 | 2862 | |
2857 | 2863 | // draw title text |
2858 | 2864 | dc.SetTextColor(::GetSysColor(COLOR_WINDOWTEXT)); |
2890 | 2896 | } |
2891 | 2897 | |
2892 | 2898 | dc.SelectFont(hFontOld); |
2899 | } | |
2900 | ||
2901 | void DrawPaneTitleBackground(CDCHandle dc) | |
2902 | { | |
2903 | RECT rect = { 0 }; | |
2904 | GetClientRect(&rect); | |
2905 | if(IsVertical()) | |
2906 | rect.right = m_cxyHeader; | |
2907 | else | |
2908 | rect.bottom = m_cxyHeader; | |
2909 | ||
2910 | #if (!defined(_WIN32_WCE) && !defined(_ATL_NO_MSIMG)) || (_WIN32_WCE >= 420) | |
2911 | if((m_dwExtendedStyle & PANECNT_GRADIENT) != 0) | |
2912 | dc.GradientFillRect(rect, ::GetSysColor(COLOR_WINDOW), ::GetSysColor(COLOR_3DFACE), IsVertical()); | |
2913 | else | |
2914 | #endif // (!defined(_WIN32_WCE) && !defined(_ATL_NO_MSIMG)) || (_WIN32_WCE >= 420) | |
2915 | dc.FillRect(&rect, COLOR_3DFACE); | |
2893 | 2916 | } |
2894 | 2917 | |
2895 | 2918 | // called only if pane is empty |
3355 | 3378 | { |
3356 | 3379 | T* pT = static_cast<T*>(this); |
3357 | 3380 | int nID = pT->GetDlgCtrlID(); |
3358 | NMSORTLISTVIEW nm = { { pT->m_hWnd, nID, SLVN_SORTCHANGED }, iNewSortCol, iOldSortCol }; | |
3381 | NMSORTLISTVIEW nm = { { pT->m_hWnd, (UINT_PTR)nID, SLVN_SORTCHANGED }, iNewSortCol, iOldSortCol }; | |
3359 | 3382 | ::SendMessage(pT->GetParent(), WM_NOTIFY, (WPARAM)nID, (LPARAM)&nm); |
3360 | 3383 | } |
3361 | 3384 | |
4839 | 4862 | int CalcTabHeight() |
4840 | 4863 | { |
4841 | 4864 | int nCount = m_tab.GetItemCount(); |
4865 | TCHAR szText[] = _T("NS"); | |
4842 | 4866 | TCITEMEXTRA tcix = { 0 }; |
4843 | 4867 | tcix.tciheader.mask = TCIF_TEXT; |
4844 | tcix.tciheader.pszText = _T("NS"); | |
4868 | tcix.tciheader.pszText = szText; | |
4845 | 4869 | int nIndex = m_tab.InsertItem(nCount, tcix); |
4846 | 4870 | |
4847 | 4871 | RECT rect = { 0, 0, 1000, 1000 }; |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLDDX_H__ |
12 | 9 | #define __ATLDDX_H__ |
43 | 40 | #define BEGIN_DDX_MAP(thisClass) \ |
44 | 41 | BOOL DoDataExchange(BOOL bSaveAndValidate = FALSE, UINT nCtlID = (UINT)-1) \ |
45 | 42 | { \ |
46 | bSaveAndValidate; \ | |
47 | nCtlID; | |
43 | (bSaveAndValidate); \ | |
44 | (nCtlID); | |
48 | 45 | |
49 | 46 | #define DDX_TEXT(nID, var) \ |
50 | 47 | if(nCtlID == (UINT)-1 || nCtlID == nID) \ |
229 | 226 | } |
230 | 227 | else |
231 | 228 | { |
232 | ATLASSERT(!bValidate || lstrlen(lpstrText) <= nLength); | |
229 | ATLASSERT(!bValidate || (lstrlen(lpstrText) <= nLength)); | |
233 | 230 | bSuccess = pT->SetDlgItemText(nID, lpstrText); |
234 | 231 | } |
235 | 232 | |
265 | 262 | { |
266 | 263 | USES_CONVERSION; |
267 | 264 | LPTSTR lpstrText = OLE2T(bstrText); |
268 | ATLASSERT(!bValidate || lstrlen(lpstrText) <= nLength); | |
265 | ATLASSERT(!bValidate || (lstrlen(lpstrText) <= nLength)); | |
269 | 266 | bSuccess = pT->SetDlgItemText(nID, lpstrText); |
270 | 267 | } |
271 | 268 | |
301 | 298 | { |
302 | 299 | USES_CONVERSION; |
303 | 300 | LPTSTR lpstrText = OLE2T(bstrText); |
304 | ATLASSERT(!bValidate || lstrlen(lpstrText) <= nLength); | |
301 | ATLASSERT(!bValidate || (lstrlen(lpstrText) <= nLength)); | |
305 | 302 | bSuccess = pT->SetDlgItemText(nID, lpstrText); |
306 | 303 | } |
307 | 304 | |
382 | 379 | } |
383 | 380 | else |
384 | 381 | { |
385 | ATLASSERT(!bValidate || nVal >= nMin && nVal <= nMax); | |
382 | ATLASSERT(!bValidate || (nVal >= nMin && nVal <= nMax)); | |
386 | 383 | bSuccess = pT->SetDlgItemInt(nID, nVal, bSigned); |
387 | 384 | } |
388 | 385 | |
445 | 442 | } |
446 | 443 | else |
447 | 444 | { |
448 | ATLASSERT(!bValidate || nVal >= nMin && nVal <= nMax); | |
445 | ATLASSERT(!bValidate || (nVal >= nMin && nVal <= nMax)); | |
449 | 446 | SecureHelper::sprintf_x(szBuff, cchBuff, _T("%.*g"), nPrecision, nVal); |
450 | 447 | bSuccess = pT->SetDlgItemText(nID, szBuff); |
451 | 448 | } |
488 | 485 | } |
489 | 486 | else |
490 | 487 | { |
491 | ATLASSERT(!bValidate || nVal >= nMin && nVal <= nMax); | |
488 | ATLASSERT(!bValidate || (nVal >= nMin && nVal <= nMax)); | |
492 | 489 | SecureHelper::sprintf_x(szBuff, cchBuff, _T("%.*g"), nPrecision, nVal); |
493 | 490 | bSuccess = pT->SetDlgItemText(nID, szBuff); |
494 | 491 | } |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLDLGS_H__ |
12 | 9 | #define __ATLDLGS_H__ |
3156 | 3153 | return out; |
3157 | 3154 | } |
3158 | 3155 | |
3159 | RECT MapDialogPixels(RECT input) const | |
3156 | RECT MapDialogPixels(const RECT& input) const | |
3160 | 3157 | { |
3161 | 3158 | RECT out = { MapDialogPixelsX(input.left), MapDialogPixelsY(input.top), MapDialogPixelsX(input.right), MapDialogPixelsY(input.bottom) }; |
3162 | 3159 | return out; |
3184 | 3181 | return out; |
3185 | 3182 | } |
3186 | 3183 | |
3187 | RECT MapDialogUnits(RECT input) const | |
3184 | RECT MapDialogUnits(const RECT& input) const | |
3188 | 3185 | { |
3189 | 3186 | RECT out = { MapDialogUnitsX(input.left), MapDialogUnitsY(input.top), MapDialogUnitsX(input.right), MapDialogUnitsY(input.bottom) }; |
3190 | 3187 | return out; |
3278 | 3275 | m_cAllocated = 0; |
3279 | 3276 | } |
3280 | 3277 | |
3281 | void Create(bool bDlgEx, LPCTSTR lpszCaption, RECT rc, DWORD dwStyle = 0, DWORD dwExStyle = 0, | |
3278 | void Create(bool bDlgEx, LPCTSTR lpszCaption, const RECT& rc, DWORD dwStyle = 0, DWORD dwExStyle = 0, | |
3282 | 3279 | LPCTSTR lpstrFontName = NULL, WORD wFontSize = 0, WORD wWeight = 0, BYTE bItalic = 0, BYTE bCharset = 0, DWORD dwHelpID = 0, |
3283 | 3280 | ATL::_U_STRINGorID ClassName = 0U, ATL::_U_STRINGorID Menu = 0U) |
3284 | 3281 | { |
3319 | 3316 | } |
3320 | 3317 | else if (IS_INTRESOURCE(Menu.m_lpstr)) |
3321 | 3318 | { |
3322 | WORD menuData[] = {0xFFFF, (WORD)Menu.m_lpstr}; | |
3319 | WORD menuData[] = { 0xFFFF, LOWORD(Menu.m_lpstr) }; | |
3323 | 3320 | AddData(menuData, sizeof(menuData)); |
3324 | 3321 | } |
3325 | 3322 | else |
3341 | 3338 | } |
3342 | 3339 | else if (IS_INTRESOURCE(ClassName.m_lpstr)) |
3343 | 3340 | { |
3344 | WORD classData[] = {0xFFFF, (WORD)ClassName.m_lpstr}; | |
3341 | WORD classData[] = { 0xFFFF, LOWORD(ClassName.m_lpstr) }; | |
3345 | 3342 | AddData(classData, sizeof(classData)); |
3346 | 3343 | } |
3347 | 3344 | else |
3367 | 3364 | } |
3368 | 3365 | } |
3369 | 3366 | |
3370 | void AddControl(ATL::_U_STRINGorID ClassName, WORD wId, RECT rc, DWORD dwStyle, DWORD dwExStyle, | |
3367 | void AddControl(ATL::_U_STRINGorID ClassName, WORD wId, const RECT& rc, DWORD dwStyle, DWORD dwExStyle, | |
3371 | 3368 | ATL::_U_STRINGorID Text, const WORD* pCreationData = NULL, WORD nCreationData = 0, DWORD dwHelpID = 0) |
3372 | 3369 | { |
3373 | 3370 | AddControl(ClassName.m_lpstr, wId, (short) rc.left, (short) rc.top, (short) (rc.right - rc.left), (short) (rc.bottom - rc.top), dwStyle, dwExStyle, |
3403 | 3400 | ATLASSERT(ClassName.m_lpstr != NULL); |
3404 | 3401 | if (IS_INTRESOURCE(ClassName.m_lpstr)) |
3405 | 3402 | { |
3406 | WORD wData[] = {0xFFFF, (WORD)ClassName.m_lpstr}; | |
3403 | WORD wData[] = { 0xFFFF, LOWORD(ClassName.m_lpstr) }; | |
3407 | 3404 | AddData(wData, sizeof(wData)); |
3408 | 3405 | } |
3409 | 3406 | else |
3418 | 3415 | } |
3419 | 3416 | else if (IS_INTRESOURCE(Text.m_lpstr)) |
3420 | 3417 | { |
3421 | WORD wData[] = {0xFFFF, (WORD)Text.m_lpstr}; | |
3418 | WORD wData[] = { 0xFFFF, LOWORD(Text.m_lpstr) }; | |
3422 | 3419 | AddData(wData, sizeof(wData)); |
3423 | 3420 | } |
3424 | 3421 | else |
5971 | 5968 | |
5972 | 5969 | // Operations - setting values |
5973 | 5970 | // common buttons |
5974 | void SetCommonButtons(TASKDIALOG_COMMON_BUTTON_FLAGS dwCommonButtons) | |
5975 | { | |
5976 | this->dwCommonButtons = dwCommonButtons; | |
5971 | void SetCommonButtons(TASKDIALOG_COMMON_BUTTON_FLAGS dwCommonButtonsArg) | |
5972 | { | |
5973 | this->dwCommonButtons = dwCommonButtonsArg; | |
5977 | 5974 | } |
5978 | 5975 | |
5979 | 5976 | // window title text |
6029 | 6026 | } |
6030 | 6027 | |
6031 | 6028 | // buttons |
6032 | void SetButtons(const TASKDIALOG_BUTTON* pButtons, UINT cButtons, int nDefaultButton = 0) | |
6033 | { | |
6034 | this->pButtons = pButtons; | |
6035 | this->cButtons = cButtons; | |
6036 | if(nDefaultButton != 0) | |
6037 | this->nDefaultButton = nDefaultButton; | |
6038 | } | |
6039 | ||
6040 | void SetDefaultButton(int nDefaultButton) | |
6041 | { | |
6042 | this->nDefaultButton = nDefaultButton; | |
6029 | void SetButtons(const TASKDIALOG_BUTTON* pButtonsArg, UINT cButtonsArg, int nDefaultButtonArg = 0) | |
6030 | { | |
6031 | this->pButtons = pButtonsArg; | |
6032 | this->cButtons = cButtonsArg; | |
6033 | if(nDefaultButtonArg != 0) | |
6034 | this->nDefaultButton = nDefaultButtonArg; | |
6035 | } | |
6036 | ||
6037 | void SetDefaultButton(int nDefaultButtonArg) | |
6038 | { | |
6039 | this->nDefaultButton = nDefaultButtonArg; | |
6043 | 6040 | } |
6044 | 6041 | |
6045 | 6042 | // radio buttons |
6046 | void SetRadioButtons(const TASKDIALOG_BUTTON* pRadioButtons, UINT cRadioButtons, int nDefaultRadioButton = 0) | |
6047 | { | |
6048 | this->pRadioButtons = pRadioButtons; | |
6049 | this->cRadioButtons = cRadioButtons; | |
6050 | if(nDefaultRadioButton != 0) | |
6051 | this->nDefaultRadioButton = nDefaultRadioButton; | |
6052 | } | |
6053 | ||
6054 | void SetDefaultRadioButton(int nDefaultRadioButton) | |
6055 | { | |
6056 | this->nDefaultRadioButton = nDefaultRadioButton; | |
6043 | void SetRadioButtons(const TASKDIALOG_BUTTON* pRadioButtonsArg, UINT cRadioButtonsArg, int nDefaultRadioButtonArg = 0) | |
6044 | { | |
6045 | this->pRadioButtons = pRadioButtonsArg; | |
6046 | this->cRadioButtons = cRadioButtonsArg; | |
6047 | if(nDefaultRadioButtonArg != 0) | |
6048 | this->nDefaultRadioButton = nDefaultRadioButtonArg; | |
6049 | } | |
6050 | ||
6051 | void SetDefaultRadioButton(int nDefaultRadioButtonArg) | |
6052 | { | |
6053 | this->nDefaultRadioButton = nDefaultRadioButtonArg; | |
6057 | 6054 | } |
6058 | 6055 | |
6059 | 6056 | // verification text |
6131 | 6128 | } |
6132 | 6129 | |
6133 | 6130 | // width (in DLUs) |
6134 | void SetWidth(UINT cxWidth) | |
6135 | { | |
6136 | this->cxWidth = cxWidth; | |
6131 | void SetWidth(UINT cxWidthArg) | |
6132 | { | |
6133 | this->cxWidth = cxWidthArg; | |
6137 | 6134 | } |
6138 | 6135 | |
6139 | 6136 | // modify flags |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLDWM_H__ |
12 | 9 | #define __ATLDWM_H__ |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLFIND_H__ |
12 | 9 | #define __ATLFIND_H__ |
859 | 856 | if ((ovi.dwMajorVersion == 5 && ovi.dwMinorVersion >= 1) || (ovi.dwMajorVersion > 5)) |
860 | 857 | #endif // _versionhelpers_H_INCLUDED_ |
861 | 858 | { |
862 | // We use DLLVERSIONINFO_private so we don't have to depend on shlwapi.h | |
863 | typedef struct _DLLVERSIONINFO_private | |
859 | DWORD dwMajor = 0, dwMinor = 0; | |
860 | HRESULT hRet = ATL::AtlGetCommCtrlVersion(&dwMajor, &dwMinor); | |
861 | if(SUCCEEDED(hRet)) | |
864 | 862 | { |
865 | DWORD cbSize; | |
866 | DWORD dwMajorVersion; | |
867 | DWORD dwMinorVersion; | |
868 | DWORD dwBuildNumber; | |
869 | DWORD dwPlatformID; | |
870 | } DLLVERSIONINFO_private; | |
871 | ||
872 | HMODULE hModule = ::LoadLibrary("comctl32.dll"); | |
873 | if(hModule != NULL) | |
874 | { | |
875 | typedef HRESULT (CALLBACK *LPFN_DllGetVersion)(DLLVERSIONINFO_private *); | |
876 | LPFN_DllGetVersion fnDllGetVersion = (LPFN_DllGetVersion)::GetProcAddress(hModule, "DllGetVersion"); | |
877 | if(fnDllGetVersion != NULL) | |
863 | if(dwMajor >= 6) | |
878 | 864 | { |
879 | DLLVERSIONINFO_private version = { sizeof(DLLVERSIONINFO_private) }; | |
880 | if(SUCCEEDED(fnDllGetVersion(&version))) | |
881 | { | |
882 | if(version.dwMajorVersion >= 6) | |
883 | { | |
884 | pThisNoConst->m_bShadowBufferNeeded = TRUE; | |
885 | ||
886 | ATLTRACE2(atlTraceUI, 0, _T("Warning: You have compiled for MBCS/ANSI but are using common controls version 6 or later (likely through a manifest file).\r\n")); | |
887 | ATLTRACE2(atlTraceUI, 0, _T("If you use common controls version 6 or later, you should only do so for UNICODE builds.\r\n")); | |
888 | } | |
889 | } | |
865 | pThisNoConst->m_bShadowBufferNeeded = TRUE; | |
866 | ||
867 | ATLTRACE2(atlTraceUI, 0, _T("Warning: You have compiled for MBCS/ANSI but are using common controls version 6 or later (likely through a manifest file).\r\n")); | |
868 | ATLTRACE2(atlTraceUI, 0, _T("If you use common controls version 6 or later, you should only do so for UNICODE builds.\r\n")); | |
890 | 869 | } |
891 | ||
892 | ::FreeLibrary(hModule); | |
893 | hModule = NULL; | |
894 | 870 | } |
895 | 871 | } |
896 | 872 | #endif // !_UNICODE |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLFRAME_H__ |
12 | 9 | #define __ATLFRAME_H__ |
128 | 125 | { |
129 | 126 | if(m_uCommonResourceID != 0) // use it if not zero |
130 | 127 | { |
131 | m_wc.hIcon = (HICON)::LoadImage(ModuleHelper::GetResourceInstance(), MAKEINTRESOURCE(m_uCommonResourceID), IMAGE_ICON, 32, 32, LR_DEFAULTCOLOR); | |
132 | m_wc.hIconSm = (HICON)::LoadImage(ModuleHelper::GetResourceInstance(), MAKEINTRESOURCE(m_uCommonResourceID), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); | |
128 | m_wc.hIcon = (HICON)::LoadImage(ModuleHelper::GetResourceInstance(), | |
129 | MAKEINTRESOURCE(m_uCommonResourceID), IMAGE_ICON, | |
130 | ::GetSystemMetrics(SM_CXICON), ::GetSystemMetrics(SM_CYICON), LR_DEFAULTCOLOR); | |
131 | m_wc.hIconSm = (HICON)::LoadImage(ModuleHelper::GetResourceInstance(), | |
132 | MAKEINTRESOURCE(m_uCommonResourceID), IMAGE_ICON, | |
133 | ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR); | |
133 | 134 | } |
134 | 135 | m_atom = ::RegisterClassEx(&m_wc); |
135 | 136 | } |
208 | 209 | if (m_atom == 0) |
209 | 210 | { |
210 | 211 | if(m_uCommonResourceID != 0) // use it if not zero |
211 | m_wc.hIcon = (HICON)::LoadImage(ModuleHelper::GetResourceInstance(), MAKEINTRESOURCE(m_uCommonResourceID), IMAGE_ICON, 32, 32, LR_DEFAULTCOLOR); | |
212 | m_wc.hIcon = (HICON)::LoadImage(ModuleHelper::GetResourceInstance(), | |
213 | MAKEINTRESOURCE(m_uCommonResourceID), IMAGE_ICON, | |
214 | ::GetSystemMetrics(SM_CXICON), ::GetSystemMetrics(SM_CYICON), LR_DEFAULTCOLOR); | |
212 | 215 | m_atom = ::RegisterClass(&m_wc); |
213 | 216 | } |
214 | 217 | } |
1047 | 1050 | // get button's text |
1048 | 1051 | const int cchBuff = 200; |
1049 | 1052 | TCHAR szBuff[cchBuff] = { 0 }; |
1050 | LPTSTR lpstrText = szBuff; | |
1053 | LPCTSTR lpstrText = szBuff; | |
1051 | 1054 | TBBUTTONINFO tbbi = { 0 }; |
1052 | 1055 | tbbi.cbSize = sizeof(TBBUTTONINFO); |
1053 | 1056 | tbbi.dwMask = TBIF_TEXT; |
1054 | 1057 | tbbi.pszText = szBuff; |
1055 | 1058 | tbbi.cchText = cchBuff; |
1056 | if(wnd.SendMessage(TB_GETBUTTONINFO, tbb.idCommand, (LPARAM)&tbbi) == -1 || lstrlen(szBuff) == 0) | |
1059 | if((wnd.SendMessage(TB_GETBUTTONINFO, tbb.idCommand, (LPARAM)&tbbi) == -1) || (szBuff[0] == 0)) | |
1057 | 1060 | { |
1058 | 1061 | // no text for this button, try a resource string |
1059 | 1062 | lpstrText = _T(""); |
2944 | 2947 | { |
2945 | 2948 | if(m_arrUIMap[i].m_nID == nID) |
2946 | 2949 | { |
2950 | if((m_arrUIData[i].m_wState & UPDUI_TEXT) != 0) | |
2951 | delete [] m_arrUIData[i].m_lpstrText; | |
2952 | ||
2947 | 2953 | BOOL bRet = m_arrUIMap.RemoveAt(i); |
2948 | 2954 | ATLASSERT(bRet); |
2949 | 2955 | bRet = m_arrUIData.RemoveAt(i); |
3068 | 3074 | bool UIAddToolBar(HWND hWndToolBar) |
3069 | 3075 | { |
3070 | 3076 | ATLASSERT(::IsWindow(hWndToolBar)); |
3071 | TBBUTTONINFO tbbi = {sizeof TBBUTTONINFO, TBIF_COMMAND | TBIF_STYLE | TBIF_BYINDEX}; | |
3077 | TBBUTTONINFO tbbi = { sizeof(TBBUTTONINFO), TBIF_COMMAND | TBIF_STYLE | TBIF_BYINDEX }; | |
3072 | 3078 | |
3073 | 3079 | // Add toolbar buttons |
3074 | 3080 | for (int uItem = 0; ::SendMessage(hWndToolBar, TB_GETBUTTONINFO, uItem, (LPARAM)&tbbi) != -1; uItem++) |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLGDI_H__ |
12 | 9 | #define __ATLGDI_H__ |
3679 | 3676 | DIBINFO16(SIZE size) |
3680 | 3677 | { |
3681 | 3678 | BITMAPINFOHEADER bmih = { sizeof(BITMAPINFOHEADER), size.cx, size.cy, |
3682 | 1, 16, BI_BITFIELDS, 2 * size.cx * size.cy , 0, 0, 3 }; | |
3679 | 1, 16, BI_BITFIELDS, (DWORD)(2 * size.cx * size.cy), 0, 0, 3 }; | |
3683 | 3680 | DWORD dw[3] = DIBINFO16_BITFIELDS ; |
3684 | 3681 | |
3685 | 3682 | bmiHeader = bmih; |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLMISC_H__ |
12 | 9 | #define __ATLMISC_H__ |
3730 | 3727 | |
3731 | 3728 | // add ellipsis |
3732 | 3729 | SecureHelper::strcat_x(lpstrOut, cchLen, szEllipsis); |
3733 | if(!bRet) | |
3734 | return false; | |
3735 | 3730 | TCHAR szSlash[2] = { chSlash, 0 }; |
3736 | 3731 | SecureHelper::strcat_x(lpstrOut, cchLen, szSlash); |
3737 | if(!bRet) | |
3738 | return false; | |
3739 | 3732 | |
3740 | 3733 | // add filename (and ellipsis, if needed) |
3741 | 3734 | if(cchLen > (cchMidEllipsis + cchFileName)) |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLPRINT_H__ |
12 | 9 | #define __ATLPRINT_H__ |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLRES_H__ |
12 | 9 | #define __ATLRES_H__ |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLRESCE_H__ |
12 | 9 | #define __ATLRESCE_H__ |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLRIBBON_H__ |
12 | 9 | #define __ATLRIBBON_H__ |
377 | 374 | // Default constructor |
378 | 375 | CharFormat() |
379 | 376 | { |
380 | cbSize = sizeof CHARFORMAT2; | |
377 | cbSize = sizeof(CHARFORMAT2); | |
381 | 378 | Reset(); |
382 | 379 | } |
383 | 380 | |
384 | 381 | // Copy constructor |
385 | 382 | CharFormat(const CharFormat& cf) |
386 | 383 | { |
387 | CopyMemory(this, &cf, sizeof CHARFORMAT2); | |
384 | ::CopyMemory(this, &cf, sizeof(CHARFORMAT2)); | |
388 | 385 | } |
389 | 386 | |
390 | 387 | // Assign operator |
391 | 388 | CharFormat& operator =(const CharFormat& cf) |
392 | 389 | { |
393 | CopyMemory(this, &cf, sizeof CHARFORMAT2); | |
390 | ::CopyMemory(this, &cf, sizeof(CHARFORMAT2)); | |
394 | 391 | return (*this); |
395 | 392 | } |
396 | 393 | |
552 | 549 | // Put functions |
553 | 550 | void PutMaskEffect(WORD dwMaskVal, WORD dwEffectVal, REFPROPERTYKEY key, IPropertyStore* pStore) |
554 | 551 | { |
555 | PROPVARIANT propvar; | |
552 | PROPVARIANT var; | |
556 | 553 | UI_FONTPROPERTIES uProp = UI_FONTPROPERTIES_NOTAVAILABLE; |
557 | 554 | if ((dwMask & dwMaskVal) != 0) |
558 | 555 | uProp = dwEffects & dwEffectVal ? UI_FONTPROPERTIES_SET : UI_FONTPROPERTIES_NOTSET; |
559 | SetPropertyVal(key, uProp, &propvar); | |
560 | pStore->SetValue(key, propvar); | |
556 | SetPropertyVal(key, uProp, &var); | |
557 | pStore->SetValue(key, var); | |
561 | 558 | } |
562 | 559 | |
563 | 560 | void PutVerticalPos(IPropertyStore* pStore) |
564 | 561 | { |
565 | PROPVARIANT propvar; | |
562 | PROPVARIANT var; | |
566 | 563 | UI_FONTVERTICALPOSITION uProp = UI_FONTVERTICALPOSITION_NOTAVAILABLE; |
567 | 564 | |
568 | 565 | if ((dwMask & CFE_SUBSCRIPT) != 0) |
580 | 577 | uProp = UI_FONTVERTICALPOSITION_SUBSCRIPT; |
581 | 578 | } |
582 | 579 | |
583 | SetPropertyVal(UI_PKEY_FontProperties_VerticalPositioning, uProp, &propvar); | |
584 | pStore->SetValue(UI_PKEY_FontProperties_VerticalPositioning, propvar); | |
580 | SetPropertyVal(UI_PKEY_FontProperties_VerticalPositioning, uProp, &var); | |
581 | pStore->SetValue(UI_PKEY_FontProperties_VerticalPositioning, var); | |
585 | 582 | } |
586 | 583 | |
587 | 584 | void PutFace(IPropertyStore* pStore) |
588 | 585 | { |
589 | PROPVARIANT propvar; | |
586 | PROPVARIANT var; | |
590 | 587 | SetPropertyVal(UI_PKEY_FontProperties_Family, |
591 | dwMask & CFM_FACE ? szFaceName : L"", &propvar); | |
592 | pStore->SetValue(UI_PKEY_FontProperties_Family, propvar); | |
588 | dwMask & CFM_FACE ? szFaceName : L"", &var); | |
589 | pStore->SetValue(UI_PKEY_FontProperties_Family, var); | |
593 | 590 | } |
594 | 591 | |
595 | 592 | void PutSize(IPropertyStore* pStore) |
596 | 593 | { |
597 | PROPVARIANT propvar; | |
594 | PROPVARIANT var; | |
598 | 595 | DECIMAL decVal; |
599 | 596 | |
600 | 597 | if ((dwMask & CFM_SIZE) != 0) |
602 | 599 | else |
603 | 600 | VarDecFromI4(0, &decVal); |
604 | 601 | |
605 | SetPropertyVal(UI_PKEY_FontProperties_Size, &decVal, &propvar); | |
606 | pStore->SetValue(UI_PKEY_FontProperties_Size, propvar); | |
602 | SetPropertyVal(UI_PKEY_FontProperties_Size, &decVal, &var); | |
603 | pStore->SetValue(UI_PKEY_FontProperties_Size, var); | |
607 | 604 | } |
608 | 605 | |
609 | 606 | void PutColor(IPropertyStore* pStore) |
610 | 607 | { |
611 | 608 | if ((dwMask & CFM_COLOR) != 0) |
609 | { | |
612 | 610 | if ((dwEffects & CFE_AUTOCOLOR) == 0) |
613 | 611 | { |
614 | 612 | SetPropertyVal(UI_PKEY_FontProperties_ForegroundColorType, UI_SWATCHCOLORTYPE_RGB, &propvar); |
622 | 620 | SetPropertyVal(UI_PKEY_FontProperties_ForegroundColorType, UI_SWATCHCOLORTYPE_AUTOMATIC, &propvar); |
623 | 621 | pStore->SetValue(UI_PKEY_FontProperties_ForegroundColorType, propvar); |
624 | 622 | } |
623 | } | |
625 | 624 | } |
626 | 625 | |
627 | 626 | void PutBackColor(IPropertyStore* pStore) |
896 | 895 | |
897 | 896 | CollectionImpl() : m_size(t_items) |
898 | 897 | { |
899 | FillMemory(m_auItemCat, sizeof m_auItemCat, 0xff); // UI_COLLECTION_INVALIDINDEX | |
898 | ::FillMemory(m_auItemCat, sizeof(m_auItemCat), 0xff); // UI_COLLECTION_INVALIDINDEX | |
900 | 899 | } |
901 | 900 | |
902 | 901 | UINT32 m_auItemCat[t_items]; |
1132 | 1131 | |
1133 | 1132 | ItemCollectionImpl() |
1134 | 1133 | { |
1135 | ZeroMemory(m_aBitmap, sizeof m_aBitmap); | |
1134 | ::ZeroMemory(m_aBitmap, sizeof(m_aBitmap)); | |
1136 | 1135 | } |
1137 | 1136 | |
1138 | 1137 | CBitmap m_aBitmap[t_items]; |
1214 | 1213 | |
1215 | 1214 | CommandCollectionImpl() |
1216 | 1215 | { |
1217 | ZeroMemory(m_auCmd, sizeof m_auCmd); | |
1218 | ZeroMemory(m_aCmdType, sizeof m_aCmdType); | |
1216 | ::ZeroMemory(m_auCmd, sizeof(m_auCmd)); | |
1217 | ::ZeroMemory(m_aCmdType, sizeof(m_aCmdType)); | |
1219 | 1218 | } |
1220 | 1219 | |
1221 | 1220 | UINT32 m_auCmd[t_items]; |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLSCRL_H__ |
12 | 9 | #define __ATLSCRL_H__ |
911 | 908 | #if (_MSC_VER >= 1300) |
912 | 909 | BOOL bRet = ATL::CWindowImpl< T, TBase, TWinTraits >::SubclassWindow(hWnd); |
913 | 910 | #else // !(_MSC_VER >= 1300) |
914 | / typedef ATL::CWindowImpl< T, TBase, TWinTraits > _baseClass; | |
911 | typedef ATL::CWindowImpl< T, TBase, TWinTraits > _baseClass; | |
915 | 912 | BOOL bRet = _baseClass::SubclassWindow(hWnd); |
916 | 913 | #endif // !(_MSC_VER >= 1300) |
917 | 914 | if(bRet != FALSE) |
1210 | 1207 | #if (_MSC_VER >= 1300) |
1211 | 1208 | BOOL bRet = ATL::CWindowImpl< T, TBase, TWinTraits >::SubclassWindow(hWnd); |
1212 | 1209 | #else // !(_MSC_VER >= 1300) |
1213 | / typedef ATL::CWindowImpl< T, TBase, TWinTraits > _baseClass; | |
1210 | typedef ATL::CWindowImpl< T, TBase, TWinTraits > _baseClass; | |
1214 | 1211 | BOOL bRet = _baseClass::SubclassWindow(hWnd); |
1215 | 1212 | #endif // !(_MSC_VER >= 1300) |
1216 | 1213 | if(bRet != FALSE) |
1769 | 1766 | { |
1770 | 1767 | T* pT = static_cast<T*>(this); |
1771 | 1768 | int nId = pT->GetDlgCtrlID(); |
1772 | NMHDR nmhdr = { pT->m_hWnd, nId, ZSN_ZOOMCHANGED }; | |
1769 | NMHDR nmhdr = { pT->m_hWnd, (UINT_PTR)nId, ZSN_ZOOMCHANGED }; | |
1773 | 1770 | ::SendMessage(pT->GetParent(), WM_NOTIFY, (WPARAM)nId, (LPARAM)&nmhdr); |
1774 | 1771 | } |
1775 | 1772 | |
1943 | 1940 | #if (_MSC_VER >= 1300) |
1944 | 1941 | BOOL bRet = ATL::CWindowImpl< T, TBase, TWinTraits >::SubclassWindow(hWnd); |
1945 | 1942 | #else // !(_MSC_VER >= 1300) |
1946 | / typedef ATL::CWindowImpl< T, TBase, TWinTraits > _baseClass; | |
1943 | typedef ATL::CWindowImpl< T, TBase, TWinTraits > _baseClass; | |
1947 | 1944 | BOOL bRet = _baseClass::SubclassWindow(hWnd); |
1948 | 1945 | #endif // !(_MSC_VER >= 1300) |
1949 | 1946 | if(bRet != FALSE) |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLSPLIT_H__ |
12 | 9 | #define __ATLSPLIT_H__ |
53 | 50 | |
54 | 51 | // Note: SPLIT_PROPORTIONAL and SPLIT_RIGHTALIGNED/SPLIT_BOTTOMALIGNED are |
55 | 52 | // mutually exclusive. If both are set, splitter defaults to SPLIT_PROPORTIONAL. |
56 | // SPLIT_GRADIENTBAR doesn't wotk with _ATL_NO_MSIMG | |
53 | // SPLIT_GRADIENTBAR doesn't work with _ATL_NO_MSIMG | |
57 | 54 | |
58 | 55 | |
59 | 56 | template <class T> |
184 | 181 | return bRet; |
185 | 182 | } |
186 | 183 | |
184 | int GetSplitterPos() const | |
185 | { | |
186 | return m_xySplitterPos; | |
187 | } | |
188 | ||
187 | 189 | void SetSplitterPosPct(int nPct, bool bUpdate = true) |
188 | 190 | { |
189 | 191 | ATLASSERT((nPct >= 0) && (nPct <= 100)); |
195 | 197 | UpdateSplitterLayout(); |
196 | 198 | } |
197 | 199 | |
198 | int GetSplitterPos() const | |
199 | { | |
200 | return m_xySplitterPos; | |
200 | int GetSplitterPosPct() const | |
201 | { | |
202 | int cxyTotal = m_bVertical ? (m_rcSplitter.right - m_rcSplitter.left - m_cxySplitBar - m_cxyBarEdge) : (m_rcSplitter.bottom - m_rcSplitter.top - m_cxySplitBar - m_cxyBarEdge); | |
203 | return ((cxyTotal > 0) && (m_xySplitterPos >= 0)) ? (::MulDiv(m_xySplitterPos, m_nPropMax, cxyTotal) / 100) : -1; | |
201 | 204 | } |
202 | 205 | |
203 | 206 | bool SetSinglePaneMode(int nPane = SPLIT_PANE_NONE) |
295 | 298 | { |
296 | 299 | ATLASSERT((nPane == SPLIT_PANE_LEFT) || (nPane == SPLIT_PANE_RIGHT)); |
297 | 300 | if((nPane != SPLIT_PANE_LEFT) && (nPane != SPLIT_PANE_RIGHT)) |
298 | return false; | |
301 | return NULL; | |
299 | 302 | |
300 | 303 | return m_hWndPane[nPane]; |
301 | 304 | } |
670 | 673 | if(!m_bFullDrag) |
671 | 674 | DrawGhostBar(); |
672 | 675 | |
673 | if(!m_bFullDrag || (m_xySplitterPos != m_xySplitterPosNew)) | |
676 | if((m_xySplitterPosNew != -1) && (!m_bFullDrag || (m_xySplitterPos != m_xySplitterPosNew))) | |
674 | 677 | { |
675 | 678 | m_xySplitterPos = m_xySplitterPosNew; |
679 | m_xySplitterPosNew = -1; | |
676 | 680 | UpdateSplitterLayout(); |
677 | 681 | T* pT = static_cast<T*>(this); |
678 | 682 | pT->UpdateWindow(); |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLTHEME_H__ |
12 | 9 | #define __ATLTHEME_H__ |
37 | 34 | #endif |
38 | 35 | #endif |
39 | 36 | |
40 | #ifndef _UXTHEME_H_ | |
41 | #include <uxtheme.h> | |
42 | #endif | |
37 | #include <uxtheme.h> | |
43 | 38 | #pragma comment(lib, "uxtheme.lib") |
44 | 39 | |
45 | 40 | // Note: To create an application that also runs on older versions of Windows, |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLUSER_H__ |
12 | 9 | #define __ATLUSER_H__ |
1151 | 1148 | } |
1152 | 1149 | |
1153 | 1150 | #ifndef _WIN32_WCE |
1154 | bool LoadEx(ATL::_U_STRINGorID Type, ATL::_U_STRINGorID ID, WORD wLanguage) | |
1151 | bool LoadEx(ATL::_U_STRINGorID ID, ATL::_U_STRINGorID Type, WORD wLanguage) | |
1155 | 1152 | { |
1156 | 1153 | ATLASSERT(m_hResource == NULL); |
1157 | 1154 | ATLASSERT(m_hGlobal == NULL); |
1158 | 1155 | |
1159 | m_hResource = ::FindResourceEx(ModuleHelper::GetResourceInstance(), ID.m_lpstr, Type.m_lpstr, wLanguage); | |
1156 | m_hResource = ::FindResourceEx(ModuleHelper::GetResourceInstance(), Type.m_lpstr, ID.m_lpstr, wLanguage); | |
1160 | 1157 | if(m_hResource == NULL) |
1161 | 1158 | return false; |
1162 | 1159 | |
1236 | 1233 | inline HBITMAP AtlLoadSysBitmap(ATL::_U_STRINGorID bitmap) |
1237 | 1234 | { |
1238 | 1235 | #ifdef _DEBUG |
1239 | WORD wID = (WORD)bitmap.m_lpstr; | |
1236 | WORD wID = LOWORD(bitmap.m_lpstr); | |
1240 | 1237 | ATLASSERT(wID >= 32734 && wID <= 32767); |
1241 | 1238 | #endif // _DEBUG |
1242 | 1239 | return ::LoadBitmap(NULL, bitmap.m_lpstr); |
1314 | 1311 | inline HCURSOR AtlLoadSysCursorImage(ATL::_U_STRINGorID cursor, UINT fuLoad = LR_DEFAULTCOLOR | LR_DEFAULTSIZE, int cxDesired = 0, int cyDesired = 0) |
1315 | 1312 | { |
1316 | 1313 | #ifdef _DEBUG |
1317 | WORD wID = (WORD)cursor.m_lpstr; | |
1314 | WORD wID = LOWORD(cursor.m_lpstr); | |
1318 | 1315 | ATLASSERT((wID >= 32512 && wID <= 32516) || (wID >= 32640 && wID <= 32648) || (wID == 32650) || (wID == 32651)); |
1319 | 1316 | ATLASSERT((fuLoad & LR_LOADFROMFILE) == 0); // this one doesn't load from a file |
1320 | 1317 | #endif // _DEBUG |
1324 | 1321 | inline HICON AtlLoadSysIconImage(ATL::_U_STRINGorID icon, UINT fuLoad = LR_DEFAULTCOLOR | LR_DEFAULTSIZE, int cxDesired = 0, int cyDesired = 0) |
1325 | 1322 | { |
1326 | 1323 | #ifdef _DEBUG |
1327 | WORD wID = (WORD)icon.m_lpstr; | |
1324 | WORD wID = LOWORD(icon.m_lpstr); | |
1328 | 1325 | ATLASSERT(wID >= 32512 && wID <= 32517); |
1329 | 1326 | ATLASSERT((fuLoad & LR_LOADFROMFILE) == 0); // this one doesn't load from a file |
1330 | 1327 | #endif // _DEBUG |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLWINCE_H__ |
12 | 9 | #define __ATLWINCE_H__ |
0 | // Windows Template Library - WTL version 9.0 | |
0 | // Windows Template Library - WTL version 9.10 | |
1 | 1 | // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. |
2 | 2 | // |
3 | 3 | // This file is a part of the Windows Template Library. |
4 | 4 | // The use and distribution terms for this software are covered by the |
5 | // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) | |
6 | // which can be found in the file CPL.TXT at the root of this distribution. | |
7 | // By using this software in any fashion, you are agreeing to be bound by | |
8 | // the terms of this license. You must not remove this notice, or | |
9 | // any other, from this software. | |
5 | // Microsoft Public License (http://opensource.org/licenses/MS-PL) | |
6 | // which can be found in the file MS-PL.txt at the root folder. | |
10 | 7 | |
11 | 8 | #ifndef __ATLWINX_H__ |
12 | 9 | #define __ATLWINX_H__ |
0 | Common Public License Version 1.0 | |
0 | Microsoft Public License (MS-PL) | |
1 | 1 | |
2 | THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC | |
3 | LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM | |
4 | CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. | |
2 | This license governs use of the accompanying software. If you use the software, you | |
3 | accept this license. If you do not accept the license, do not use the software. | |
5 | 4 | |
5 | 1. Definitions | |
6 | The terms "reproduce," "reproduction," "derivative works," and "distribution" have the | |
7 | same meaning here as under U.S. copyright law. | |
8 | A "contribution" is the original software, or any additions or changes to the software. | |
9 | A "contributor" is any person that distributes its contribution under this license. | |
10 | "Licensed patents" are a contributor's patent claims that read directly on its contribution. | |
6 | 11 | |
7 | 1. DEFINITIONS | |
12 | 2. Grant of Rights | |
13 | (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. | |
14 | (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. | |
8 | 15 | |
9 | "Contribution" means: | |
10 | ||
11 | a) in the case of the initial Contributor, the initial code and documentation | |
12 | distributed under this Agreement, and | |
13 | ||
14 | b) in the case of each subsequent Contributor: | |
15 | ||
16 | i) changes to the Program, and | |
17 | ||
18 | ii) additions to the Program; | |
19 | ||
20 | where such changes and/or additions to the Program originate from and are | |
21 | distributed by that particular Contributor. A Contribution 'originates' from a | |
22 | Contributor if it was added to the Program by such Contributor itself or anyone | |
23 | acting on such Contributor's behalf. Contributions do not include additions to | |
24 | the Program which: (i) are separate modules of software distributed in | |
25 | conjunction with the Program under their own license agreement, and (ii) are not | |
26 | derivative works of the Program. | |
27 | ||
28 | "Contributor" means any person or entity that distributes the Program. | |
29 | ||
30 | "Licensed Patents " mean patent claims licensable by a Contributor which are | |
31 | necessarily infringed by the use or sale of its Contribution alone or when | |
32 | combined with the Program. | |
33 | ||
34 | "Program" means the Contributions distributed in accordance with this Agreement. | |
35 | ||
36 | "Recipient" means anyone who receives the Program under this Agreement, | |
37 | including all Contributors. | |
38 | ||
39 | ||
40 | 2. GRANT OF RIGHTS | |
41 | ||
42 | a) Subject to the terms of this Agreement, each Contributor hereby grants | |
43 | Recipient a non-exclusive, worldwide, royalty-free copyright license to | |
44 | reproduce, prepare derivative works of, publicly display, publicly perform, | |
45 | distribute and sublicense the Contribution of such Contributor, if any, and | |
46 | such derivative works, in source code and object code form. | |
47 | ||
48 | b) Subject to the terms of this Agreement, each Contributor hereby grants | |
49 | Recipient a non-exclusive, worldwide, royalty-free patent license under | |
50 | Licensed Patents to make, use, sell, offer to sell, import and otherwise | |
51 | transfer the Contribution of such Contributor, if any, in source code and object | |
52 | code form. This patent license shall apply to the combination of the | |
53 | Contribution and the Program if, at the time the Contribution is added by the | |
54 | Contributor, such addition of the Contribution causes such combination to be | |
55 | covered by the Licensed Patents. The patent license shall not apply to any | |
56 | other combinations which include the Contribution. No hardware per se is | |
57 | licensed hereunder. | |
58 | ||
59 | c) Recipient understands that although each Contributor grants the licenses to | |
60 | its Contributions set forth herein, no assurances are provided by any | |
61 | Contributor that the Program does not infringe the patent or other intellectual | |
62 | property rights of any other entity. Each Contributor disclaims any liability to | |
63 | Recipient for claims brought by any other entity based on infringement of | |
64 | intellectual property rights or otherwise. As a condition to exercising the | |
65 | rights and licenses granted hereunder, each Recipient hereby assumes sole | |
66 | responsibility to secure any other intellectual property rights needed, if any. | |
67 | For example, if a third party patent license is required to allow Recipient to | |
68 | distribute the Program, it is Recipient's responsibility to acquire that license | |
69 | before distributing the Program. | |
70 | ||
71 | d) Each Contributor represents that to its knowledge it has sufficient copyright | |
72 | rights in its Contribution, if any, to grant the copyright license set forth in | |
73 | this Agreement. | |
74 | ||
75 | ||
76 | 3. REQUIREMENTS | |
77 | ||
78 | A Contributor may choose to distribute the Program in object code form under its | |
79 | own license agreement, provided that: | |
80 | ||
81 | a) it complies with the terms and conditions of this Agreement; and | |
82 | ||
83 | b) its license agreement: | |
84 | ||
85 | i) effectively disclaims on behalf of all Contributors all warranties and | |
86 | conditions, express and implied, including warranties or conditions of title | |
87 | and non-infringement, and implied warranties or conditions of merchantability | |
88 | and fitness for a particular purpose; | |
89 | ||
90 | ii) effectively excludes on behalf of all Contributors all liability for | |
91 | damages, including direct, indirect, special, incidental and consequential | |
92 | damages, such as lost profits; | |
93 | ||
94 | iii) states that any provisions which differ from this Agreement are offered | |
95 | by that Contributor alone and not by any other party; and | |
96 | ||
97 | iv) states that source code for the Program is available from such Contributor, | |
98 | and informs licensees how to obtain it in a reasonable manner on or through a | |
99 | medium customarily used for software exchange. | |
100 | ||
101 | When the Program is made available in source code form: | |
102 | ||
103 | a) it must be made available under this Agreement; and | |
104 | ||
105 | b) a copy of this Agreement must be included with each copy of the Program. | |
106 | ||
107 | Contributors may not remove or alter any copyright notices contained within the | |
108 | Program. | |
109 | ||
110 | Each Contributor must identify itself as the originator of its Contribution, if | |
111 | any, in a manner that reasonably allows subsequent Recipients to identify the | |
112 | originator of the Contribution. | |
113 | ||
114 | ||
115 | 4. COMMERCIAL DISTRIBUTION | |
116 | ||
117 | Commercial distributors of software may accept certain responsibilities with | |
118 | respect to end users, business partners and the like. While this license is | |
119 | intended to facilitate the commercial use of the Program, the Contributor who | |
120 | includes the Program in a commercial product offering should do so in a manner | |
121 | which does not create potential liability for other Contributors. Therefore, if | |
122 | a Contributor includes the Program in a commercial product offering, such | |
123 | Contributor ("Commercial Contributor") hereby agrees to defend and indemnify | |
124 | every other Contributor ("Indemnified Contributor") against any losses, damages | |
125 | and costs (collectively "Losses") arising from claims, lawsuits and other legal | |
126 | actions brought by a third party against the Indemnified Contributor to the | |
127 | extent caused by the acts or omissions of such Commercial Contributor in | |
128 | connection with its distribution of the Program in a commercial product | |
129 | offering. The obligations in this section do not apply to any claims or Losses | |
130 | relating to any actual or alleged intellectual property infringement. In order | |
131 | to qualify, an Indemnified Contributor must: a) promptly notify the Commercial | |
132 | Contributor in writing of such claim, and b) allow the Commercial Contributor | |
133 | to control, and cooperate with the Commercial Contributor in, the defense and | |
134 | any related settlement negotiations. The Indemnified Contributor may participate | |
135 | in any such claim at its own expense. | |
136 | ||
137 | For example, a Contributor might include the Program in a commercial product | |
138 | offering, Product X. That Contributor is then a Commercial Contributor. If that | |
139 | Commercial Contributor then makes performance claims, or offers warranties | |
140 | related to Product X, those performance claims and warranties are such | |
141 | Commercial Contributor's responsibility alone. Under this section, the | |
142 | Commercial Contributor would have to defend claims against the other | |
143 | Contributors related to those performance claims and warranties, and if a court | |
144 | requires any other Contributor to pay any damages as a result, the Commercial | |
145 | Contributor must pay those damages. | |
146 | ||
147 | ||
148 | 5. NO WARRANTY | |
149 | ||
150 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN | |
151 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR | |
152 | IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, | |
153 | NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each | |
154 | Recipient is solely responsible for determining the appropriateness of using and | |
155 | distributing the Program and assumes all risks associated with its exercise of | |
156 | rights under this Agreement, including but not limited to the risks and costs of | |
157 | program errors, compliance with applicable laws, damage to or loss of data, | |
158 | programs or equipment, and unavailability or interruption of operations. | |
159 | ||
160 | ||
161 | 6. DISCLAIMER OF LIABILITY | |
162 | ||
163 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY | |
164 | CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
165 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST | |
166 | PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
167 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
168 | OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS | |
169 | GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. | |
170 | ||
171 | ||
172 | 7. GENERAL | |
173 | ||
174 | If any provision of this Agreement is invalid or unenforceable under applicable | |
175 | law, it shall not affect the validity or enforceability of the remainder of the | |
176 | terms of this Agreement, and without further action by the parties hereto, such | |
177 | provision shall be reformed to the minimum extent necessary to make such | |
178 | provision valid and enforceable. | |
179 | ||
180 | If Recipient institutes patent litigation against a Contributor with respect to | |
181 | a patent applicable to software (including a cross-claim or counterclaim in a | |
182 | lawsuit), then any patent licenses granted by that Contributor to such Recipient | |
183 | under this Agreement shall terminate as of the date such litigation is filed. | |
184 | In addition, if Recipient institutes patent litigation against any entity | |
185 | (including a cross-claim or counterclaim in a lawsuit) alleging that the Program | |
186 | itself (excluding combinations of the Program with other software or hardware) | |
187 | infringes such Recipient's patent(s), then such Recipient's rights granted under | |
188 | Section 2(b) shall terminate as of the date such litigation is filed. | |
189 | ||
190 | All Recipient's rights under this Agreement shall terminate if it fails to | |
191 | comply with any of the material terms or conditions of this Agreement and does | |
192 | not cure such failure in a reasonable period of time after becoming aware of | |
193 | such noncompliance. If all Recipient's rights under this Agreement terminate, | |
194 | Recipient agrees to cease use and distribution of the Program as soon as | |
195 | reasonably practicable. However, Recipient's obligations under this Agreement | |
196 | and any licenses granted by Recipient relating to the Program shall continue | |
197 | and survive. | |
198 | ||
199 | Everyone is permitted to copy and distribute copies of this Agreement, but in | |
200 | order to avoid inconsistency the Agreement is copyrighted and may only be | |
201 | modified in the following manner. The Agreement Steward reserves the right to | |
202 | publish new versions (including revisions) of this Agreement from time to time. | |
203 | No one other than the Agreement Steward has the right to modify this Agreement. | |
204 | IBM is the initial Agreement Steward. IBM may assign the responsibility to serve | |
205 | as the Agreement Steward to a suitable separate entity. Each new version of the | |
206 | Agreement will be given a distinguishing version number. The Program (including | |
207 | Contributions) may always be distributed subject to the version of the Agreement | |
208 | under which it was received. In addition, after a new version of the Agreement | |
209 | is published, Contributor may elect to distribute the Program (including its | |
210 | Contributions) under the new version. Except as expressly stated in | |
211 | Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the | |
212 | intellectual property of any Contributor under this Agreement, whether | |
213 | expressly, by implication, estoppel or otherwise. All rights in the Program not | |
214 | expressly granted under this Agreement are reserved. | |
215 | ||
216 | This Agreement is governed by the laws of the State of New York and the | |
217 | intellectual property laws of the United States of America. No party to this | |
218 | Agreement will bring a legal action under this Agreement more than one year | |
219 | after the cause of action arose. Each party waives its rights to a jury trial | |
220 | in any resulting litigation. | |
16 | 3. Conditions and Limitations | |
17 | (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. | |
18 | (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. | |
19 | (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. | |
20 | (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. | |
21 | (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. |
0 | Microsoft Public License (MS-PL) | |
1 | ||
2 | This license governs use of the accompanying software. If you use the software, you | |
3 | accept this license. If you do not accept the license, do not use the software. | |
4 | ||
5 | 1. Definitions | |
6 | The terms "reproduce," "reproduction," "derivative works," and "distribution" have the | |
7 | same meaning here as under U.S. copyright law. | |
8 | A "contribution" is the original software, or any additions or changes to the software. | |
9 | A "contributor" is any person that distributes its contribution under this license. | |
10 | "Licensed patents" are a contributor's patent claims that read directly on its contribution. | |
11 | ||
12 | 2. Grant of Rights | |
13 | (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. | |
14 | (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. | |
15 | ||
16 | 3. Conditions and Limitations | |
17 | (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. | |
18 | (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. | |
19 | (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. | |
20 | (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. | |
21 | (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. |
0 | URL: http://sourceforge.net/projects/wtl/files/WTL%209.0/WTL%209.0.4140%20Final/ | |
1 | Version: WTL version 9.0.4140 | |
2 | License: Common Public License 1.0 | |
0 | URL: http://sourceforge.net/projects/wtl/files/WTL%209.1/WTL%209.1.5321%20Final/ | |
1 | Version: WTL version 9.1.5321 | |
2 | License: Ms-PL | |
3 | 3 | License File: LICENSE |
4 | 4 | |
5 | 5 | Local Modifications: |
27 | 27 | <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber3"> |
28 | 28 | <tr> |
29 | 29 | <td class="style3"> |
30 | <p style="text-align: left"><font face="Arial"><b>Windows Template Library - WTL Version 9.0</b></font><font face="Arial" size="2"> | |
31 | (build 4140 final) 2014-05-20</font></td> | |
30 | <p style="text-align: left"><font face="Arial"><b>Windows Template Library - WTL Version 9.1</b></font><font face="Arial" size="2"> | |
31 | (build 5321 final) 2015-11-17</font></td> | |
32 | 32 | </tr> |
33 | 33 | <tr> |
34 | 34 | <td><hr></td> |
35 | 35 | </tr> |
36 | 36 | <tr> |
37 | <td><font face="Arial" size="2">Copyright © 2014 Microsoft Corporation, WTL Team. All rights reserved.</font></td> | |
37 | <td><font face="Arial" size="2">Copyright © 2015 Microsoft Corporation, WTL Team. All rights reserved.</font></td> | |
38 | 38 | </tr> |
39 | 39 | <tr> |
40 | 40 | <td> </td> |
43 | 43 | <td><font face="Arial" size="2">This file is a part of the Windows Template |
44 | 44 | Library.<br> |
45 | 45 | The use and distribution terms for this software are covered by the<br> |
46 | Common Public License 1.0 (<a target="_blank" href="http://opensource.org/licenses/cpl1.0.php">http://opensource.org/licenses/cpl1.0.php</a>)<br> | |
47 | which can be found in the file CPL.TXT at the root of this distribution.<br> | |
48 | By using this software in any fashion, you are agreeing to be bound by<br> | |
49 | the terms of this license. You must not remove this notice, or<br> | |
50 | any other, from this software.</font></td> | |
46 | Microsoft Public License (<a target="_blank" href="http://opensource.org/licenses/MS-PL">http://opensource.org/licenses/MS-PL</a>)<br> | |
47 | which can be found in the file MS-PL.txt at the root folder.<br></font></td> | |
51 | 48 | </tr> |
52 | 49 | <tr> |
53 | 50 | <td><hr></td> |
59 | 56 | <p style=margin:0in> </p> |
60 | 57 | |
61 | 58 | <p style=margin:0in><font face="Arial" size="2">Welcome to the Windows Template Library, version |
62 | 9.0. This document contains the following topics:</font></p> | |
59 | 9.1. This document contains the following topics:</font></p> | |
63 | 60 | <p style=margin:0in> </p> |
64 | 61 | <ul style="margin-top:0in;margin-bottom:0in"> |
65 | 62 | <li><font face="Arial" size="2"><a href="#Introduction">Introduction</a></font></li> |
66 | <li><font face="Arial" size="2"><a href="#Features And Installation">Features | |
67 | And Installation</a></font></li> | |
63 | <li><font face="Arial" size="2"><a href="#Features and Installation">Features | |
64 | and Installation</a></font></li> | |
68 | 65 | <li><font face="Arial" size="2"><a href="#Packing List">Packing List</a></font></li> |
69 | 66 | <li><font face="Arial" size="2"><a href="#Class Overview">Class Overview</a></font></li> |
70 | 67 | <li><font face="Arial" size="2"><a href="#ATL/WTL AppWizard">ATL/WTL AppWizard</a></font></li> |
74 | 71 | <a href="#Support for Visual C++ Express">Support for Visual C++ |
75 | 72 | Express</a></font></li> |
76 | 73 | <li><font face="Arial" size="2"><a href="#Notes">Notes</a></font></li> |
77 | <li><font face="Arial" size="2"><a href="#Changes Between WTL 9.0 And 8.0">Changes Between WTL | |
78 | 9.0 And 8.0</a></font></li> | |
79 | <li><font face="Arial" size="2"><a href="#Changes Between WTL 8.0 And 7.5">Changes Between WTL | |
80 | 8.0 And 7.5</a></font></li> | |
81 | <li><font face="Arial" size="2"><a href="#Changes Between WTL 7.5 And 7.1">Changes Between WTL 7.5 And 7.1</a></font></li> | |
82 | <li><font face="Arial" size="2"><a href="#Changes Between WTL 7.1 And 7.0">Changes Between WTL | |
83 | 7.1 And 7.0</a></font></li> | |
84 | <li><font face="Arial" size="2"><a href="#Changes Between WTL 7.0 And 3.1">Changes Between WTL | |
85 | 7.0 And 3.1</a></font></li> | |
86 | <li><font face="Arial" size="2"><a href="#Changes Between WTL 3.1 And 3.0">Changes Between WTL 3.1 And 3.0</a></font></li> | |
74 | <li><font face="Arial" size="2"><a href="#Changes Between WTL 9.1 and 9.0">Changes Between WTL | |
75 | 9.1 and 9.0</a></font></li> | |
76 | <li><font face="Arial" size="2"><a href="#Changes Between WTL 9.0 and 8.0">Changes Between WTL | |
77 | 9.0 and 8.0</a></font></li> | |
78 | <li><font face="Arial" size="2"><a href="#Changes Between WTL 8.0 and 7.5">Changes Between WTL | |
79 | 8.0 and 7.5</a></font></li> | |
80 | <li><font face="Arial" size="2"><a href="#Changes Between WTL 7.5 and 7.1">Changes Between WTL 7.5 and 7.1</a></font></li> | |
81 | <li><font face="Arial" size="2"><a href="#Changes Between WTL 7.1 and 7.0">Changes Between WTL | |
82 | 7.1 and 7.0</a></font></li> | |
83 | <li><font face="Arial" size="2"><a href="#Changes Between WTL 7.0 and 3.1">Changes Between WTL | |
84 | 7.0 and 3.1</a></font></li> | |
85 | <li><font face="Arial" size="2"><a href="#Changes Between WTL 3.1 and 3.0">Changes Between WTL 3.1 and 3.0</a></font></li> | |
87 | 86 | </ul> |
88 | 87 | <p style=margin:0in> </p> |
89 | 88 | <p style=margin:0in> </p> |
113 | 112 | <p style=margin:0in> </p> |
114 | 113 | <p style=margin:0in> </p> |
115 | 114 | <p style=margin:0in><font face="Arial"> |
116 | <b><a name="Features And Installation"></a>Features And Installation</b></font></p> | |
117 | <p style=margin:0in> </p> | |
118 | <p style=margin:0in><font face="Arial" size="2">This is the seventh public release | |
119 | of WTL, after WTL 3.0, 3.1, 7.0, 7.1, 7.5, and 8.0. It is also the third release of WTL | |
120 | under the Common Public License, enabling developers from the WTL community to | |
115 | <b><a name="Features and Installation"></a>Features and Installation</b></font></p> | |
116 | <p style=margin:0in> </p> | |
117 | <p style=margin:0in><font face="Arial" size="2">This is the eigth public release | |
118 | of WTL, after WTL 3.0, 3.1, 7.0, 7.1, 7.5, 8.0, and 9.0. This version is released | |
119 | under the Microsoft Public License, enabling developers from the WTL community to | |
121 | 120 | contribute to the library.</font></p> |
122 | 121 | <p style=margin:0in> </p> |
123 | <p style=margin:0in><font face="Arial" size="2">WTL classes can be used with either VC++ 6.0, VC++ .NET 2002 or 2003, VC++ 2005 or 2008 or 2010 or 2012 or 2013, | |
122 | <p style=margin:0in><font face="Arial" size="2">WTL classes can be used with either VC++ 6.0, VC++ .NET 2002 or 2003, VC++ 2005 or 2008 or 2010 or 2012 or 2013 or 2015, | |
124 | 123 | or EVC++ 4.0 or 3.0. AppWizard for Visual Studio is |
125 | 124 | included.</font></p> |
126 | 125 | <p style=margin:0in> </p> |
167 | 166 | Visual C++ 2012 (ATL 11.0)</font></p> |
168 | 167 | <p style=margin:0in><font face="Arial" size="2"> |
169 | 168 | Visual C++ 2013 (ATL 12.0)</font></p> |
169 | <p style=margin:0in><font face="Arial" size="2"> | |
170 | Visual C++ 2015 (ATL 14.0)</font></p> | |
170 | 171 | <p style=margin:0in> </p> |
171 | 172 | <p style=margin:0in><font face="Arial" size="2"> SDK |
172 | 173 | (optional):</font></p> |
212 | 213 | <td width="358"><font face="Arial" size="2">this file</font></td> |
213 | 214 | </tr> |
214 | 215 | <tr> |
215 | <td width="136"><font face="Arial" size="2">CPL.TXT</font></td> | |
216 | <td width="358"><font face="Arial" size="2">Common Public License</font></td> | |
216 | <td width="136"><font face="Arial" size="2">MS-PL.txt</font></td> | |
217 | <td width="358"><font face="Arial" size="2">Microsoft Public License</font></td> | |
217 | 218 | </tr> |
218 | 219 | <tr> |
219 | 220 | <td width="494" colspan="2"> </td> |
352 | 353 | <tr> |
353 | 354 | <td width="136"><font face="Arial" size="2"> MDIDocVw\...</font></td> |
354 | 355 | <td width="358"><font face="Arial" size="2">WTL version of the MDI sample</font></td> |
356 | </tr> | |
357 | <tr> | |
358 | <td width="136"><font face="Arial" size="2"> MemDlg\...</font></td> | |
359 | <td width="358"><font face="Arial" size="2">In-memory dialog sample</font></td> | |
355 | 360 | </tr> |
356 | 361 | <tr> |
357 | 362 | <td width="136"><font face="Arial" size="2"> MiniPie\...</font></td> |
1746 | 1751 | </ul> |
1747 | 1752 | <p style=margin:0in> </p> |
1748 | 1753 | <p style=margin:0in><font face="Arial" size="2">ATL/WTL AppWizard supports VC++ |
1749 | .NET 2002 and 2003, VC++ 2005, 2008, 2010, 2012, and 2013.</font></p> | |
1754 | .NET 2002 and 2003, VC++ 2005, 2008, 2010, 2012, 2013, and 2015.</font></p> | |
1750 | 1755 | <p style=margin:0in> </p> |
1751 | 1756 | <p style=margin:0in> </p> |
1752 | 1757 | <p style=margin:0in><b><font face="Arial"> |
1753 | 1758 | <a name="Support for Windows CE"></a>Support for |
1754 | 1759 | Windows CE</font></b></p> |
1755 | 1760 | <p style=margin:0in> </p> |
1756 | <p style=margin:0in><font face="Arial" size="2">WTL now fully supports building | |
1757 | projects for the Windows CE platforms. This initial support for Windows CE was implemented primarily for | |
1761 | <p style=margin:0in><font face="Arial" size="2">WTL fully supports building | |
1762 | projects for the Windows CE platforms. The initial support for Windows CE was implemented primarily for | |
1758 | 1763 | eMbedded Visual C++ 4.0 with Pocket PC 2003 and |
1759 | 1764 | SmartPhone 2003 SDKs. However, it can be used with other versions and |
1760 | 1765 | configurations. For instance, Standard SDK 4.1 or 5.0 is supported as well. Considerable effort was made to provide the best Windows CE support, |
1761 | 1766 | however, there might be some limitations because different platforms provide different |
1762 | programming support. SmartDevice projects with Visual Studio 2005 are also | |
1763 | supported, and it also includes an AppWizard for VS2005.</font></p> | |
1767 | programming support. SmartDevice projects with Visual Studio 2005 and 2008 are also | |
1768 | supported, and it also includes an AppWizard for VS2005 and VS2008.</font></p> | |
1764 | 1769 | <p style=margin:0in> </p> |
1765 | 1770 | <p style=margin:0in><font face="Arial" size="2">The support for Windows CE was |
1766 | 1771 | not designed to port projects for the desktop version of Windows as-is to the |
1775 | 1780 | <a name="Support for Visual C++ Express"></a>Support for |
1776 | 1781 | Visual C++ Express</font></b></p> |
1777 | 1782 | <p style=margin:0in> </p> |
1783 | <p style=margin:0in><font face="Arial" size="2">Note: Visual Studio Express is not the only or the best free development environment any more - <b>Visual Studio Community</b> provides a complete release of Visual Studio for free.</font></p> | |
1784 | <p style=margin:0in> </p> | |
1778 | 1785 | <p style=margin:0in><font face="Arial" size="2">WTL supports using Visual C++ Express Edition to build projects. Since Visual C++ Express ships without ATL, you have to use a version of ATL that ships with Windows Driver Kit 7.1.0 or Platform SDK (Windows Server 2003 R2 Platform SDK).</font></p> |
1779 | 1786 | <p style=margin:0in> </p> |
1780 | 1787 | <p style=margin:0in><font face="Arial" size="2">Windows Driver Kit 7.1.0 contains ATL version 8, while Platform SDK has ATL version 3. We recomend ATL from Windows Driver Kit since it is newer and better version. However, you can still use ATL from Platform SDK since WTL still fully supports ATL3.</font></p> |
1790 | 1797 | <li><font face="Arial" size="2">VC++ 2010 Express</font></li> |
1791 | 1798 | <li><font face="Arial" size="2">VC++ Express 2012 for Windows Desktop</font></li> |
1792 | 1799 | <li><font face="Arial" size="2">VC++ Express 2013 for Windows Desktop</font></li> |
1800 | <li><font face="Arial" size="2">VC++ Express 2015 for Windows Desktop</font></li> | |
1793 | 1801 | </ul> |
1794 | 1802 | <p style=margin:0in> </p> |
1795 | 1803 | <p style=margin:0in><font face="Arial" size="2">Supported ATL versions:</font></p> |
1799 | 1807 | </ul> |
1800 | 1808 | <p style=margin:0in> </p> |
1801 | 1809 | <p style=margin:0in><font face="Arial" size="2">Download Links:</font></p> |
1802 | <p style=margin:0in><font face="Arial" size="2"> <a target="_blank" href="http://www.microsoft.com/en-us/download/details.aspx?id=40787">Visual Studio Express 2013 for Windows Desktop</a></font></p> | |
1810 | <p style=margin:0in><font face="Arial" size="2"> <a target="_blank" href="https://www.visualstudio.com/downloads/download-visual-studio-vs#d-community">Visual Studio Community 2013 and 2015</a></font></p> | |
1811 | <p style=margin:0in><font face="Arial" size="2"> <a target="_blank" href="https://www.visualstudio.com/downloads/download-visual-studio-vs">Visual Studio Express 2013 and 2015 for Windows Desktop</a></font></p> | |
1803 | 1812 | <p style=margin:0in><font face="Arial" size="2"> <a target="_blank" href="http://www.microsoft.com/en-us/download/details.aspx?id=34673">Visual Studio Express 2012 for Windows Desktop</a></font></p> |
1804 | <p style=margin:0in><font face="Arial" size="2"> <a target="_blank" href="http://www.visualstudio.com/downloads/download-visual-studio-vs#DownloadFamilies_4">Visual Studio 2010 Express</a></font></p> | |
1805 | 1813 | <p style=margin:0in> </p> |
1806 | 1814 | <p style=margin:0in><font face="Arial" size="2"> <a target="_blank" href="http://www.microsoft.com/en-us/download/details.aspx?id=11800">Windows Driver Kit Version 7.1.0</a></font></p> |
1807 | 1815 | <p style=margin:0in> </p> |
1894 | 1902 | <p style=margin:0in> </p> |
1895 | 1903 | <p style=margin:0in> </p> |
1896 | 1904 | <p style=margin:0in><b><font face="Arial"> |
1897 | <a name="Changes Between WTL 9.0 And 8.0"></a>Changes Between WTL 9.0 And 8.0</font></b></p> | |
1905 | ||
1906 | <a name="Changes Between WTL 9.1 and 9.0"></a>Changes Between WTL 9.1 and 9.0</font></b></p> | |
1907 | <p style=margin:0in> </p> | |
1908 | <p style=margin:0in><font face="Arial" size="2">New and improved:</font></p> | |
1909 | <blockquote style='margin-top:0in;margin-bottom:0in'> | |
1910 | <p style=margin:0in><font face="Arial" size="2"> | |
1911 | Full compatibility with VS2015<br> | |
1912 | NuGet support and package<br> | |
1913 | Microsoft Public License (MS-PL)<br> | |
1914 | New sample: MemDlg - demonstrates use of in-memory dialogs | |
1915 | </blockquote> | |
1916 | <p style=margin:0in> </p> | |
1917 | <p style=margin:0in><font face="Arial" size="2">Fixes and enhancements:</font></p> | |
1918 | <blockquote style='margin-top:0in;margin-bottom:0in'> | |
1919 | <p style=margin:0in><font face="Arial" size="2"> | |
1920 | Fixes for code analysis warnings<br> | |
1921 | Fixes for strict const-qualification conformance (/Zc:strictStrings)<br> | |
1922 | CEditFindReplaceImpl::UseShadowBuffer(): Use AtlGetCommCtrlVersion() instead of GetProcAddress()<br> | |
1923 | Misc improvements: missing initialization, undefined messages, better #ifdefs<br> | |
1924 | CFrameWndClassInfo: Use GetSystemMetrics() for icon sizes<br> | |
1925 | BEGIN_MSG_MAP_EX and BEGIN_DDX_MAP: Fix for C4555: expression has no effect<br> | |
1926 | CResource::LoadEx(): Fix for the wrong order for parameters to ::FindResourceEx()<br> | |
1927 | CPaneContainerImpl:</font></p> | |
1928 | <ul style='margin-top:0in;margin-bottom:0in'> | |
1929 | <li><p style=margin:0in><font face="Arial" size="2">New extended styles: PANECNT_DIVIDER and PANECNT_GRADIENT</font></p></li> | |
1930 | <li><p style=margin:0in><font face="Arial" size="2">Fixed background drawing for close button</font></p></li> | |
1931 | </ul> | |
1932 | <p style=margin:0in><font face="Arial" size="2"> | |
1933 | CImageListManaged: Fix for assert when using attach or operator =<br> | |
1934 | WTLExplorer sample cleanup<br> | |
1935 | GenericWndClass::Register(): Fix for Windows CE<br> | |
1936 | App Wizard: Improved code for generating project configurations<br> | |
1937 | CSplitterImpl::OnCaptureChanged(): Fixed so it moves splitter bar only if move was in progress<br> | |
1938 | CDynamicUpdateUI::UIRemoveUpdateElement() leaks memory if UPDUI_TEXT is set<br> | |
1939 | CToolInfo and CToolTipCtrl: nIDTool argument should be UINT_PTR instead of UINT<br> | |
1940 | CSplitterImpl: Added GetSplitterPosPct()<br> | |
1941 | CCommandBarCtrlImpl: Fixed incorrect use of m_wndParent when AttachToWindow() is used | |
1942 | </blockquote> | |
1943 | <p style=margin:0in> </p> | |
1944 | <p style=margin:0in> </p> | |
1945 | <p style=margin:0in><b><font face="Arial"> | |
1946 | ||
1947 | <a name="Changes Between WTL 9.0 and 8.0"></a>Changes Between WTL 9.0 and 8.0</font></b></p> | |
1898 | 1948 | <p style=margin:0in> </p> |
1899 | 1949 | <p style=margin:0in><font face="Arial" size="2">New and improved:</font></p> |
1900 | 1950 | <blockquote style='margin-top:0in;margin-bottom:0in'> |
2015 | 2065 | <p style=margin:0in> </p> |
2016 | 2066 | <p style=margin:0in> </p> |
2017 | 2067 | <p style=margin:0in><b><font face="Arial"> |
2018 | <a name="Changes Between WTL 8.0 And 7.5"></a>Changes Between WTL 8.0 And 7.5</font></b></p> | |
2068 | <a name="Changes Between WTL 8.0 and 7.5"></a>Changes Between WTL 8.0 and 7.5</font></b></p> | |
2019 | 2069 | <p style=margin:0in> </p> |
2020 | 2070 | <p style=margin:0in><font face="Arial" size="2">New and improved:</font></p> |
2021 | 2071 | <blockquote style='margin-top:0in;margin-bottom:0in'> |
2346 | 2396 | <p style=margin:0in> </p> |
2347 | 2397 | <p style=margin:0in> </p> |
2348 | 2398 | <p style=margin:0in><b><font face="Arial"> |
2349 | <a name="Changes Between WTL 7.5 And 7.1"></a>Changes Between WTL 7.5 And 7.1</font></b></p> | |
2399 | <a name="Changes Between WTL 7.5 and 7.1"></a>Changes Between WTL 7.5 and 7.1</font></b></p> | |
2350 | 2400 | <p style=margin:0in> </p> |
2351 | 2401 | <p style=margin:0in><font face="Arial" size="2">New and improved:</font></p> |
2352 | 2402 | <blockquote style='margin-top:0in;margin-bottom:0in'> |
2696 | 2746 | <p style=margin:0in><br> |
2697 | 2747 | </p> |
2698 | 2748 | <p style=margin:0in><b><font face="Arial"> |
2699 | <a name="Changes Between WTL 7.1 And 7.0"></a>Changes Between WTL 7.1 And 7.0</font></b></p> | |
2749 | <a name="Changes Between WTL 7.1 and 7.0"></a>Changes Between WTL 7.1 and 7.0</font></b></p> | |
2700 | 2750 | <p style=margin:0in> </p> |
2701 | 2751 | <p style=margin:0in><font face="Arial" size="2">New and improved:</font></p> |
2702 | 2752 | <blockquote style='margin-top:0in;margin-bottom:0in'> |
3131 | 3181 | <p style=margin:0in> </p> |
3132 | 3182 | <p style=margin:0in> </p> |
3133 | 3183 | <p style=margin:0in><b><font face="Arial"> |
3134 | <a name="Changes Between WTL 7.0 And 3.1"></a>Changes Between WTL 7.0 And 3.1</font></b></p> | |
3184 | <a name="Changes Between WTL 7.0 and 3.1"></a>Changes Between WTL 7.0 and 3.1</font></b></p> | |
3135 | 3185 | <p style=margin:0in> </p> |
3136 | 3186 | <p style=margin:0in><font face="Arial" size="2">New classes and features:</font></p> |
3137 | 3187 | <blockquote style='margin-top:0in;margin-bottom:0in'> |
3394 | 3444 | <p style=margin:0in> </p> |
3395 | 3445 | <p style=margin:0in> </p> |
3396 | 3446 | <p style=margin:0in><b><font face="Arial"> |
3397 | <a name="Changes Between WTL 3.1 And 3.0"></a>Changes Between WTL 3.1 And | |
3447 | <a name="Changes Between WTL 3.1 and 3.0"></a>Changes Between WTL 3.1 and | |
3398 | 3448 | 3.0</font></b></p> |
3399 | 3449 | <p style=margin:0in> </p> |
3400 | 3450 | <p style=margin:0in><font face="Arial" size="2">New classes:</font></p> |