Solved

how to open a client window for bitmap ?

Posted on 2000-02-14
8
161 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
Independent Software Vendors: 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
fizzArray  challenge 1 108
canBalance challenge 34 104
matchUp  challenge 9 123
Way to decrease size of apk file 9 104
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

740 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