Click here to Skip to main content
15,867,568 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionPrecision Timing? Sleep(1)=15 millisecs !! Pin
Robert Palma Jr.31-May-06 8:57
Robert Palma Jr.31-May-06 8:57 
AnswerRe: Precision Timing? Sleep(1)=15 millisecs !! Pin
David Crow31-May-06 9:16
David Crow31-May-06 9:16 
AnswerRe: Precision Timing? Sleep(1)=15 millisecs !! Pin
Zac Howland31-May-06 9:23
Zac Howland31-May-06 9:23 
QuestionThreads Pin
Anthony988731-May-06 8:56
Anthony988731-May-06 8:56 
AnswerRe: Threads Pin
valikac31-May-06 10:04
valikac31-May-06 10:04 
GeneralRe: Threads Pin
Anthony988731-May-06 14:42
Anthony988731-May-06 14:42 
GeneralRe: Threads Pin
valikac31-May-06 14:46
valikac31-May-06 14:46 
QuestionGetting screen coordinated from a window [modified] Pin
Ista31-May-06 8:50
Ista31-May-06 8:50 
Using spy++ I find a window.

But, I need to get the screen coords for the window so I can place a the mouse there. Can anyone tell me how or what API function I can use to get the actual screen coordinates of the window.

Please

this is what I currently have

RECT myRect2 = new RECT();
GetWindowRect(hwnd, out myRect2);

int posx = (myRect2.right - myRect2.left) / 2;
int posy = (myRect2.bottom - myRect2.top) / 2;

where hwnd is the handle of the wind returned from EnumChildWindows

Is this right or wrong? My SendInput doesn't appear to be working correctly.

1 line of code equals many bugs. So don't write any!!

-- modified at 14:50 Wednesday 31st May, 2006
QuestionRe: Getting screen coordinated from a window [modified] Pin
David Crow31-May-06 9:13
David Crow31-May-06 9:13 
AnswerRe: Getting screen coordinated from a window [modified] Pin
Ista31-May-06 9:18
Ista31-May-06 9:18 
GeneralRe: Getting screen coordinated from a window [modified] Pin
Zac Howland31-May-06 10:01
Zac Howland31-May-06 10:01 
QuestionArray of images [modified] Pin
sclore31-May-06 8:35
sclore31-May-06 8:35 
Questionhow to connect to a database like postgresql or mysql? Pin
ThinkingPrometheus31-May-06 8:00
ThinkingPrometheus31-May-06 8:00 
AnswerRe: how to connect to a database like postgresql or mysql? Pin
David Crow31-May-06 8:38
David Crow31-May-06 8:38 
GeneralRe: how to connect to a database like postgresql or mysql? Pin
ThinkingPrometheus31-May-06 8:58
ThinkingPrometheus31-May-06 8:58 
GeneralRe: how to connect to a database like postgresql or mysql? Pin
David Crow31-May-06 9:09
David Crow31-May-06 9:09 
AnswerRe: how to connect to a database like postgresql or mysql? Pin
Eric Dahlvang31-May-06 10:11
Eric Dahlvang31-May-06 10:11 
AnswerRe: how to connect to a database like postgresql or mysql? Pin
markkuk31-May-06 12:54
markkuk31-May-06 12:54 
GeneralPOP3 SERVER [modified] Pin
hahayk31-May-06 7:05
hahayk31-May-06 7:05 
AnswerRe: POP3 SERVER Pin
leppie31-May-06 7:13
leppie31-May-06 7:13 
GeneralRe: POP3 SERVER Pin
Nish Nishant31-May-06 7:16
sitebuilderNish Nishant31-May-06 7:16 
GeneralRe: POP3 SERVER Pin
ThatsAlok31-May-06 22:16
ThatsAlok31-May-06 22:16 
GeneralRe: POP3 SERVER Pin
toxcct31-May-06 7:16
toxcct31-May-06 7:16 
GeneralRe: POP3 SERVER Pin
Nish Nishant31-May-06 7:22
sitebuilderNish Nishant31-May-06 7:22 
GeneralRe: POP3 SERVER Pin
Zac Howland31-May-06 7:23
Zac Howland31-May-06 7:23 

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.