Solved

how to open a client window for bitmap ?

Posted on 2000-02-14
8
164 Views
Last Modified: 2013-11-20
My intention is to open a new window without any menu for displaying a bitmap picture, which i want to create with the CPaintDC->setPixel command. My image data ist stored on heap. What is the best way to do this ?
0
Comment
Question by:alexott
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 8

Expert Comment

by:VinExpert
ID: 2518514
Hi,

Do like this.
1. Using classwizard create a new class say CMyWnd derived from CWnd.
2. say u want to pop up this window in xxxx.cpp, then go to xxxx.h and add the #include "MyWnd.h" to it.
3. Then add the public variable as
CMyWnd *pWnd;
4. In the xxxx.cpp file constructor do
pWnd = NULL;
5. Then whenever U want to pop it up do

CRect rect(10,10,200,200);
pWnd = new CMyWnd;
pWnd->Create(NULL, "MTV", WS_CHILD | WS_VISIBLE | WS_CAPTION | WS_SYSMENU, rect, this, 4545, NULL);
pWnd->ShowWindow(SW_SHOW);

6. U can map the WM messages to the CMyWnd class like WM_PAINT and handle them.

Try it out.
VinExpert
0
 

Author Comment

by:alexott
ID: 2521760
answer does not tell me anything about bitmaps and how to pu them into a new window
0
 

Author Comment

by:alexott
ID: 2521761
This question has a deletion request Pending
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:alexott
ID: 2521763
answer does noct tell me anything about how to put pixels into the new window
0
 
LVL 8

Expert Comment

by:VinExpert
ID: 2521797
This question no longer is pending deletion
0
 
LVL 8

Expert Comment

by:VinExpert
ID: 2521798
Hi,

U know it already, U have to use SetPixel to do that. May be in a seperate thread.

Try it out.
VinExpert

NOTE : copy this comment 3 times
0
 
LVL 8

Accepted Solution

by:
VinExpert earned 25 total points
ID: 2521799
Hi,

U know it already, U have to use SetPixel to do that. May be in a seperate thread.

Try it out.
VinExpert

NOTE : copy this comment 3 times :)
0
 

Expert Comment

by:Oliv
ID: 2527829
Depends on the size of your bitmap but for me, SetPixel is sure not the best way to draw your bitmap : should rather use ::PaintDIB or something like that.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question