Difference between revisions of "Child tables"

From Team Developer SqlWindows Wiki
Jump to: navigation, search
(New page: This page covers child table tips & tricks. __TOC__ <br> <h2 style="margin:0;background-color:#ddcef2;font-size:120%;font-weight:bold;border:1px solid #afa3bf;text-align:left;color:#000;...)
 
Line 1: Line 1:
This page covers child table tips & tricks.
+
'''This page covers ChildTable tips & tricks.'''
  
 
__TOC__
 
__TOC__
 
<br>
 
<br>
  
<h2 style="margin:0;background-color:#ddcef2;font-size:120%;font-weight:bold;border:1px solid #afa3bf;text-align:left;color:#000;padding:0.2em 0.4em;">[[Image:Pointer.png]]What message is send when a DropDown column item is selected (clicked)</h2>
+
<!------------------------------------------------------------------------------------------------------------------------------>
 +
{{TipHeader|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.<br>
 
When an item from a column dropdown list is selected, the message SAM_AnyEdit is send to the column message actions section.<br>
 
<br>
 
<br>
  
<h2 style="margin:0;background-color:#ddcef2;font-size:120%;font-weight:bold;border:1px solid #afa3bf;text-align:left;color:#000;padding:0.2em 0.4em;">[[Image:Pointer.png]]How to hide the window displayed in the taskbar when a column dropdown list is opened</h2>
+
<!------------------------------------------------------------------------------------------------------------------------------>
 +
{{TipHeader|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.<br>
 
When you open the dropdown list of a table column, a window is shown on the Windows taskbar.<br>
 
To get rid of this window use this code under the message actions of the table column<br>
 
To get rid of this window use this code under the message actions of the table column<br>

Revision as of 20:57, 24 September 2008

This page covers ChildTable tips & tricks.

Contents


Pointer2.png What message is send when a DropDown column item is selected (clicked) Pointer.png

When an item from a column dropdown list is selected, the message SAM_AnyEdit is send to the column message actions section.

Pointer2.png How to hide the window displayed in the taskbar when a column dropdown list is opened Pointer.png

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 hWndDropDown
      If NOT GetWindowLongA( hWndDropDown,GWL_EXSTYLE ) & WS_EX_TOOLWINDOW
         Call SetWindowLongA( hWndDropDown, GWL_EXSTYLE, GetWindowLongA( hWndDropDown,GWL_EXSTYLE ) | WS_EX_TOOLWINDOW )