Re: Dialog questions


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

Posted by Grant Foraker on September 08, 2005 at 11:54:23:

In Reply to: Re: Dialog questions posted by Brian Levantine on September 06, 2005 at 17:48:51:

Brian:

More questions and some comments.

1. HowTo5 helped. I've put together the following ...
-------------------------------------------------------------
InitBegin:
cosCtlId = IDC.STARTING
Gosub COS.AttachNumericEdit

coswParam = NE.CannotBeNegative + NE.Beep.IfInvalid
coslParam = 0 ! nothing to reset
Gosub COS.NumEditSetFlags

coswParam = 5 ! Integer digits
coslParam = 0 ! Fractional digits
Gosub COS.NumEditSetDigits

GOSUB GetFirst ! FIRST key in file & display it
LET cosCtlID = IDC.STARTING
LET cosState = 1
GOSUB COS.EditSetReadOnly
Return
---------------------------------------------------------------------
The NE.Beep.IfInvalid doesn't seem to work. I was thinking that you'd get a beep if you typed in a non-numeric character. I tried a Google search on NE_Beep_IfInvalid and go no matches.

I'd still like to try Right Justification. bb suggested ES.RIGHT but I can't find a sample to plagerize.

2. FlushEvents - it's in some examples and not in others. Am I right in always using it in a program with Edit Boxes where I also have Message Boxes.

3. IF cosCommand = BN.CLICKED is in some examples just after the CASE. Seems redundant to me.

4. I have the dialog set to child and I have the CW.AutoSizeDialog REM'd out. The dialog appears in the top left corner of the "view". On my development laptop this leave a lot of open real estate but should accomodate the range of video settings my customers use.

Early on, the entire view would change to dialog gray so I decided to remove the border in VS. The downside was that the gray color stayed after the program closed and returned to my menu. I found some logic in QMONITOR that set things right. One did a color restore which seem to have no effect and (ResetScreen) which worked. I haven't implemented (ResetScreen).

Now, after lots of twisting and tweaking in VS, I find that the dialog gray only fills the dialog area and the rest of the view remains "MS white". However, this is not all bad as the gray goes away when the dialog closes and my menu colors are unaffected.

I'd like to have filled with gray that goes away.

5. I found out what the REBUILD option is for. With both VS and my program displaying the dialog, I'd switch to VS to make a change and BUILD. I'd exit my program and restart it to see the dialog change. NO CHANGE??? BUILD again. NO CHANGE!!!. The Post Build DLL copy was failing because the program had the DLL open. On the second BUILD, VS determined that there had been no changes and the POST Build command file was skipped. REBUILD, with the DLL unencombered, got the changed DLL copied.

6. Warning about COS.EditReadOnly. I was using this GOSUB to toggle two edit boxes. I was setting cosState to either 1 and 0 per the documention. I decided to use cosEW.Enable and cosEW.Disable. The results reversed. After I found and understood COS.EnableDlgItem, I realized that for COS.EditReadOnly "enable" meant turn on read only, which disables the edit control. Took a bit for the light to come on.


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 ]