Casio ClassPad 300 Programming Manual page 108

Sdk programming guide
Hide thumbs Also See for ClassPad 300:
Table of Contents

Advertisement

}
return pStr;
The current language decides which of our language arrays we will index into. We then
return the string at our normalized index to complete the ExtensionGetLang() function.
But you may be wondering, how does the menu or button know which message ID it
should send? The answer is that you supply this information when you create the object.
For example here is the creation of the text button in the toolbar from
HelloWorldModule.cpp:
PegTextButton* b = new PegTextButton(1,1, GetLang(HELLO_HELLO),
Instead of creating the button with a text string, we use the function GetLang() with the
appropriate message ID. The button's text is "Hello" so we use the message ID that
represents "Hello", HELLO_HELLO, as the parameter to GetLang().
The GetLang() function will check this parameter to see if it is a system standard Id.
System standard IDs are IDs that already have values for all the languages supported by
the ClassPad. These include common menu entries such as "Copy", "Paste", or "Undo".
Refer to the SDK Reference Guide for a complete list of all of the system standard
messages and their IDs.
If the message ID is not in the system range, then the ExtensionGetLang() function that
you created will be called to return the correct text string.
You should refer to the HelloWorld example if you have any more questions about
creating an add-in that supports multiple languages.
IDB_HELLO,AF_ENABLED|TT_COPY);
108

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents