Solved

print function

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

Thanking you
0
Comment
Question by:unisoftsystems
  • 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now