Sunday, July 6th 2008, 4:52pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

rasheed

Beginner

Posts: 9

Location: Pune

Occupation: Software Engineering

1

Thursday, May 15th 2008, 3:28pm

substitution for CDC in Qt

Hi
Can any body tell me what is the CDC(Device Context in class in MFC) substitution in the Qt beause we have MFC application that we need to convert into the QT.
My Problem is, i want to dispaly some text on the Dialog as a image/Bitmap so can any body tell me how to do ?

i am very new to QT So any sample will be the help full to me.

thanks in Advance

This post has been edited 1 times, last edit by "rasheed" (May 15th 2008, 4:12pm)

  • Go to the top of the page

^NyAw^

Trainee

Posts: 130

Location: Sta.Eugenia de Berga (Vic - Barcelona - Catalunya)

Occupation: Software Programmer

2

Thursday, May 15th 2008, 6:59pm

Hi,

Take a look at QLabel and QPainter classes.
Òscar Llarch i Galán

(\__/)
(O.o )
(> < )
  • Go to the top of the page

rasheed

Beginner

Posts: 9

Location: Pune

Occupation: Software Engineering

3

Monday, May 19th 2008, 6:11pm

Hi,
I am reading a PDF file, page by page, using some third party tools and displayed on Dialog window. (Page will be as bitmap). Kindly refer the Code because he is going to create the bitmap in MFC. the same code I need to Convert into QT. Below are my finding.
kindly find the attachment for the code snippet.

1) I want to Convert MFC code into QT. Here are some understanding points
a. OnPaint(): I have created the CDC and CPaint objects and Created a device Compatable Bitmap, please find the Onpaint function and then call the OnDraw with CompatibleDC as a reference parameter. Then transfer the pixels from Source to Destination Rectangle using Bitblt.
b. OnDraw(): I have filled the parameter which required for this function PDPageDrawContentsWithParams() it will also have the display context which will be member function to get hdc, the output device context.

the above attached "MFCDLViewerView.cpp" MFC functionalities changed into QT " QTmainwindow.cpp "functionality file. But on the Dialog window I am unable to see the PDF Page as a bitmap so Kindly let me know where I am doing wrong. And if any other procedure to get it work done let me know.


Regards,
Rasheed Shaik.
rasheed has attached the following files:
  • MFCDLViewerView.cpp (9.74 kB - 4 times downloaded - Last download: May 31st 2008, 12:07pm)
  • QTmainwindow.cpp (5.8 kB - 4 times downloaded - Last download: May 24th 2008, 3:24am)
  • Go to the top of the page

Rate this thread