GetCP()
The GetCP() function calls up a dialog that allows the operator to pick a code page.
Usage |
nCodePage = GETCP( [ nInitialCP [, cPrompt [, cTitle ] ] ] ) |
Parameter |
Value |
Meaning |
nInitialCP |
Integer |
Displays the specified code page as selected in the list box. You must pass some value (even though it doesn't need to be a valid code page) if you pass a value for cPrompt or cTitle. |
Omitted |
No code page is highlighted. |
|
cPrompt |
Character |
The prompt to appear within the dialog box. Practically limited to around 200 characters, but more are accepted. |
Empty string or omitted |
Prompt is "Please select a code page for cross-platform data sharing." Note that you must pass the empty string, and not just omit the parameter, if you pass the cTitle parameter. |
|
cTitle |
Character |
The title to display in the dialog box title bar. If the title exceeds the space allowed, it is truncated with an ellipsis. |
Empty string or omitted |
Dialog title is displayed as "Code Page." |
|
nCodePage |
0 |
User selected Cancel, Close from the control menu or pressed Escape. |
Integer |
The code page selected by the user. |
Example |
? GETCP( 1250, "Convert file to which code page?", ; "Code Page Conversion" ) |
See Also |