e3 Real Estate Website Templates

Welcome Guest (Register -  Login)  Active Topics Active Topics Display List of Forum Members Memberlist Search The Forum Search Help Help
 Navigation
 Skin Chooser

Choose Skin:


There are 2 skins total.
The newest skin is Classis Default

 Latest Forum Posts

DirectInput
 C++ GamesDirectInput
Subject Topic: DirectInput and Windows messages Post ReplyPost New Topic
 DirectInput and Windows messages
<< Prev Topic | Next Topic >>
PezMutanT
Posted: 09-January-2008 at 6:57am | IP Logged Quote PezMutanT

Newbie
Newbie


Group: Newbie
Joined: 09-January-2008
Location: Spain
Posts: 1
Hi! I'm new at this forum, so this is my first post. Hi everyone!! :D

I'm quite familiar with DirectInput setting up (creating DirectInput interface, creating devices, ...) but I really don't know what to do about Windows message queue.

If I use DirectInput for managing user input, does it mean that I have to completely forget about managing Windows messages? An example:

while (1)
    {
        if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
        {
            if(msg.message == WM_QUIT)
                break;

            TranslateMessage(&msg);
            DispatchMessage(&msg);
            ProcessKBInput();
            Render();
        }
        else
        {
        }
    }

Here I manage keyboard input with ProcessKBInput() function and manage Direct3D stuff with Render() function.

My question is: are ProcessKBInput() and Render() calls well where they are? Should I move them to the "else" part of the loop? Where should I call this functions?

I hope was clear. Thank you very much for your help! Keep up this good work!! ;)
 
Online Status: Offline
View PezMutanT's Profile Search for other posts by PezMutanT Back to Top
 
1 User(s) are browsing this topic, 1 Guest(s) and 0 Member(s)
0 Members:
<< Prev Topic DirectInput Next Topic >>

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.2031 seconds.

[ Users browsing page: none ]



Terms and Conditions | Privacy | Contact Us

Copyright © 2010 Cpp Games. All rights reserved.

This site is best viewed at 1024x768 screen resolution.
Back to Top

Designed by Micronet Technologies