Results 1 to 5 of 5

Thread: Windows Api problem

  1. #1

    Windows Api problem

    I`am doing some windows api programming and I need to use the function TabCtrl_InsertItem. I cant find the propper include. Anyone?

  2. #2

    Windows Api problem

    It should be in the commctrl unit but it isnt there.

  3. #3

    Windows Api problem

    Grepping FPC sources: TabCtrl_InsertItem should be in the Windows unit. Just like all other WinAPI functions.

    ComCtrls unit is for components (Lazarus / Delphi ones), so it's not usable for you if you want to use direct WinAPI functions.

  4. #4

    Windows Api problem

    commctrl is a different unit then ComCtrls. commctrl has al the winapi functions for extended controls. It has TabCtrl_xxxxxxxx fucntions and procedures but not the TabCtrl_InsertItem.

  5. #5

    Windows Api problem

    Quote Originally Posted by Luuk van Venrooij
    commctrl is a different unit then ComCtrls. commctrl has al the winapi functions for extended controls. It has TabCtrl_xxxxxxxx fucntions and procedures but not the TabCtrl_InsertItem.
    Ahh, this was about CommCtrl unit, sorry.

    In any case, I looked at Delphi 6 sources and it seems that Delphi doesn't include TabCtrl_InsertItem at all (neither in Windows unit nor in CommCtrl). Try to use this implementation (pasted from FPC Windows unit) :

    [pascal]
    function TabCtrl_InsertItem(hwnd:HWND;iItem : longint;var item : TC_ITEM) : LRESULT;
    begin
    TabCtrl_InsertItem:=SendMessage(hwnd,TCM_INSERTITE M,WPARAM(iItem),LPARAM(@item));
    end;
    [/pascal]

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •