+ Size actualsize;
+ UMAGetControlData( m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , 32767 , wxBuffer , &actualsize) ;
+
+ // Find line first
+ int count = 0;
+ for (int i = 0; i < actualsize; i++)
+ {
+ if (count == lineNo)
+ {
+ // Count chars in line then
+ count = 0;
+ for (int j = i; j < actualsize; j++)
+ {
+ count++;
+ if (wxBuffer[j] == '\r') return count;
+ }
+
+ return count;
+ }
+ if (wxBuffer[i] == '\r') count++;
+ }
+
+ return 0;