Click here to Skip to main content
15,891,730 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
CSS
Now I Need a control can display the text and picture,Like microsoft's word can do.
The Text string and picture can be read from the Disk.Now I need a kind of control can display the text and the picture follow it.Of course may need control the format of them.
I use VS2008,C++.Windows OS
Posted
Comments
DrBones69 6-Mar-12 22:43pm    
What exactly are you asking? Have you tried anything?
jiazhiqiang 6-Mar-12 22:51pm    
Now I need a kind of control that has source code or from MFC can display the text and image together,like Web-page view,Now I can Get the Text string and the Path of image file,I just want to output them in a that control,as part of dialog.
Sergey Alexandrovich Kryukov 6-Mar-12 22:49pm    
Very vague. At least specify what UI library do you want to use and some other relevant detial.
--SA
jiazhiqiang 6-Mar-12 22:54pm    
please look at the previous reply.
I use VS2008,No other library used so-far.I want that's kind of control,there 's Source code is better,if not,Some library is OK!
regards.
DrBones69 6-Mar-12 23:10pm    
So, you are using MFC? You can add a browser control for a web-like browser or you can add a picture control, both of these should be in the toolbox of VS when your dialog is selected.

Assuming that you are using MFC. Why dont you put a picture box and a static control in the dialog. Picture box can show the picture and the static control can display the text that you have retreived from the disk.
 
Share this answer
 
Comments
jiazhiqiang 6-Mar-12 23:55pm    
I need one control that can display the Text string or images together(that can be have retreived from the disk)In a format:
"text Line 1"
[image 1]
[image 2]
"text Line 2"
[image 3]
So the comment to display is determined by user select and app's logic.Is not fixed.

One 1 line Text and a corresponding image.
you can just draw that in your dialog ,
draw text using : TextOut API
draw image using BitBlt

so in paint function you can just call
TextOut(dialogDC,...);
BitBlt( ...) // Image1
BitBlt( ...) // Image2
TextOut(...) ///

like that..
 
Share this answer
 
Comments
jiazhiqiang 7-Mar-12 1:30am    
I just want it look like the contents is really in a control of the dlg,It can scroll up and down(read-only),when I press a "Hide" Button on dlg,that can be hiden and restore.
Is this approach you offer can do it? May you give me a sample or link?
Thank you!
Chandrasekharan P 7-Mar-12 1:42am    
I really dont think you will get such a ready made control. You can very well create an ActiveX Component and then put the component into your dialog box.
jiazhiqiang 7-Mar-12 2:13am    
I have decided to use RichEdit2.0,Thanks anyway!
jk chan 7-Mar-12 3:52am    
RichEdit will work..but beware some customizations are hard to implement with it
Use the Rich Edit 2.0 Control.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900