Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TreeView Background
Message
From
03/07/2001 05:49:04
 
 
To
02/07/2001 16:19:55
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00524828
Message ID:
00526185
Views:
26
Hi!

hWND (long type) is unsigned integer, however VFP have no such type, we use integer instead. The declaration is following:

DECLARE integer SendMessageA in Win32API as SendMessage integer hWND, integer wMsg, integer wParam, integer lParam

The call is:
lnResult=SendMessage(TreeView1.Object.hWnd, TVM_SETBKCOLOR, 0, RGB(255, 0, 0))

The value of the TVM_SETBKCOLOR constant is 0x1100 + 29

HTH.


>Hi George
>
>Hope You could give me a little advise on how to make the call.
>
>The VB sample code declares an API call by the next code
>
>Private Declare Function SendMessage Lib "User32" _
> Alias "SendMessageA" _
> (ByVal hWnd As Long, _
> ByVal wMsg As Long, _
> ByVal wParam As Long, _
> lParam As Long) As Long
>
>and calls the function with the next line of code
>
>Call SendMessage(TreeView1.hWnd, _
> TVM_SETBKCOLOR, _
> 0, _
> ByVal RGB(255, 0, 0))
>
>
>
>I’m not sure how to translate the Declare statement to VFP, since TreeView1 is the Treview Object dropped into the VB form.
>
>A reference to the treeview object from a VFP method would be:
>
>ThisForm.Olecontrol1.Object
>
>According to VB documentation hWnd property is a handler.
>
>¿What would be the handler from within VFP to ThisForm.Olecontrol1.Object and whih data type shall I use for the Declare statement?
>
>Thanks in advance for any tips.
>
>Oscar
>
>>>I'd like to know if there is a way to change the background of a MS Treeview. Its default color is white.
>>>
>>>Thanks in advance for any hints.
>>>
>>Oscar,
>>
>>See MS KB article Q178491. It's in VB, but it should be fairly simple to translate.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform