Solved

print function

Posted on 2002-04-23
8
165 Views
Last Modified: 2013-11-20
How to print list box contents ?
plese replay soon.

Thanking you
0
Comment
Question by:unisoftsystems
[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
  • 3
  • 2
8 Comments
 
LVL 16

Expert Comment

by:AlexNek
ID: 6962757
2 unisoftsystems
You not describe exact your problem. You don't know how to extract strings form list box (GetText( int nIndex, CString& rString ))? Or you don't know how to print some text under Windows? Or you want to print layout with list box.
0
 
LVL 16

Expert Comment

by:AlexNek
ID: 6962797
0
 

Author Comment

by:unisoftsystems
ID: 6963071
I have a list box it contanins hundred of function name as a list box items .so i want to take print of those functions
 waiting for replay ....
thanks
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!

 
LVL 30

Expert Comment

by:Axter
ID: 6963312
0
 
LVL 30

Accepted Solution

by:
Axter earned 25 total points
ID: 6963323
You also might want to check out this link:
http://codeguru.earthweb.com/printing/print.html

The first link I posted is a Generic Printer class, and it shows you how to print a list control content.

The second link is for print a CStringList object.
0
 
LVL 16

Assisted Solution

by:AlexNek
AlexNek earned 25 total points
ID: 6963558
2 unisoftsystems
Do you have a list box in the your program or in a foreign program? I suppose that is a foreign program. I hope that you can get the window handle of this ListBox. Then you can use next messages to determine size and text.

count = SendMessage(
  (HWND) hWnd,              // handle to destination window
  LB_GETCOUNT,              // message to send
  (WPARAM) wParam,          // not used; must be zero
  (LPARAM) lParam          // not used; must be zero
);

SendMessage(
  (HWND) hWnd,              // handle to destination window
  LB_GETTEXT,               // message to send
  (WPARAM) wParam,          // item index
  (LPARAM) lParam          // buffer for items (LPTSTR)
);

Text you can store in the Multiline edit box, copy to clipboard, paste in editor and printing.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

728 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