Using Callback function - PopupEditText
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/11/2005 at 07:41, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.1
Platform:
Language(s) : C++ ;---------
Sorry if this is a general c++ question, but I cant work out how to use the callback function for the PopupEditText method.Could someone please post a simple snippet of how to use a callback function?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/11/2005 at 14:46, xxxxxxxx wrote:
First you have to define a callback function PopupEditTextCallback:
void popupTextCallback(LONG mode, const String& text, void* userdata) { if (mode==POPUPEDITTEXTCALLBACK_TEXTCHANGED) GePrint(text); }
Then pass that function (type PopupEditTextCallback) to PopupEditText:
String strTest = "Test"; PopupEditText(0, 0, 100, 20, strTest, 0, (PopupEditTextCallback* )popupTextCallback, NULL);
-Chris