•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 426,353 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,450 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C advertiser: Programming Forums
Views: 2685 | Replies: 1
•
•
Join Date: Feb 2006
Location: Illinois
Posts: 14
Reputation:
Rep Power: 3
Solved Threads: 0
I'm writting a program where I need the coordinates of the mouse when it's clicked inside the client area. For some reason, the coordinates seem to be in base 21, maybe higher (I've seen the character k). I'm not sure why this is happening.
Here's the mouse section of the message loop
Here's the mouse section of the message loop
case WM_LBUTTONDOWN:
{
int x = ((int)(short)LOWORD(lParam));
int y = ((int)(short)HIWORD(lParam));
char buf[20];
string s = itoa(x, buf, 21);
s += ", ";
s += itoa(y, buf, 21);
MessageBox(hwnd, s.c_str(), "Distance", MB_OK | MB_APPLMODAL);
return 0;
}•
•
•
•
•
•
•
•
DaniWeb C Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Creating A Table With Win32 Api (C++)
- Multicolumn combo box using win32 API (Visual Basic 4 / 5 / 6)
- anyone understand win32 api? (C)
- How to Install Perl Mod Win32-API (Perl)
- Win32 API Struct (Perl)
Other Threads in the C Forum
- Previous Thread: fstream
- Next Thread: Output to RTF



Threaded Mode