op2_sdk:textdialogbox

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
op2_sdk:textdialogbox [2016/10/12 21:32] – external edit 127.0.0.1op2_sdk:textdialogbox [2016/12/28 19:03] (current) vagabond
Line 50: Line 50:
 To add a resource script file and associated resource header: 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.+  - Right click on your project in the solution explorer. -> Add -> New Item... -> Visual C++ -> Resource -> Resource File (.rc) -> Add. (Using the default filename is fine.)
  
-Resource Scripts by default is placed in the Resource Files filter in the Solution Explorer. Use the Solution Explorer (or your favorite text editor) to open the file file in text view. You can also access the Resource Script from the Visual Studio Resource View, which defaults to opening on the left side of Visual Studio. The Resource View allows graphical depiction of Dialog Boxes defined in the resource script file. Alternative programs like Resource Hacker can also load Resource Scripts.+By default resource Scripts are placed in the Resource Files filter in the Solution Explorer. Use the Solution Explorer (or your favorite text editor) to open the file file in text view. You can also access the Resource Script from the Visual Studio Resource View, which defaults to opening on the left side of Visual Studio. The Resource View allows graphical depiction of Dialog Boxes defined in the resource script file. Alternative programs like Resource Hacker can also load Resource Scripts.
  
 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. 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.
Line 243: Line 243:
 //{{NO_DEPENDENCIES}} //{{NO_DEPENDENCIES}}
 // Microsoft Visual C++ generated include file. // Microsoft Visual C++ generated include file.
-// Used by RisingFromTheAshes.rc+// Used by Resource.rc
 // //
 #define IDR_MISSIONTEXT                 102 #define IDR_MISSIONTEXT                 102
Line 268: Line 268:
 Once the resource script and resource header have been included, the briefing screen must be initialized from the code. You will also have to include the Sierra library odasl in your project to ensure the dialog is formatted similar to other Outpost 2 menus. Once the resource script and resource header have been included, the briefing screen must be initialized from the code. You will also have to include the Sierra library odasl in your project to ensure the dialog is formatted similar to other Outpost 2 menus.
  
-  - Add odasl.h and odasl.lib to your project. Typically, files are placed in a subfolder/project filter.+  - Add a reference to the Outpost2Dialog project, which can be found with the rest of the APIs. odasl.h and odasl.lib are contained in this project and are required to skin the Dialog Window in the Outpost 2 theme.
   - Create a reference to the DLL instance from DllMain (HINSTANCE hInst).   - Create a reference to the DLL instance from DllMain (HINSTANCE hInst).
   - Add code to initialize and open the window. Typically this code is placed in it's own cpp file named briefing.cpp.   - Add code to initialize and open the window. Typically this code is placed in it's own cpp file named briefing.cpp.
  • op2_sdk/textdialogbox.txt
  • Last modified: 2016/12/28 19:03
  • by vagabond