delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/08/22:48:13

From: "Damian Yerrick" <web DOT poison AT pineight DOT 8m DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: bmp->screen function
Date: Fri, 8 Oct 1999 18:30:34 -0500
Organization: Rose-Hulman Institute of Technology
Lines: 54
Message-ID: <7tluug$7nq$1@solomon.cs.rose-hulman.edu>
References: <37FD56E5 DOT 17F8 AT TU-Berlin DOT DE>
NNTP-Posting-Host: 137.112.205.146
X-Trace: solomon.cs.rose-hulman.edu 939425552 7930 137.112.205.146 (8 Oct 1999 23:32:32 GMT)
X-Complaints-To: news AT cs DOT rose-hulman DOT edu
NNTP-Posting-Date: 8 Oct 1999 23:32:32 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Klaus Reinhardt <K DOT Rdt AT TU-Berlin DOT DE> wrote in message
news:37FD56E5 DOT 17F8 AT TU-Berlin DOT DE...
> ----------------- mailto:K DOT Rdt AT TU-Berlin DOT DE start -------------------
> Hello!
>
> Perhaps it's not the right forum, but it's the list I have 'n like.
> Where I can get a function (perhaps in assembler), to put a graphic
> like the Win-Start on the screen. I would like to do so on my school
> computers and put on it a simple menue.
>
> Klaus.
> ----------------- mailto:K DOT Rdt AT TU-Berlin DOT DE !end! -------------------

If you want to put a graphic on the screen, try the Allegro library.
http://www.talula.demon.co.uk/allegro/
Once you have it installed into DJGPP, try this code in Allegro
under Win 95/98's DOS box:

#include <allegro.h>

int main(void)
{
  BITMAP *bmp;
  PALETTE pal;

  allegro_init();
  install_keyboard();
  if(set_gfx_mode(GFX_AUTODETECT, 320, 400, 0, 0) < 0)
  {
    exit(105);
  }

  bmp = load_bmp("C:\logo.sys", pal);
  if(bmp == NULL)
  {
    exit(69);
  }

  clear(screen);
  blit(bmp, screen, 0, 0, 0, 0, 320, 400);
  readkey();

  destroy_bitmap(bmp);
  return 0;
}

It should display something familiar... Maybe the win-start...


Damian Yerrick
http://come.to/yerrick


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019