Announcement

Collapse
No announcement yet.

Problem with comdlg32.inc

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

  • Problem with comdlg32.inc

    Hello,

    As I want to use the 'OpenfileDialog' and the 'SavefileDialog'
    Functions, I tried to include the'comdlg32.inc' into my program.
    But when compiling I get this error message:

    Code:
    Error 418 in C:\prog\pbdll\winapi\COMDLG32.INC(205:1): Statement expected
    Line 205: $LBSELCHSTRING = "commdlg_LBSelChangedNotidy"

    Can someone tell me, how I could fix this error ?
    I'm using PB/dll 5.0.
    thanks in advance
    cu


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

  • #2

    The latest API files are not compatible with PB/DLL 5 since it doesn't support string constants, you have to comment out each string constant for it to work.

    From win32api.inc...

    ' IMPORTANT: This file is not compatible with PB/DLL 5.0 or PB/CC 1.0
    ' as is. It uses string equates which are only available in
    ' PB/CC 2.0 or later and PB/DLL 6.0 or later. You will need
    ' to comment out the string equates to use this file with
    ' the earlier compilers.
    ------------------
    Kev G Peel
    KGP Software, Bridgwater, UK.
    mailto:[email protected][email protected]</A>
    kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

    Comment


    • #3
      Hi,
      Thanks for your reply. I did what you said and now the compiler
      doesn't complain any longer about the include-file. But another
      problem has occured.
      This function worked very well without including the comdlg32:
      Code:
      SUB SetText(hndle AS LONG, txt AS STRING)
          SendMessage hndle, %WM_SETTEXT, 0, STRPTR(txt)
      END SUB
      But now since I inluced the comdlg32, I get this error:
      Code:
      Error 477 in c:\...\prog.bas(11,17): Syntax error
      Line 11:  SendMessage hndle, %WM_SETTEXT, 0, STRPTR(txt)
      Maybe someone give me a hint again.
      Thank you very much.
      cu

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

      Comment


      • #4
        Edward,

        I can't tell what the problem is from the code you posted, however, check out the API 'SetWindowText' which does the same thing, ie:

        Code:
          SetWindowText hWnd, ByCopy MyStr$

        Hope that helps!

        ------------------
        Kev G Peel
        KGP Software, Bridgwater, UK.
        mailto:[email protected][email protected]</A>
        kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

        Comment

        Working...
        X