Difference between revisions of "Child tables"
From Team Developer SqlWindows Wiki
DaveRabelink (Talk | contribs) |
DaveRabelink (Talk | contribs) (Added sample to tip on removing dropdownlist window from taskbar) |
||
Line 53: | Line 53: | ||
On SAM_DropDown | On SAM_DropDown | ||
Set hWndDropDown = FindWindowA( "Gupta:DropDown", "" ) | Set hWndDropDown = FindWindowA( "Gupta:DropDown", "" ) | ||
+ | If NOT hWndDropDown | ||
+ | ! Maybe it is an older TD version, so search for another classname | ||
+ | Set hWndDropDown = FindWindowA( ":DropDown", "" ) | ||
If hWndDropDown | If hWndDropDown | ||
If NOT GetWindowLongA( hWndDropDown,GWL_EXSTYLE ) & WS_EX_TOOLWINDOW | If NOT GetWindowLongA( hWndDropDown,GWL_EXSTYLE ) & WS_EX_TOOLWINDOW | ||
Call SetWindowLongA( hWndDropDown, GWL_EXSTYLE, GetWindowLongA( hWndDropDown,GWL_EXSTYLE ) | WS_EX_TOOLWINDOW ) | Call SetWindowLongA( hWndDropDown, GWL_EXSTYLE, GetWindowLongA( hWndDropDown,GWL_EXSTYLE ) | WS_EX_TOOLWINDOW ) | ||
</pre> | </pre> | ||
+ | |||
+ | Here you can download a sample: | ||
+ | *[http://samples.tdcommunity.net/index.php?dir=&file=WIKI_DropDownColumn_NoWindowInTaskbar.zip WIKI_DropDownColumn_NoWindowInTaskbar.zip]<br> | ||
+ | <br> |
Revision as of 16:19, 22 December 2008
This page covers ChildTable tips & tricks.
Contents |
What message is send when a DropDown column item is selected (clicked) 
When an item from a column dropdown list is selected, the message SAM_AnyEdit is send to the column message actions section.
How to hide the window displayed in the taskbar when a column dropdown list is opened 
When you open the dropdown list of a table column, a window is shown on the Windows taskbar.
To get rid of this window use this code under the message actions of the table column
First declare these three WinApi functions in the external functions section
Library name: USER32.DLL Function: FindWindowA Export Ordinal: 0 Returns Window Handle: HWND Parameters String: LPCSTR String: LPCSTR Function: GetWindowLongA Export Ordinal: 0 Returns Number: LONG Parameters Window Handle: HWND Number: INT Function: SetWindowLongA Export Ordinal: 0 Returns Number: LONG Parameters Window Handle: HWND Number: INT Number: LONG
Also declare these constants
Number: GWL_EXSTYLE = -20 Number: WS_EX_TOOLWINDOW = 0x80
Here the actual code for removing the window from the taskbar
On SAM_DropDown Set hWndDropDown = FindWindowA( "Gupta:DropDown", "" ) If NOT hWndDropDown ! Maybe it is an older TD version, so search for another classname Set hWndDropDown = FindWindowA( ":DropDown", "" ) If hWndDropDown If NOT GetWindowLongA( hWndDropDown,GWL_EXSTYLE ) & WS_EX_TOOLWINDOW Call SetWindowLongA( hWndDropDown, GWL_EXSTYLE, GetWindowLongA( hWndDropDown,GWL_EXSTYLE ) | WS_EX_TOOLWINDOW )
Here you can download a sample: