•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 375,200 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,227 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:
Views: 640 | Replies: 12
![]() |
Not only that, most people think that it is entirely impossible to do graphics in console applications. Heres the proof againts that:
#define _WIN32_WINNT 0x0500
#include<windows.h>
#include<iostream>
using namespace std;
int main() {
HWND console = GetConsoleWindow();
HDC hdc = GetDC(console);
SelectObject(hdc, CreatePen(0, 30, RGB(255,255,255)));
POINT p;
GetCursorPos(&p);
ScreenToClient(console, &p);
MoveToEx(hdc, p.x, p.y, NULL);
for (;;) {
GetCursorPos(&p);
ScreenToClient(console, &p);
LineTo(hdc, p.x, p.y);
Sleep(1);
}
ReleaseDC(console, hdc);
cin.ignore();
return 0;
} Well, programs used to always be made in console windows for example, Turbo C++ from before I was born would have fully text based menus and therefore need to be able to detect the cursor positions and mouse clicks.
http://www.weiqigao.com/blog/images/turbo-cpp.png
http://www.weiqigao.com/blog/images/turbo-cpp.png
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
- Check to see if a mouse click missed an object (Game Development)
- Mouse click (Visual Basic 4 / 5 / 6)
- Simulate Mouse Move (C++)
- How to store data in data grid to database by single mouse click in Asp.net (ASP.NET)
- Simulate Mouse Click (Visual Basic 4 / 5 / 6)
- Mouse Right Click Menu (Windows NT / 2000 / XP / 2003)
- Mouse buttons are messed up (Peripherals)
Other Threads in the C++ Forum
- Previous Thread: i dont understand how this code thing works to put up a program. what does it mean?
- Next Thread: Help me with txt!!!


Linear Mode