Re: CW.CreateAutoModeDialog


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Mike Saunders on December 29, 2006 at 09:33:37:

In Reply to: CW.CreateAutoModeDialog posted by Grant Foraker on December 13, 2006 at 06:17:24:

I think I saw that also.
So I am "manually" setting the screen to normal before creating the dialog.
Then "manually" maximizing the screen after exit if the screen was maximized to start with.

Mine mimimizes and maximizes okay.
There are some settings in the properites of the dialog that may affect how this works also. (I need to check those.)


I am doing the following on startup:
GOSUB COS.GetFrameWnd
gosub COS.IsMaximized
IsMax = cosState
cosState = SW.NORMAL
gosub COS.ShowWindow
! that leave the window in a Normal state

! the following disables the maximize in the upper right
Print (AllowMaximize = FALSE)
! the following changes the title of the dialog to something
! more meaningful
cosCtlText$ = TERM$ + " - Comet Spool Export Maintenance"
Print (Set Window Caption = cosCtlText$,0)
! start the event handler
EventSub EventHandler CW.Event$ CW.Source$
! Create the dialog using whatever parameters
! the application requires.
cosDllNames$ = AppDll$
cosDllDir$ = Sub(PStat(PARTITION$), 41, 3)
cosDlgId = AppDialogID
Gosub CW.CreateAutoModeDialog

UPON Exit I do the following.

ProgExit:
! reenable maximize button
Print (AllowMaximize = TRUE)
! Need to restore the screen state
GOSUB COS.GetFrameWnd
if IsMax = 1 ! this was set when program started
cosState = SW.MAXIMIZE
else
cosState = SW.NORMAL
endif
gosub COS.ShowWindow
Select Case ENTERLEVEL
Case 0
stop
case else
exit
endselect


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):






[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]