My Dependency Package for Microsoft Visual C++ 2005 Beta 2

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
Acrion
Just popping in
Just popping in
Posts: 18
Joined: Tue Jun 28, 2005 18:45
Location: Maine, USA
Contact:

My Dependency Package for Microsoft Visual C++ 2005 Beta 2

Postby Acrion » Sat Jul 02, 2005 06:53

Hello everyone, I've been watching CEGUI for some time now. I decided I'd get started on playing around with it. First challenge, Microsoft Visual C++ 2005 Beta 2. MSVC 8.0 can be a pain because it is the first Microsoft product to actually follow most of the rules.

I managed to compile the required libraries and CEGUI itself in MSVC++ 8.0. Fully functional minus OGRE and Irrlicht.

This is all tested with 0.3.0.

Everything on this post assumes default locations. If you're a programmer, I have no doubt you can remap any pathes accordingly.

Including the combination of the latest DirectX SDKs (Lib and Header only):
22.3 MB CEGUI 0.3.0 - MSVC 2005 Dependency Package

Excluding the DirectX SDKs:
11.4 MB CEGUI 0.3.0 - MSVC 2005 Dependency Package (Compact)

I will leave these links up for about 30 days.

[color=993333]ADDED[/color] - OpenGL
Step 1: Grab GLUT from here: http://www.xmission.com/~nate/glut.html
Step 2: Extract the .h to C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include
Step 3: Extract the .lib to C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Lib
Step 4: Extract the .dll to C:\Windows\System32

Please let me know if you have any questions or comments.

User avatar
Acrion
Just popping in
Just popping in
Posts: 18
Joined: Tue Jun 28, 2005 18:45
Location: Maine, USA
Contact:

Re: My Dependency Package for Microsoft Visual C++ 2005 Beta

Postby Acrion » Sat Jul 02, 2005 07:15

Two more things I had to change for everything to compile:

Code: Select all

File: Win32CEGuiRendererSelector.cpp:442

* int Win32CEGuiRendererSelector::copyAnsiToWideChar(LPBYTE outBuff, PTSTR ansiString)
* {
-    LPWORD pWCStr = reinterpret_cast<LPWORD>(outBuff);
+    LPWSTR pWCStr = reinterpret_cast<LPWSTR>(outBuff);

* #   ifdef UNICODE
*     return lstrlen(lstrcpy(pWCStr, ansiString)) + 1;
* #   else
*     int cchAnsi = lstrlen(ansiString);
*     return MultiByteToWideChar(GetACP(), MB_PRECOMPOSED, ansiString, cchAnsi, pWCStr, cchAnsi) + 1;
* #   endif
* }


Anything that gives you a link error (DirectX81GUIRenderer and DirectX9GUIRenderer primarily), add the following to the end of:

Code: Select all

Project Properties, Configuration Properties\Linker\Input, Addtional Dependencies:

Add for both Debug and Release in the Configuration Combobox:

Code: Select all

 kernel32.lib gdi32.lib user32.lib AdvAPI32.Lib
[font=Verdana][size=xx-small]"It's not hard to stand out when the general level of competence is so low" -EMH[/size][/font]
namik@flashmail.com

User avatar
Acrion
Just popping in
Just popping in
Posts: 18
Joined: Tue Jun 28, 2005 18:45
Location: Maine, USA
Contact:

XP Themes in Microsoft Visual C++ 2005 Beta 2

Postby Acrion » Sat Jul 02, 2005 07:50

I'm not sure how many people would actually care but an up to date game or application should take full advantage of all current operating system benefits. Here's Window XP's themes in MSVC++ 2005.

Please note: Typically InitCommonControls (not Ex) is used. I found that it may not be friendly with CEGUI.

This applies to the Sample_FirstWindow.

1. Add the following code to run on a startup.

Win32AppHelper.cpp:53

Code: Select all

HWND Win32AppHelper::createApplicationWindow(int width, int height)
{
+   INITCOMMONCONTROLSEX ccex;
+   ccex.dwSize = sizeof(ccex);
+   ccex.dwICC = ICC_WIN95_CLASSES;
+   InitCommonControlsEx(&ccex);



2. Add these headers to the .cpp that will run the lines above.

Win32AppHelper.cpp:29

Code: Select all

   #include <commctrl.h>
   #pragma comment(lib, "comctl32.lib")



3. Create a file named Themes.manifest with your source.

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
    <dependentAssembly>
        <assemblyIdentity
            type="win32"
            name="Microsoft.Windows.Common-Controls"
            version="6.0.0.0"
            processorArchitecture="X86"
            publicKeyToken="6595b64144ccf1df"
            language="*"
        />
    </dependentAssembly>
</dependency>
</assembly>


4. Right-click on your project in the Solution Explorer.

5. Click Properties.

6. Repeat for Debug and Release (in Configuration drop list)

A. Enter Configuration Properties\Manifest Tool\Input and Output\Additional Manifest Files

B. Click in the field then click the ellipsis (...) buton.

C. Add the file your create in Step 3.

7. Now when you run, you should have XP Themes on your Renderer Selector dialog box.

An additional check should be made to check versioning.

InitCommonControlsEx goes back to Window 95 with MSIE 3.0 Installed.
InitCommonControls goes back to Windows 95 First Release. It may not function correctly or crash.

InitCommonControlsEx
InitCommonControls
[font=Verdana][size=xx-small]"It's not hard to stand out when the general level of competence is so low" -EMH[/size][/font]

namik@flashmail.com

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: My Dependency Package for Microsoft Visual C++ 2005 Beta

Postby CrazyEddie » Sun Jul 03, 2005 09:38

Cool :)

Thanks for all this information; you might consider wiki-fying it also.

The Win32CEGuiRendererSelector.cpp change should be backwards compatible, so that should be put that in CVS shortly.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: Bing [Bot] and 16 guests