Is there any way to add images onto your program?
I'm using Dev-C++
Thanx
Depends how you program. If you're programming a GUI, like with win32api or mfc maybe, it's a doddle. There's this for displaying a picture in dos - http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1044665557&id=1043284392 but I don't know if it works.
It is also possible to do graphics in a console window but I dont know if it what you are looking for. You could easily use BitBlt instead of just LineTo but here is an example:
#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;
}
I'm using win32, and I'm just trying to put any image on, with words as well.
Just like a babyish picutre book.......
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.