Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, January 28, 2009 5:55:42 AM(UTC)
martin.pastor

Groups: Registered
Posts: 19


Dear friends.

I am trying to display two different bitmaps in two different windows using V13Pro and C++. Do you know some example?

Thanks in advanced
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, January 28, 2009 10:45:19 AM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 366

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

Hello Martin,

Could you explain in a little more detail what you mean by displaying two different bitmaps in two different windows? Are you looking to launch a second window with just the image in it? Or do you mean you want to display two different bitmap on the same form, but in their own separate "viewers"?

Do you maybe have a screen shot that illustrates what you'd like to do?
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#3 Posted : Wednesday, January 28, 2009 10:21:02 PM(UTC)
martin.pastor

Groups: Registered
Posts: 19


Dear Walter,

Sorry for being extremly brief. I am looking for display two (or more) different bitmap in their own separate viewers; the second option that you are mentioning. I am novice with c++.

At the moment, I have display two different bitmaps in different viewers. The main problem is that it is neccesary to close the first one in order to open the second one.

Thanks in advanced.

P.D. I am attaching two different screenshot. I hope that they will be usefull.
File Attachment(s):
ss.zip (709kb) downloaded 88 time(s).
 
#4 Posted : Thursday, January 29, 2009 7:42:07 AM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 366

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

Hello Martin,

Part of the issue here is that you're using a SDI (single document interface) as opposed to a MDI (multiple document interface). It is possible to display two images using either model, but it's important for you to determine for your needs which model you're going to adhear to. Just to give you a couple quick examples, MS Paint uses SDI, whereas our Main API and C++ class Library demos use the MDI.

It would probably be far easier to simply stick with your current implementation, and just use the device contexts of some controls in the form itself to draw smaller pictures within the form. Then pass this DC into one of the following methods:
L_PaintDC(hDC, &LeadBitmap, NULL, NULL, &DestRect, NULL, SRCCOPY);
LPaint(&LeadBitmap, hDC) & LPatin.PaintDC()

What programming interface are you using? API or C++ Class Library?

Also, are you developing an MFC app or Win32 app?

Here are a couple of articles on switching views while using the SDI if you'd prefer to use this route instead:
http://support.microsoft.com/kb/99562
http://msdn.microsoft.com/en-us/library/s199bks0.aspx
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#5 Posted : Friday, January 30, 2009 3:51:44 AM(UTC)
martin.pastor

Groups: Registered
Posts: 19


Dear Walter,

Thank you very much for your usefull advices. Until now, I have been using API for developing Win32 applications. I will try with C++ Class Library using some example.

Regards,

Martin
 
#6 Posted : Friday, January 30, 2009 12:56:42 PM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 366

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

Hello Martin,

I have an MFC CDLL/"API" project where I used v16 to load an image and display it within a PictureBox. I'm including it here so that you can take a look at it. It should work with v13 as well. I don't think there have been any changes to the methods that I'm using in this project. You can probably just change the includes and comments to the v13 headers and libraries, and this project should work. Creating a second PictureBox and a second bitmap to display should be textbook.
File Attachment(s):
CDLL_Simple_Load_Paint.zip (199kb) downloaded 88 time(s).
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#7 Posted : Monday, February 2, 2009 4:42:47 AM(UTC)
martin.pastor

Groups: Registered
Posts: 19


Dear Walter,

Thank you very much for your help.I am going to use it.

Regards,

Martin
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.431 seconds.