[gameprogrammer] Re: why Always C++

  • From: Bob Pendleton <bob@xxxxxxxxxxxxx>
  • To: gameprogrammer@xxxxxxxxxxxxx
  • Date: Sat, 08 Sep 2007 19:36:09 -0500

On Fri, 2007-09-07 at 09:40 -0700, Yasser Gonzalez Soto wrote:
> Why always C++ is choosed to gammeprogramming?
> 
> Delphi is really is really easy for this. My point is, how you load and  
> show an image in C++?
> 
> c++ code:

NO, this is not how you load and show and image in C++. It is how you do
it using what looks like the windows api. The windows API is *NOT* part
of C++. There is nothing that is part of C++ that addresses loading or
showing pictures. 

Please stop wasting time with this. Until you understand the difference
between a language and a library (api) you are just sounding silly.

        Bob Pendleton

>   HBITMAP hbitmap
>   CDC cdc;
>   CDC memDC;
>   HBITMAP oldbitmap;
> 
>   
> hbitmap=(HBITMAP)LoadImage(hInstance,IMAGE_BITMAP,FileName,0,0,LR_LOADFROMFILE);
> 
>   HDC hdc = GetDC(hwnd);
>   HDC image_dc = CreateCompatibleDC(hdc);     
> 
> 
>   HBITMAP old_hbitmap = (HBITMAP)SelectObject(image_dc,hbitmap);
> 
>   BitBlt(hdc,50,50,320,192,image_dc,0,0,SRCCOPY);
> 
> delphi code:
> 
>   bitmap:TBitmap;
> 
>   bitmap:=Tbitmap.Create;
>   bitmap.LoadFromFile(file_name);
> 
> 
> 
> Besides, that 'erase-screen-redraw-screen' business is troublesome
> 
> 
> 
>  
> 
> 
> ---------------------
> To unsubscribe go to http://gameprogrammer.com/mailinglist.html
> 
> 
> 
-- 
+--------------------------------------+
+ Bob Pendleton: writer and programmer +
+ email: Bob@xxxxxxxxxxxxx             +
+ web: www.GameProgrammer.com          +
+ www.Wise2Food.com                    +
+ nutrient info on 7,000+ common foods +
+--------------------------------------+



---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: