Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revisionBoth sides next revision | ||
op2_sdk:textdialogbox [2016/03/28 02:44] – vagabond | op2_sdk:textdialogbox [2016/03/28 13:35] – vagabond | ||
---|---|---|---|
Line 14: | Line 14: | ||
Rich Text Format documents include metadata such as font and text color which are not available in text (.txt) format. Depending on the program used to open an RTF, the metadata may be hidden. Microsoft Word and Wordpad will default to showing just the text and the effect of the metadata on the text. Notepad or Notepad++ will show all of the metadata. | Rich Text Format documents include metadata such as font and text color which are not available in text (.txt) format. Depending on the program used to open an RTF, the metadata may be hidden. Microsoft Word and Wordpad will default to showing just the text and the effect of the metadata on the text. Notepad or Notepad++ will show all of the metadata. | ||
- | Outpost 2 uses Arial font size 10 for Campaign Mission Briefing Screens. | + | For campaign mission briefing screens, |
- | **Note:** //Although Microsoft Word can create and save RTF documents, it is not recommended. Microsoft Word adds large amounts of metadata to the document that is not necessary for Outpost 2, typically increasing a small amount of text from about 3 kb to about 50 kb.// | + | Typically, the RTF file is saved as briefing.rtf and added to the root directory of the scenario' |
+ | |||
+ | **Note:** //Although Microsoft Word can create and save RTF documents, it is not recommended. Microsoft Word adds large amounts of metadata to the document that is not necessary for Outpost 2, typically increasing a small amount of text from about 3 kb to about 50 kb. This file size increase will carry into the compiled DLL.// | ||
**Example RTF file** | **Example RTF file** | ||
Line 43: | Line 45: | ||
===== Adding a Resource Script (.rc) File ===== | ===== Adding a Resource Script (.rc) File ===== | ||
- | Microsoft Visual Studio will autogenerate | + | Resource script files are text documents describing resources associated with an executable or DLL. These include among other things Version Information, |
- | #ifdef // | + | To add a resource script file and associated resource header: |
+ | |||
+ | right click on your project in the solution explorer. -> Add -> New Item... -> Visual C++ -> Resource -> Resource File (.rc) -> Add. | ||
+ | |||
+ | Resource Scripts by default | ||
+ | |||
+ | Below is a sample resource script file that provides a dialog box before a scenario is initialized. The dialog box will include the contents of briefing.rtf in a rich text box. | ||
For more information on TEXTINCLUDE, | For more information on TEXTINCLUDE, | ||
+ | |||
+ | #ifdef // | ||
+ | |||
+ | #ifndef // | ||
+ | |||
+ | #undef // | ||
<code cpp> | <code cpp> | ||
Line 59: | Line 73: | ||
// Generated from the TEXTINCLUDE 2 resource. | // Generated from the TEXTINCLUDE 2 resource. | ||
// | // | ||
- | #include "afxres.h" | + | #include "winres.h" |
///////////////////////////////////////////////////////////////////////////// | ///////////////////////////////////////////////////////////////////////////// | ||
Line 120: | Line 134: | ||
2 TEXTINCLUDE | 2 TEXTINCLUDE | ||
BEGIN | BEGIN | ||
- | "# | + | "# |
" | " | ||
END | END |