From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

calling callback function for richtextbox control

In my project I have included a richtextbox control and a command button (named RF) .After pressing the RF button the rich text box should display "RF   ".After it numbers can be entered through keyboard(like   RF     123).  For this I have included the following lines
   GetObjHandleFromActiveXCtrl(panelHandle, PANEL_RICHTEXTBOX, &gObjHandle);
   RichTextLib_IRichTextSetText (gObjHandle, NULL,"RF    ");
   SetActiveCtrl (panelHandle, PANEL_RICHTEXTBOX);
But the cursor is before "RF   ".I want cursorto be displayed  after "RF   " display.Is it possible to call the richtextbox callback function
int CVICALLBACK RICHTEXTBOX (int panel, int control, int event,  void *callbackData, int eventData1, int eventData2) and pass the eventData1 value same for the End button of keyboard though End button of keyboard has not been pressed.Actually after pressing the RF button if End button of keyboard is pressed the display in richtextbox is "RF   " and cursor position is after "RF    "display.I want similiar action to be taken place though End button of key board  has not been pressed after pressing RF button.
0 Kudos
Message 1 of 2
(2,810 Views)
Could a simple FakeKeyStroke meet your needs?


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(2,802 Views)