I am new to C++ and win32 app..
I use VC++ ..I can create some app using MFC wizard ..
***The first thing I want to do is how to add an image to my app
***The second thing is how can I write a "coloured text"
if you give me some examples ,I will be glad..
: I am new to C++ and win32 app..
: I use VC++ ..I can create some app using MFC wizard ..
: ***The first thing I want to do is how to add an image to my app
: ***The second thing is how can I write a "coloured text"
: if you give me some examples ,I will be glad..
Sorry for the late reply, I don't visit this section very often :-)
You can load and display images very easily using the Win32 API.
Simply use ::LoadImage (), to get an HBITMAP. Then, select the
HBITMAP into a offscreen DC, that can be blitted (Using BitBlt() )
to the primary window. Keep in mind, this is very windows specific,
and will not work for other platforms. It is also very slow working
with the Win32 GDI., hence I don't recommend it for any program requiring
speed--such as video games.
Also, keep in mind that graphical images don't work with text modes at all.
You can easily use the Win32 API to also set different colors for
text output. Once more, it is system dependent. settextcolor() can
be found in . Please note, it is not portable.
Because you are still new to C++, I [b]highley[/b] recommend not
worring about graphics until you learn OOD concepts, and know how
to impliment them. Graphics programming can get quite complex,
espically if you are still learning the ropes of a language.
[hr][size=1][leftbr].:EvolutionEngine[rightbr][leftbr].:MicroOS Operating System[rightbr][leftbr][link=http://www.mt2002.sitesled.com]Website :: OS Development Series[rightbr][/link][/size]