April 16, 1998

Datawindow print dialog

Question: How can I get the Windows 95 print dialog box todisplay instead of the print setup dialog usingprintsetup()? Answer: You have to build your own custom dialog window. The PFC comes with a standard print dialog window, so you could use that as a basis for your window, or

Text files with MFC

Question: I have been reading Visual C++ 5 in 21 Days while trying to learn how to use the Visual C++ user interface, and I have been trying to find an example of how to read and save a text file using the MDI interface. Am I supposed to use

System commands

Question: Is there a way for me to issue system commands (for example, DOS commands: dir, md temp, etc.) from within a C++ program? Answer: You can use the C system() library routine. This function takes a single argument: a string specifying a DOS command.

How do I get a null-terminate string in PB?

Question: When I use Windows API functions in PB, the null-terminate string is often needed. For example, when I use GetSaveFileName,the parameter lpstrFilter is really a trouble to me. Please give me the tip to resolve this problem. Answer: All strings in PB are automatically null-terminated. When you make your

Image Change Script

Question: I am trying to get an image change script to be downward compatible, but Internet Explorer 3.0 does not recognize MouseOvers. Is there another way to do an image change script? I had heard something about onClick, but I am not familiar with it. Would it work, and if

Accessing individual pixels

Question: I’m developing a VB program that requires manipulation of pictures. I can read them in and display them without any problem, but I have no way (that I can find) of accessing individual pixels. I need to be able to read each pixel’s RGB value, possibly altering it. Please

Client Licensing

Question: What is the most cost-effective engine and method for licensing clients in client/server applications? Answer: For PowerBuilder applications, the runtime license for clients is free. You can have a single developer copy of PB and deploy to as many users as you want for no charge. If you are

Virtual functions

Question: If I have an abstract base class with a pure virtual function called get_data(), how do I declare the function in inherited classes to have different return types than get_data() in the base class? For example: class sensor{public: get_data(void) = 0; // this should have a }; //return typeclass

Powerbuilder import utilities

Question: I would like to know if there are any PB import utilities that can import Excel files into a datawindow, datastore, or database table. Answer: PowerBuilder 6 can import Excel files using the standard ImportFile command of the datawindow or datastore object.

No more posts to show