Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Programming Bitmaps
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
JoeC  
View profile   Translate to Translated (View Original)
 More options 8 Nov, 23:03
Newsgroups: comp.lang.c++
From: JoeC <enki...@yahoo.com>
Date: Sun, 8 Nov 2009 15:03:40 -0800 (PST)
Local: Sun 8 Nov 2009 23:03
Subject: Programming Bitmaps
I am not sure where to ask this about how to program a bitmap.  I
would like to create a drawing program where I can manipulate bitmaps
in win32.  I have done it in Direct X but it seems really different in
win32.  I have created a drawing program that creates binary color
graphics but I would like to find out how I can program a bitmap in c+
+.

I am realize that this groups is about C++ so I am looking for a place
I can ask this question.

So far I have this:

void paint(HDC hdc, HWND hwnd){

     int dwn, acc = 16;
     int accLoc, dnLoc = 100;

     DWORD palet[16];
     palet[0] = 0xffffff;
     palet[1] = 0x000000;
     palet[2] = 0xff0000;
     palet[3] = 0x00ff00;
     palet[4] = 0x0000ff;

     int data[] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
             1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
             1,1,2,2,2,2,2,2,2,2,2,2,2,2,1,1,
             1,1,2,2,2,2,2,2,2,2,2,2,2,2,1,1,
             1,1,2,2,3,3,3,2,2,3,3,3,2,2,1,1,
             1,1,2,2,3,3,3,4,4,3,3,3,2,2,1,1,
             1,1,2,2,3,3,3,4,4,3,3,3,2,2,1,1,
             1,1,2,2,0,0,0,0,0,0,0,0,2,2,1,1,
             1,1,2,2,0,0,0,0,0,0,0,0,2,2,1,1,
             1,1,2,2,2,2,2,2,2,2,2,2,2,2,1,1,
             1,1,2,2,0,0,0,0,0,0,0,0,2,2,1,1,
             1,1,2,2,2,2,2,2,2,2,2,2,2,2,1,1,
             1,1,2,2,3,3,3,2,2,3,3,3,2,2,1,1,
             1,1,2,2,3,3,3,4,4,3,3,3,2,2,1,1,
             1,1,2,2,3,3,3,4,4,3,3,3,2,2,1,1,
             1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
             1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};

//Basically what I want to do is create the pallet then have an array
of bits that display the image as colors.

     BITMAP bitmap = {0,16,16,4,1,1};
     bitmap.bmBits = data;
     HBITMAP hbitmap = CreateBitmapIndirect(&bitmap);

  hdc = GetDC(hwnd);
  HDC hdcmem = CreateCompatibleDC(hdc);
  SelectObject(hdcmem, hbitmap);
  BitBlt(hdc,100, 100,16, 16 , hdcmem, 2, 1, SRCCOPY);
  DeleteDC(hdcmem);
  ReleaseDC(hwnd, hdc);


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Victor Bazarov  
View profile   Translate to Translated (View Original)
 More options 8 Nov, 23:43
Newsgroups: comp.lang.c++
From: Victor Bazarov <v.Abaza...@comAcast.net>
Date: Sun, 08 Nov 2009 18:43:56 -0500
Local: Sun 8 Nov 2009 23:43
Subject: Re: Programming Bitmaps

JoeC wrote:
> I am not sure where to ask this about how to program a bitmap.  I
> would like to create a drawing program where I can manipulate bitmaps
> in win32.  I have done it in Direct X but it seems really different in
> win32.  I have created a drawing program that creates binary color
> graphics but I would like to find out how I can program a bitmap in c+
> +.

> I am realize that this groups is about C++ so I am looking for a place
> I can ask this question.

Depends on what exactly you need to know, it should be either the Win32
newsgroup or the graphics newsgroup (comp.graphics.algorithms) or
something pretty much entirely different (if you're looking for, say,
encryption or compression algorithms)...

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JoeC  
View profile   Translate to Translated (View Original)
 More options 11 Nov, 02:37
Newsgroups: comp.lang.c++
From: JoeC <enki...@yahoo.com>
Date: Tue, 10 Nov 2009 18:37:50 -0800 (PST)
Local: Wed 11 Nov 2009 02:37
Subject: Re: Programming Bitmaps
On Nov 8, 5:43 pm, Victor Bazarov <v.Abaza...@comAcast.net> wrote:

Thanks.

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google