Hello - I have a question about inheritance and polymorphism in C++. If one is making heavy use of inheritance and using a lot of pure virtual and plain virtual functions, are there any common practices for avoiding having the virtual functions staggered in confusing ways.

By that I mean having multiple classes in an inheritance chain and having overrides of virtual functions at different places along the chain.

Thanks,

Mike

Yay I figured it out. What was happening was that the graphics device was setup to go into fullscreen mode; after filling up the screen with the background (ie fullscreen), the window immediately switched back to a regular window with a menu at the top.

I'm still testing some of the functions, so I was doing everything in the Init() cycle. I was closing the graphics interface/device at the end of the Init() cycle. This had no effect on windowed mode, but I guess if the device is closed while in fullscreen mode and the application is still running, then the fullscreen window changes back to a regular window.

I'm writing an application with Directx 9. Where I start the application in full screen mode, the image fills to fullscreen and then immediately reverts into a regular window. There aren't any problems when I run the application in windowed mode from the start.

I was wondering if anyone has any ideas as to what may be causing this.

Some things to note are that I am running the debug version of directx and I am doing everything on one monitor. The fullscreen mode problem still occurs if I "Run without debugging"

Thanks,

Mike

ok

thanks for your answer

Hello,

I have recently started learning how to write games in DirectX 9 and I have a few questions. The first is about backwards compatibility. Is it correct to assume that if someone has DirectX 10 installed that they can play DirectX 9 stuff without downloading DirectX 9?

Also, I was wondering if anyone could tell me about loading PNG files with DirectX 9, as opposed to bitmaps.

Thanks,

Mike

I am planning on making games within the next few years. I have read a book on DirectX 7 (with excellent explanations), and right now I am going to start learning either DirectX 9 or DirectX 10. The advantage of DX 10 is that it is newer and better. However, DirectX 10 only works on Vista and later OS's (doesn't work on XP). DirectX 9 is also pretty good and it works on XP.

The games I am planning to make will probably be mostly 2D, so they don't require cutting edge 3D graphics.

I want the game to be fairly accessible to players. I don't know if enough people will be using Vista+ in the next 2 years or so to make using DX 10 a good idea.

Hello,

I made a website using ASP.NET 2.0, and it mainly consists of articles I have written. I would like to add a "comments" section after every article, where guests can leave comments and discussions - this may boost interactivity for my website.

Anyway, two things I have tried already are: InstaComment and Js-kit comments. Neither of them work properly. For example, InstaComment just gives me a blank box instead of a comments box (this is not related to the www forcing they mention on their website). When I paste the Js-kit code into the body, forms section of my code, it just doesn't show up on the page.

So does anyone here know any ways of adding comment sections (seperate one for each article) when using ASP.NET? That is, other than writing the comment system from scratch.

Thanks!

I recently added Video Units to my web page. For some reason, only a very low number o impressions are appearing. For example, I had 250 page impressions for Adsense Content and only 9 page impressions for video units. Is Video Units just slow at reporting the impressions, or is there some other issue?

I have been working through the book [U]Windows Game Programming for Dummies[/U] and so far it has been excellent. I am about half way through the book and I am planning on finishing.

However, the books is from 2002 and it uses DirectDraw7 for the graphics component of DirectX. It is my understanding that DirectDraw has been depreciated and that now Direct3D is used for both 3D and 2D graphics.

So the question is:

