[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


print function

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

Thanking you
Question by:unisoftsystems
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
LVL 16

Expert Comment

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.
LVL 16

Expert Comment

ID: 6962797

Author Comment

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 ....
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

ID: 6963312
LVL 30

Accepted Solution

Axter earned 100 total points
ID: 6963323
You also might want to check out this link:

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.
LVL 16

Assisted Solution

AlexNek earned 100 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

  (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.

Featured Post

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

656 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