- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have two identical Quickwin programs that I upgraded from Fortran 10 to XE Update 10, 12.1.353
There is a dialog box section where I use a listbox to populate all the files of a particular type in a browsed to directory. In one version it works and in the other version with exactly the same code it does not populate that list box.
As a history, earlier when I was in Windows XP and version 10 of the IVF, I had to use a StackReserveSize="160000000" StackCommitSize="160000000" for the program to launch. The XP compiled version would not work in Win 7 as it would freeze anytime I called the the browse command. In win7 I had to delete the StackSize restriction and recompile and it would work.
However now in win7 one version works perfectly and the other does not. I did a compareIT of the two vfproj files and made it identical to the one that works. Still no luck. Anyone has any ideas as to what else could be different .
The vfproj file contents is given below
I have two identical Quickwin programs that I upgraded from Fortran 10 to XE Update 10, 12.1.353
There is a dialog box section where I use a listbox to populate all the files of a particular type in a browsed to directory. In one version it works and in the other version with exactly the same code it does not populate that list box.
As a history, earlier when I was in Windows XP and version 10 of the IVF, I had to use a StackReserveSize="160000000" StackCommitSize="160000000" for the program to launch. The XP compiled version would not work in Win 7 as it would freeze anytime I called the the browse command. In win7 I had to delete the StackSize restriction and recompile and it would work.
However now in win7 one version works perfectly and the other does not. I did a compareIT of the two vfproj files and made it identical to the one that works. Still no luck. Anyone has any ideas as to what else could be different .
The vfproj file contents is given below
The code for file browsing is identical in both projects
Thanks
Sumit
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you have any calls to GetForegroundWindow() in the code? If so, try replacing them with NULL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
No I do not have any calls to that . The piece of code that is not working on one project and working fine in the otheris
[bash]SUBROUTINE INPFILEDXF(DLG, ID, CALLBACKTYPE) USE IFCORE use IFPORT use IFQWIN USE INPUTINFO USE IFWINTY USE IFWIN use iflogm IMPLICIT NONE INCLUDE 'RESOURCE.FD' TYPE(DIALOG)DLG INTEGER(KIND=4)ID, CALLBACKTYPE TYPE (T_OPENFILENAME)FRED LOGICAL(KIND=4)RET INTEGER(KIND=4)IERROR,LENGTH Integer i CHARACTER(LEN=26*7)ALLFILTERS CHARACTER(LEN=60)DLGTITLE LOGICAL(KIND=4)CHECKED logical retlog character(256) checkstring character(10) text !CALL UNUSEDQQ(ID,CALLBACKTYPE) CALL ZeroMemory(LOC(FRED), SIZEOF(FRED)) ALLFILTERS = 'DXF CAD FILES(*.dxf)' // char(0) // & '*.dxf' // char(0) // & 'All files(*.*)' // char(0) // & '*.*' // char(0) // char(0) DLGTITLE = 'Choose DXF File'C FRED%LSTRUCTSIZE = sizeof(FRED) !+12 DXF_INP=trim(DXF_INP)//char(0) FRED%HWNDOWNER = NULL FRED%HINSTANCE = NULL FRED%LPSTRFILTER = LOC(ALLFILTERS) FRED%LPSTRCUSTOMFILTER = NULL FRED%NMAXCUSTFILTER = NULL FRED%NFILTERINDEX = 1 FRED%LPSTRFILE = LOC(DXF_INP) FRED%NMAXFILE = LEN(DXF_INP) FRED%LPSTRFILETITLE = NULL FRED%NMAXFILETITLE = NULL FRED%LPSTRINITIALDIR = NULL FRED%LPSTRTITLE = LOC(DLGTITLE) FRED%FLAGS = NULL !OFN_FILEMUSTEXIST + OFN_PATHMUSTEXIST + OFN_EXPLORER FRED%NFILEOFFSET = NULL FRED%NFILEEXTENSION = NULL FRED%LPSTRDEFEXT = NULL FRED%LCUSTDATA = NULL FRED%LPFNHOOK = NULL FRED%LPTEMPLATENAME = NULL RET = GETOPENFILENAME(FRED) CALL COMDLGER(IERROR) DXF_FILE_INP = .FALSE. IF(RET .AND. (IERROR == 0))THEN CALL READ_DXF write (text,'(I5)') Num_pts_Vert retlog =DlgSet (dlg, IDC_Num_pts,text) DXF_FILE_INP = .TRUE. ENDIF length = SPLITPATHQQ(dxf_INP, drive, dir, flname, ext) checkstring= trim(drive)//trim(dir)//'*.dxf' call SHOWPERMISSION(checkstring) retlog = DlgSet( dlg,IDC_DXF_LIST, num_of_files ) Do i=1,num_of_files retlog = DlgSet( dlg,IDC_DXF_LIST, flnm(i), i ) end do RETURN END SUBROUTINE INPFILEDXF[/bash]
No I do not have any calls to that . The piece of code that is not working on one project and working fine in the otheris
[bash]SUBROUTINE INPFILEDXF(DLG, ID, CALLBACKTYPE) USE IFCORE use IFPORT use IFQWIN USE INPUTINFO USE IFWINTY USE IFWIN use iflogm IMPLICIT NONE INCLUDE 'RESOURCE.FD' TYPE(DIALOG)DLG INTEGER(KIND=4)ID, CALLBACKTYPE TYPE (T_OPENFILENAME)FRED LOGICAL(KIND=4)RET INTEGER(KIND=4)IERROR,LENGTH Integer i CHARACTER(LEN=26*7)ALLFILTERS CHARACTER(LEN=60)DLGTITLE LOGICAL(KIND=4)CHECKED logical retlog character(256) checkstring character(10) text !CALL UNUSEDQQ(ID,CALLBACKTYPE) CALL ZeroMemory(LOC(FRED), SIZEOF(FRED)) ALLFILTERS = 'DXF CAD FILES(*.dxf)' // char(0) // & '*.dxf' // char(0) // & 'All files(*.*)' // char(0) // & '*.*' // char(0) // char(0) DLGTITLE = 'Choose DXF File'C FRED%LSTRUCTSIZE = sizeof(FRED) !+12 DXF_INP=trim(DXF_INP)//char(0) FRED%HWNDOWNER = NULL FRED%HINSTANCE = NULL FRED%LPSTRFILTER = LOC(ALLFILTERS) FRED%LPSTRCUSTOMFILTER = NULL FRED%NMAXCUSTFILTER = NULL FRED%NFILTERINDEX = 1 FRED%LPSTRFILE = LOC(DXF_INP) FRED%NMAXFILE = LEN(DXF_INP) FRED%LPSTRFILETITLE = NULL FRED%NMAXFILETITLE = NULL FRED%LPSTRINITIALDIR = NULL FRED%LPSTRTITLE = LOC(DLGTITLE) FRED%FLAGS = NULL !OFN_FILEMUSTEXIST + OFN_PATHMUSTEXIST + OFN_EXPLORER FRED%NFILEOFFSET = NULL FRED%NFILEEXTENSION = NULL FRED%LPSTRDEFEXT = NULL FRED%LCUSTDATA = NULL FRED%LPFNHOOK = NULL FRED%LPTEMPLATENAME = NULL RET = GETOPENFILENAME(FRED) CALL COMDLGER(IERROR) DXF_FILE_INP = .FALSE. IF(RET .AND. (IERROR == 0))THEN CALL READ_DXF write (text,'(I5)') Num_pts_Vert retlog =DlgSet (dlg, IDC_Num_pts,text) DXF_FILE_INP = .TRUE. ENDIF length = SPLITPATHQQ(dxf_INP, drive, dir, flname, ext) checkstring= trim(drive)//trim(dir)//'*.dxf' call SHOWPERMISSION(checkstring) retlog = DlgSet( dlg,IDC_DXF_LIST, num_of_files ) Do i=1,num_of_files retlog = DlgSet( dlg,IDC_DXF_LIST, flnm(i), i ) end do RETURN END SUBROUTINE INPFILEDXF[/bash]
and showpermission subroutine is

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page