Solved

how to open a client window for bitmap ?

Posted on 2000-02-14
8
158 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
  • 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
 

Author Comment

by:alexott
ID: 2521763
answer does noct tell me anything about how to put pixels into the new window
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now