If I want to make a 2D game, would it be better to use DirectDraw or Direct3D. Also, how similar are the syntaxes between the two (ie: would I have to learn how to work with a lot of new classes if I were to learn Direct3D. Finally, does DirectDraw have better performace due to less overhead that Direct3D, or is this not the case.

Thanks,

Mike

Hello,

I'm trying to create a window with a C++ win32 app project. I am using creating the HWND object, setting its properties, and then registering the object. Also, there is a WindowProc function.

What seems to happen is that the object registers but when I call CreateWindowA(...), this function call fails and no window is created.

Also, it seems that Error 1407 is generated on the CreateWindowA call.

Here is the code, any help is appreciated:

[code=cplusplus]
// INCLUDES

define WIN32_LEAN_AND_MEAN

include <windows.h>

include <windowsx.h>

include <stdio.h>

include <math.h>

include <iostream>

// DEFINES

define WINDOW_CLASS_NAME "WINCLASS1"

// GLOBALS
HWND main_window_handle = NULL; // declares the window handle

// FUNCTIONS
LRESULT CALLBACK WindowProc(HWND hwnd, UINT msg, WPARAM wparam,
LPARAM lparam)
{

PAINTSTRUCT ps;
HDC hdc;

switch(msg)
{
    case WM_CREATE:
    {
        return(0);
    }   break;

    case WM_PAINT:
    {
        hdc = BeginPaint(hwnd, &ps);
        EndPaint(hwnd, &ps);
        return(0);
    }   break;

    case WM_DESTROY:
    {
        PostQuitMessage(0);
        return(0);
    } break;

    default: break;

}

return (DefWindowProc(hwnd, msg, wparam, lparam));

}

// WINMAIN
int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE hprevinstance,
LPSTR lpcmdline, int ncmdshow)
{
WNDCLASS winclass;
HWND hwnd;
MSG msg;

winclass.style = CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
winclass.lpfnWndProc = WindowProc;
winclass.cbClsExtra = 0;
winclass.cbWndExtra = 0;
winclass.hInstance = hinstance;
winclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
winclass.hCursor = LoadCursor(NULL, IDC_ARROW);
winclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
winclass.lpszMenuName = NULL;
winclass.lpszClassName = (LPCWSTR)WINDOW_CLASS_NAME;

if(!RegisterClass(&winclass))
    return(0);

hwnd = CreateWindowA(    WINDOW_CLASS_NAME,
                         "Hello Dave",
                         WS_OVERLAPPEDWINDOW | WS_VISIBLE,
                         0, 0,
                         320, 200,
                         NULL,
                         NULL,
                         hinstance,
                         NULL);

if(hwnd == NULL)
{
    return(0);
}

main_window_handle = hwnd;

while(1)
{
    if(PeekMessage(&msg, ...

I tried adding such a link to my ASP.NET website by using a Javascript:windows.addFavorites etc.etc. command (or something similar), but it doesn't work.

Does anyone know how to create such a link or button in ASP.NET so that if someone clicks this link, the Add Favorites windows will pop up automatically.

Thanks, Mike

I know that 3D games have the advantage of being able to transfer graphics processing onto the graphics card. Does anyone know if 2D graphics can also be handled by the graphics card (hardware rather than software)?

How do 3D and 2D graphics compare in terms of processing power usage?

Yea, the links are broken.

You can still go to these articles by typing the name of the article, ie:

beginning game development: part (#)

with (#) being the number of the tutorial,

into google

I got it to work!

It turns out that at the end of Part I (Introduction) of the tutorial and at the beginning of Part II of the tutorial, it says that it's necessary to comment out a bunch of code in dxmutmisc.cs (all regions within the namespace other than Timer and Native Methods).

After that it works, since the error generating code is just commented out.

I wish that it addressed this earlier in the tutorial.

I've seen at least a few posts about this problem on other websites, so this is what you have to do to get rid of the error, if anyone else is reading.

I've installed several different SDKs. Actually, I got the dxmutmisc.cs class from a June 2005 SDK (it's not in the newer ones). I think that either I have to add some more files (not sure exactly to what or why) or that the class is just out of date and has an error.

In the tutorial, the reason for using the class is to create a timer for the game. I read that there is a new StopWatch class that I could use from the newer SDKs. So I guess I'll try to use that even though I don't actually know what I'm doing.

I'm not sure about XNA... would I have any legal obligations to Microsoft? Also, can you customize as many features when using XNA?

Anyway, if I figure out how to use the StopWatch method, I might post the changes needed to the tutorial to use a different stopwatch.

Hi, this is my first post on this forum.

I am attempting to learn how to work with DirectX and make a game (Visual Studio 2005, C#). I found an extensive tutorial on DirectX games, but I can't find a necessary reference.

Here is a link to the tutorial: [url]http://blogs.msdn.com/coding4fun/archive/2006/11/02/938703.aspx[/url]

As instructed on the tutorial, I brought in a class called dxmutmisc.cs.
Then I wrote the following into that class: using Microsoft.Samples.DirectX.UtilityToolkit;

There were a number of errors, so I added the Microsoft.DirectX, Microsoft.DirectX.Direct3D, and Microsoft.DirectX.Direct3DX references.

However, it still gives me the following error:

The type or namespace named 'Framework' could not be found (are you missing a using directive or an assembly reference?)

I can't figure out what to do to get rid of this error.

Any help is greatly appreciated.