flat assembler
Message board for the users of flat assembler.

Index > Windows > fasm TOOLINFO structure different with PSDK WIN32 TOOLINFO

Author
Thread Post new topic Reply to topic
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
Code:
struct TOOLINFO
  .cbSize   dd ?
  .uFlags   dd ?
  .hwnd     dd ?
  .uId         dd ?
  .Rect     RECT     ; should be ==> .rect     RECT
  .hInst    dd ?
  .lpszText dd ?
ends
    


Code:
typedef struct tagTOOLINFO{
    UINT      cbSize; 
    UINT      uFlags; 
    HWND      hwnd; 
    WPARAM    uId; 
    RECT      rect; 
    HINSTANCE hinst; 
    LPTSTR    lpszText; 
#if (_WIN32_IE >= 0x0300)
    LPARAM lParam;
#endif
} TOOLINFO, NEAR *PTOOLINFO, FAR *LPTOOLINFO; 
    


sincerely,
sulaiman chang
Post 06 Oct 2004, 02:57
View user's profile Send private message Visit poster's website Reply with quote
Vasilev Vjacheslav



Joined: 11 Aug 2004
Posts: 392
Vasilev Vjacheslav
it short, but it works

ps. there are many short (not full - os depended) structures, if you want exact structure, do it for yourself Very Happy
ps. also good idea, if fasm will contain native variable (like %t) which show WINVER

_________________
[not enough memory]
Post 06 Oct 2004, 05:37
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
The first element of the structure - cbSize shows the size of the structure. If you set it properly Windows can determine which version it is. Old structure will work for new IE versions (comctl32.dll), but new one maybe will not with old versions.
Of course we can define the structure this way:
Code:
struct TOOLINFO 
  .cbSize   dd ?
  .uFlags   dd ?
  .hwnd     dd ?
  .uId      dd ?
  .Rect     RECT     ; should be ==> .rect     RECT
  .hInst    dd ?
  .lpszText dd ?
if defined _WIN32_IE
  if _WIN32_IE >= $0300
    .lParam dd ?
  end if
end if
ends
    


Now if you define somewhere in the source _WIN32_IE = $301 for example, .lParam will be appended to the structure.
Post 06 Oct 2004, 06:11
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
Quote:

#if (_WIN32_IE >= 0x0300)
LPARAM lParam;
#endif


actually i didn't concern about that Smile
my post actually mean to let people know they got to change their .Rect to .rect Smile in order to be compatible Smile

thanks for showing the tricks JohnFound Smile
Post 06 Oct 2004, 10:35
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.