Announcement

Collapse
No announcement yet.

ComDlg32.inc

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Per Fimmeland
    replied
    Borje,

    You where right about the Style member beeing declared as a LONG in PBNote.
    I changed it to a DWORD, - and got the GPF back.
    Changed calls to OpenFileDialog and SaveFileDialog in PBNote,
    (removed ByVal for the Style member), and now it works OK.

    -per


    ------------------

    Leave a comment:


  • Edwin Knoppert
    replied
    I make use of a copy of these procedures.
    The reason is that the selected filetype is not returned.
    Maybe this can be adjusted?
    The default filter size is also to small in my case.



    ------------------

    Leave a comment:


  • Borje Hagsten
    replied
    The dialogs returns flags too, like %OFN_READONLY. By declaring as BYVAL,
    you cannot get these return values. Error in PBNote sample probably
    originates from Style (flags) member being declared as LONG. Change
    that to DWORD in PBNote.bas instead and it should work. Current version
    of ComDlg32.inc is correct.


    ------------------

    Leave a comment:


  • Per Fimmeland
    replied
    Tom,

    The COMDLG32.INC is dated 09.07.2001 16.22, and has a size of 21 833
    It contains following information :
    ' Last Update: July 9, 2001

    I'm not sure about the PBNote Version.... how do I determine this ?
    maybe by "filestamp", as I've edited the file, I don't know the stamp
    for it, but the other files (.rc, .pbr & .ico) are stamped 01.07.1999 06.00,
    so I guess this might be version 6.00.

    I put the BYVAL in Comdlg32.inc :
    Code:
    FUNCTION SaveFileDialog ( _
    				 BYVAL hWnd AS LONG, _         ' parent window
                 BYVAL Caption AS STRING, _    ' caption
                 Filespec AS STRING, _         ' filename
                 BYVAL InitialDir AS STRING, _ ' start directory
                 BYVAL Filter AS STRING, _     ' filename filter
                 DefExtension AS STRING, _     ' default extension
            >>>> BYVAL Flags AS DWORD _        ' flags                        
            		 ) AS LONG
    
    FUNCTION OpenFileDialog ( _
    				 BYVAL hWnd AS LONG, _            ' parent window
                 BYVAL Caption AS STRING, _       ' caption
                 Filespec AS STRING, _            ' filename
                 BYVAL InitialDir AS STRING, _    ' start directory
                 BYVAL Filter AS STRING, _        ' filename filter
                 BYVAL DefExtension AS STRING, _  ' default extension
            >>>> BYVAL Flags AS DWORD _           ' flags
                 ) AS LONG
    No changes of the actual calls in PBNote :

    Code:
       If OpenFileDialog(hWndMain, "Open File", f, Path, "Text Files|*.TXT|All Files|*.*", "TXT", ByVal Style) THEN
    
       If ISFALSE(SaveFileDialog(hWndMain, "Save File", f, Path,"Text Files|*.TXT|All Files|*.*", "TXT", ByVal Style)) Then
    -per


    ------------------

    Leave a comment:


  • Tom Hanlin
    replied
    Which version of PBNote and which version of ComDlg32.inc were involved, and where did you put the BYVAL...?

    ------------------
    Tom Hanlin
    PowerBASIC Staff

    Leave a comment:


  • Per Fimmeland
    started a topic ComDlg32.inc

    ComDlg32.inc


    I Think the ComDlg32.inc needs a minor adjustment.
    Playing with the PBNote sample, the OpenFileDialog and
    SaveFileDialog functions GPF'ed, and what caused the GPF'ing
    was the statement :
    Code:
        ofn.Flags             = Flags
    By adding BYVAL to the Flags argument the GPF'ing stopped...

    -per



    ------------------
Working...
X