Click here to Skip to main content
15,912,493 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Regarding USB Pin
Nibu babu thomas20-Feb-07 19:20
Nibu babu thomas20-Feb-07 19:20 
QuestionImageList_Create,ImageList_AddIcon,ListView_SetImageList gives linking error Pin
amitmistry_petlad 20-Feb-07 17:34
amitmistry_petlad 20-Feb-07 17:34 
AnswerRe: ImageList_Create,ImageList_AddIcon,ListView_SetImageList gives linking error Pin
Hamid_RT20-Feb-07 17:38
Hamid_RT20-Feb-07 17:38 
AnswerRe: ImageList_Create,ImageList_AddIcon,ListView_SetImageList gives linking error Pin
prasad_som20-Feb-07 18:07
prasad_som20-Feb-07 18:07 
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 
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 kHorz = (float) (point.x - m_kScreenCenter[0]);
if (fabs(kHorz) <= HORIZONTAL_DEAD_ZONE)
kHorz = 0.0f;
else
{
if (kHorz < 0.0f)
kHorz += (float)HORIZONTAL_DEAD_ZONE;
else
kHorz -= (float)HORIZONTAL_DEAD_ZONE;
}
I'll give the definitions:
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?
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 
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 

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.