Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VarBinary question
Message
 
 
To
07/04/2009 19:13:16
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01393739
Message ID:
01393765
Views:
74
This message has been marked as the solution to the initial question of the thread.
The CTOBIN() in VFP8 does not have additional parameters. I've similar code at http://www.berezniker.com/content/pages/visual-foxpro/position-shortcut-menu-over-toolbar in CalculateShortcutMenuPosition(). It does not use CTOBIN() and can work in pre-VFP9 versions..

>
>Yes, that answers the question I asked.
>
>Unfortunately, there's a follow up, since the CToBin later fails as well.
>
>
>
>>
>>m.lcPoint = REPLICATE(CHR(0),8)
>>
>>
>>>I'd like to run the code below in Verison 8, It fails on this statement: m.lcPoint = 0h0000000000000000
>>>
>>>What is the equivalent statement in Version 8? Thanks
>>>
>>>
Lparameters lcMenuName
>>>
>>>Local lnx, lny, lnRow, lnCol, lcFontStyle
>>>
>>>Declare Integer GetCursorPos In win32api As apiGetCursorPos_pemeditor;
>>>	String  @lpPoint
>>>
>>>Declare Integer ScreenToClient In win32api As apiScreenToClient_pemeditor ;
>>>	Integer nhWnd, ;
>>>	String  @lpPoint
>>>
>>>m.lcPoint = 0h0000000000000000
>>>
>>>apiGetCursorPos_pemeditor(@m.lcPoint)
>>>apiScreenToClient_pemeditor(_Screen.HWnd, @m.lcPoint)
>>>
>>>m.lnx = CToBin(Substr(m.lcPoint, 1, 4), "4rs")
>>>m.lny = CToBin(Substr(m.lcPoint, 5, 4), "4rs")
>>>
>>>m.lcFontStyle = ""
>>>
>>>If _Screen.FontBold = .T. Then
>>>	m.lcFontStyle = m.lcFontStyle + "B"
>>>Endif
>>>
>>>If _Screen.FontItalic = .T. Then
>>>	m.lcFontStyle = m.lcFontStyle + "I"
>>>Endif
>>>
>>>m.lnCol = m.lnx/Fontmetric(6, _Screen.FontName, _Screen.FontSize, m.lcFontStyle)
>>>m.lnRow = m.lny/Fontmetric(1, _Screen.FontName, _Screen.FontSize, m.lcFontStyle)
>>>
>>>Define Popup (lcMenuName) shortcut Relative From m.lnRow, m.lnCol
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform