• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 168
  • Last Modified:

print function

How to print list box contents ?
plese replay soon.

Thanking you
0
unisoftsystems
Asked:
unisoftsystems
  • 3
  • 2
2 Solutions
 
AlexNekCommented:
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
 
unisoftsystemsAuthor Commented:
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
Technology Partners: 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!

 
AxterCommented:
0
 
AxterCommented:
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
 
AlexNekCommented:
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

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!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now