print function

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

Thanking you
Question by:unisoftsystems
  • 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 ....
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

LVL 30

Expert Comment

ID: 6963312
LVL 30

Accepted Solution

Axter earned 25 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 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

  (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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
cat dog challenge 18 127
tripleUp challenge 7 86
withoutTen challenge 14 132
JQuery serialize and unserialize 8 136
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

828 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