Window styles and Declares

I’m working on a custom combo box. I have the drop down list working well on windows, by using a global floating window combined with the following declare.

'DList is the dropdown list window #If TargetWin32 Then Const GWL_STYLE = -16 Const WS_Custom = &H40800000 Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (hwnd As Integer, nIndex As Integer, dwNewLong As Integer) As Integer dim i as Integer i = SetWindowLong( DList.Handle, GWL_STYLE, WS_Custom ) #EndIf

It doesn’t work at all on Mac. Can anyone help me adapt this to Mac? I don’t really want to post the project on the forum but could email a dropbox link or post a generic project.

In the CEF control I found a popup window used for auto complete, that acted like I wanted. It took me a while to find out how it was done. When I exported to a text project I saw the MacProcID was set to 1040. I could not find a way to do that other than manually editing the text project.

Is this the right way? How do others do it?

No, it’s not the right way. It’s only available for Carbon. You will need to set the window frame using a declare just like on Windows.

Ok thanks. I found the answer on another thread.