Click here to Skip to main content
15,846,342 members

Comments by Jochen Arndt (Top 200 by date)

Jochen Arndt 3-Oct-18 4:22am View    
You are welcome and thank you for accepting my solution.
Jochen Arndt 3-Oct-18 4:17am View    
p is initialised by the strtol() function.
Jochen Arndt 3-Oct-18 4:11am View    
A base of zero is special and allows input as hex, octal, and decimal:

From the strtol man page:

If base is zero or 16, the string may then include a "0x" prefix, and the number will be read in base 16; otherwise, a zero base is taken as 10 (decimal) unless the next character is '0', in which case it is taken as 8 (octal).
Jochen Arndt 1-Oct-18 6:13am View    
I don't know that control. You have to check the documentation if there is a similar function. If not, you have to implement it yourself using the metrics of the used font.
Jochen Arndt 25-Sep-18 7:11am View    
You have to get the character position (buffer offset) from the mouse position. This requires knowing the page and line offsets when scrolled, the line height, and the character width (with fixed width fonts). With proportional fonts it is more complicated but there are Windows API functions for such calculations. The keyword is "text metrics".