SalBringWindowToTop( ... )

forum.advanced.programming (1998-2005)
Pieter Clicteur

SalBringWindowToTop( ... )

Post by Pieter Clicteur » 10 Mar 2005, 07:55

 Posted by:  Pieter Clicteur 

Hello,

When I want to switch between 2 applications (1 ctd, 1 vb) I use
SalBringWindowToTop( hWndMDI ). The Centura application does not come to
foreground though. Is there an other function to activate my application?

I use CTD 1.5.1

Mirko
Italy
Posts: 983
Joined: 04 Apr 2017, 08:56
Location: Geneva

SalBringWindowToTop( ... )

Post by Mirko » 10 Mar 2005, 08:33

 Posted by:  Mirko BONANNO 

Hi Pietr,

try hWnd = SalAppFind ( strAppName, bActivate )

HTH
Mirko

Günther Feldzahn

SalBringWindowToTop( ... )

Post by Günther Feldzahn » 10 Mar 2005, 11:03

 Posted by:  Günther Feldzahn 

WindowApi
SetWindowPos()

See Microsoft MSDN SDK description for the function parameters

Pieter Clicteur

SalBringWindowToTop( ... )

Post by Pieter Clicteur » 10 Mar 2005, 12:39

 Posted by:  Pieter Clicteur 

This is the working solution:

Set hWndTop = SalNumberToWindowHandle( HWND_TOPMOST )
Call SalGetWindowLoc( hWndItem, nX, nY )
Call SalGetWindowSize( hWndItem, nWidth, nHeight )
Set nWidth = SalFormUnitsToPixels( hWndItem, nWidth, FALSE )
Set nHeight = SalFormUnitsToPixels( hWndItem, nHeight, TRUE )
Call SetWindowPos( hWndItem, hWndTop, nX, nY, nWidth, nHeight,
SWP_SHOWWINDOW )

cschubert
Germany
Posts: 830
Joined: 23 May 2018, 11:26
Location: Germany

SalBringWindowToTop( ... )

Post by cschubert » 10 Mar 2005, 13:39

 Posted by:  Christian Schubert 

Pieter,

save some lines of code ;-)

Call SetWindowPos( hWndItem, hWndTop, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE |
SWP_SHOWWINDOW )

HTH

Christian Schubert

Return to “advanced.programming”

Who is online

Users browsing this forum: [Ccbot] and 0 guests