Click here to Skip to main content
15,880,392 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Routing Enter/Return key press to a Dialog Pin
Albert Holguin15-Jun-11 5:12
professionalAlbert Holguin15-Jun-11 5:12 
QuestionRe: Routing Enter/Return key press to a Dialog Pin
David Crow15-Jun-11 5:57
David Crow15-Jun-11 5:57 
QuestionProblem in creating dsn using sqlconfigdatasource() Pin
shashankacharya15-Jun-11 0:58
shashankacharya15-Jun-11 0:58 
AnswerRe: Problem in creating dsn using sqlconfigdatasource() Pin
David Crow15-Jun-11 2:09
David Crow15-Jun-11 2:09 
AnswerRe: Problem in creating dsn using sqlconfigdatasource() Pin
gaspher17-Jun-11 13:06
gaspher17-Jun-11 13:06 
QuestionVPN Server and Client Pin
dwk0014-Jun-11 22:34
dwk0014-Jun-11 22:34 
QuestionEquation for a straight line Pin
Cyclone_S14-Jun-11 13:48
Cyclone_S14-Jun-11 13:48 
AnswerRe: Equation for a straight line Pin
tolw14-Jun-11 19:27
tolw14-Jun-11 19:27 
1. Think about how fast you want the box to go - i.e. how many timer ticks should it take. For example:

NumberOfTicks = 10;

2. Look at the coordinates independently.

DistanceX = 291 - 9 = 282
DistanceY = 178 - 6 = 172

3. Calculate the step needed in each tick to get there in time. Careful! It may not be precise if you use ints - but that's not a problem:

StepX = 282 / NumberOfTicks ~= 28
StepY = 172 / NumberOfTicks ~= 17

4. Change the box position by the given step in each timer tick. Because the steps are rounded down (see step 3) you should also store the end position you want to get to and move the box there in the last step (not too elegant, but it will get the job done without anyone noticing).

Sure hope this helps, but seriously if this math is too complex to figure out you've got a long way to go my friend. Best of luck to you.
GeneralRe: Equation for a straight line Pin
Cyclone_S15-Jun-11 10:31
Cyclone_S15-Jun-11 10:31 
GeneralRe: Equation for a straight line Pin
tolw15-Jun-11 18:56
tolw15-Jun-11 18:56 
GeneralRe: Equation for a straight line Pin
Stefan_Lang15-Jun-11 23:48
Stefan_Lang15-Jun-11 23:48 
GeneralRe: Equation for a straight line Pin
Cyclone_S17-Jun-11 15:13
Cyclone_S17-Jun-11 15:13 
QuestionWhy is there no cfind() in the std containers? Pin
Craig Longman14-Jun-11 12:15
Craig Longman14-Jun-11 12:15 
AnswerRe: Why is there no cfind() in the std containers? Pin
Stefan_Lang15-Jun-11 23:19
Stefan_Lang15-Jun-11 23:19 
GeneralRe: Why is there no cfind() in the std containers? Pin
Craig Longman20-Jun-11 12:59
Craig Longman20-Jun-11 12:59 
Question[SOLVED]CWebBrowser2 not getting displayed on a dialog in a dll. [modified] Pin
chandu00414-Jun-11 11:26
chandu00414-Jun-11 11:26 
AnswerRe: CWebBrowser2 not getting displayed on a dialog in a dll. Pin
chandu00414-Jun-11 12:19
chandu00414-Jun-11 12:19 
AnswerRe: CWebBrowser2 not getting displayed on a dialog in a dll. Pin
pix_programmer14-Jun-11 21:08
pix_programmer14-Jun-11 21:08 
General[SOLUTION] Pin
chandu00417-Jun-11 11:19
chandu00417-Jun-11 11:19 
Questionconvert short to Cstring... Pin
spalanivel14-Jun-11 2:27
spalanivel14-Jun-11 2:27 
AnswerRe: convert short to Cstring... Pin
వేంకటనారాయణ(venkatmakam)14-Jun-11 2:37
వేంకటనారాయణ(venkatmakam)14-Jun-11 2:37 
GeneralRe: convert short to Cstring... Pin
Albert Holguin14-Jun-11 3:29
professionalAlbert Holguin14-Jun-11 3:29 
AnswerRe: convert short to Cstring... Pin
Richard MacCutchan14-Jun-11 2:41
mveRichard MacCutchan14-Jun-11 2:41 
AnswerRe: convert short to Cstring... Pin
Cool_Dev15-Jun-11 3:45
Cool_Dev15-Jun-11 3:45 
Question[SOLVED] Problem with adding set of strings from registry to combobox [modified] Pin
Gaurav Paul14-Jun-11 0:45
Gaurav Paul14-Jun-11 0:45 

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.