Click here to Skip to main content
15,909,539 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ImageList_Create,ImageList_AddIcon,ListView_SetImageList gives linking error [modified] Pin
amitmistry_petlad 20-Feb-07 19:30
amitmistry_petlad 20-Feb-07 19:30 
QuestionControlling Move Speed Pin
T.RATHA KRISHNAN20-Feb-07 17:32
T.RATHA KRISHNAN20-Feb-07 17:32 
AnswerRe: Controlling Move Speed Pin
Stephen Hewitt20-Feb-07 19:00
Stephen Hewitt20-Feb-07 19:00 
GeneralRe: Controlling Move Speed Pin
T.RATHA KRISHNAN20-Feb-07 19:17
T.RATHA KRISHNAN20-Feb-07 19:17 
GeneralRe: Controlling Move Speed Pin
Stephen Hewitt20-Feb-07 19:21
Stephen Hewitt20-Feb-07 19:21 
GeneralRe: Controlling Move Speed Pin
T.RATHA KRISHNAN20-Feb-07 19:36
T.RATHA KRISHNAN20-Feb-07 19:36 
GeneralRe: Controlling Move Speed Pin
Stephen Hewitt20-Feb-07 19:41
Stephen Hewitt20-Feb-07 19:41 
GeneralRe: Controlling Move Speed Pin
T.RATHA KRISHNAN20-Feb-07 23:36
T.RATHA KRISHNAN20-Feb-07 23:36 
It's a member variable only. It's declared in a class called PerspectiveView which is derived from CView Class. Once again I'm giving the full details.


I've a Gaming project devolped in VC++(MFC) using NetImmerse Engine. If I execute this project a window will open. If select Menu File->Open a tree of objects(VPF Files) is displayed. If I select a particular object, I can move or rotate using menus or tools provided in the window. My problem is related to controlling the move speed. Movement is taking place when we move the mouse. Code for moving the object is written using ON_WM_MOUSEMOVE() Message handler.

The code for Horizontal move speed is:

float m_kHorz = (float) (point.x - m_kScreenCenter[0]);
if (fabs(m_kHorz) <= HORIZONTAL_DEAD_ZONE)
m_kHorz = 0.0f;
else
{
if (m_kHorz < 0.0f)
m_kHorz += (float)HORIZONTAL_DEAD_ZONE;
else
m_kHorz -= (float)HORIZONTAL_DEAD_ZONE;
}
I'll give the definitions:
m_kHorz is the horizontal distance the object is moving from the centre.

HORIZONTAL_DEAD_ZONE is a constant it's value is 25.

Let me tell my problem. The object is moving but the move speed is not constant. When I move the object very much away from the centre(i.e m_kScreenCenter[0]), the speed starts decreasing. I want a uniform move speed.

How can I do this?
QuestionHow do we add vertical scroll bar for dialog based application? Pin
Super Hornet20-Feb-07 16:13
Super Hornet20-Feb-07 16:13 
AnswerRe: How do we add vertical scroll bar for dialog based application? Pin
Nibu babu thomas20-Feb-07 17:32
Nibu babu thomas20-Feb-07 17:32 
AnswerRe: How do we add vertical scroll bar for dialog based application? Pin
Hamid_RT20-Feb-07 17:33
Hamid_RT20-Feb-07 17:33 
QuestionDetect color Using C++ Pin
ricardo montemayor20-Feb-07 14:21
ricardo montemayor20-Feb-07 14:21 
AnswerRe: Detect color Using C++ Pin
Hamid_RT20-Feb-07 17:35
Hamid_RT20-Feb-07 17:35 
GeneralRe: Detect color Using C++ Pin
prasad_som20-Feb-07 18:08
prasad_som20-Feb-07 18:08 
AnswerRe: Detect color Using C++ Pin
Stephen Hewitt20-Feb-07 19:24
Stephen Hewitt20-Feb-07 19:24 
AnswerRe: Detect color Using C++ Pin
Mark Salsbery21-Feb-07 8:50
Mark Salsbery21-Feb-07 8:50 
GeneralRe: Detect color Using C++ Pin
ricardo montemayor21-Feb-07 13:26
ricardo montemayor21-Feb-07 13:26 
GeneralRe: Detect color Using C++ Pin
Mark Salsbery21-Feb-07 14:48
Mark Salsbery21-Feb-07 14:48 
GeneralRe: Detect color Using C++ Pin
ricardo montemayor21-Feb-07 16:17
ricardo montemayor21-Feb-07 16:17 
GeneralRe: Detect color Using C++ Pin
Mark Salsbery21-Feb-07 16:43
Mark Salsbery21-Feb-07 16:43 
QuestionIntercepting Output from another application Pin
shatterstar645720-Feb-07 13:19
shatterstar645720-Feb-07 13:19 
AnswerRe: Intercepting Output from another application Pin
Stephen Hewitt20-Feb-07 13:27
Stephen Hewitt20-Feb-07 13:27 
AnswerRe: Intercepting Output from another application Pin
ThatsAlok21-Feb-07 6:10
ThatsAlok21-Feb-07 6:10 
QuestionUniversal Progress Dialog Pin
BuckBrown20-Feb-07 12:38
BuckBrown20-Feb-07 12:38 
AnswerRe: Universal Progress Dialog Pin
Stephen Hewitt20-Feb-07 12:41
Stephen Hewitt20-Feb-07 12:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.