I think you'll want:
Code: Select all
int CScreen::ServiceImageButtons()
Moderators: TomKerekes, dynomotion
Code: Select all
int CScreen::ServiceImageButtons()
Tom, I'm finally getting around to LabelDROs, but my understanding of c++ is somewhat hindering me.TomKerekes wrote: ↑Thu Jan 18, 2024 11:51 pmOops I thought that was what you were after.
I think you'll want:
Code: Select all
int CScreen::ServiceImageButtons()
Code: Select all
int CKMotionCNCDlg::GetVar(int Var, int *value)
{
CString s,r;
if (Var >= 0 && Var < 200)
{
s.Format("GetPersistHex %d",Var);
if(TheFrame->KMotionDLL->WriteLineReadLine(s, r.GetBufferSetLength(100))) return 1;
r.ReleaseBuffer();
sscanf(r,"%x",value);
}
return 0;
}
And forgot to mention, the reason I mentioned GetUserDataFloat, is that if you search for UserData in the help file, it only finds the options for Float and Double, not GetUserData. It only finds GetUserData if you explicitly search for it, as the help page for it doesn't contain just UserData (float and double have UserData in the code examples)TomKerekes wrote: ↑Sat Feb 03, 2024 11:41 pmThat is all correct except GetUserDataFloat expects the value to be a float not an integer. KFLOP and the PC must agree on what the 32-bit value represents. Either an Integer or the binary image of a float. In this case it is an integer offset into the Gather Buffer so GetUserData would be appropriate.