Yes it is, but maybe someone new here hasn't seen this posted and wants to know too 
I know the answer is right in front of my face, I've already encountered this but it's been so long.
hDlg calls this function, when the dialog box pops up you can hit ESCAPE and it goes away.
I don't want that.
By removing %IDCANCEL the problem goes away but I want a cancel button, I just want hte user to have to CLICK it.
------------------
Scott
mailto:[email protected][email protected]</A>

I know the answer is right in front of my face, I've already encountered this but it's been so long.
hDlg calls this function, when the dialog box pops up you can hit ESCAPE and it goes away.
I don't want that.
By removing %IDCANCEL the problem goes away but I want a cancel button, I just want hte user to have to CLICK it.
Code:
'----------------------------------------------------------------------------------------- Function CreateLicenseFile(hWnd As Long) As Long Local lResult As Long Local lDlg As Long 'dialog new etc Dialog New hWnd,"Create a License agreement or note to user",,, 375,250,%WS_CAPTION Or %WS_SYSMENU Or %WS_THICKFRAME To lDlg Control Add TextBox, lDlg, %IDLIC_TEXT1 ,"",5,30,365,190,%WS_TABSTOP Or %ES_WANTRETURN Or %ES_MULTILINE Or %WS_VSCROLL,%WS_EX_CLIENTEDGE Control Add Label, lDlg, %IDLICLABEL1, "Enter license agreement text or a note to user then click Save" ,5,10, 250,20 Control Add Button, lDlg, %IDLIC_SAVE, "&Apply",250,230,45,14,%BS_DEFAULT Control Add Button, lDlg, %IDCANCEL, "&Cancel",300,230,60,14 Dialog Send lDlg, %WM_SETICON, %ICON_BIG, hIcon Dialog Show Modal lDlg Call LicenseCreatorProc To lResult Function = lResult End Function '----------------------------------------------------------------------------------------- CallBack Function LicenseCreatorProc() As Long Local lResult As Long Select Case CbMsg Case %WM_INITDIALOG Case %WM_COMMAND Select Case LoWrd(CbWparam) Case %IDLIC_SAVE Control Get Text CbHndl,%IDLIC_TEXT1 To g_LicenseText Dialog End CbHndl,%TRUE Case %IDCANCEL If CbCtlMsg = %BN_CLICKED Then Dialog End CbHndl,%FALSE End Select End Select End Function
Scott
mailto:[email protected][email protected]</A>
Comment