Announcement

Collapse
No announcement yet.

Can't add dialog icon using PbForms

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

  • Can't add dialog icon using PbForms

    Using the latest version of PBForms and PBWin and for some
    reason no code is generated to create the dialog icon.
    When selecting the icon it displays correctly, but not
    in the compiled program or when testing.
    Is there a certain style or option that needs to be set?

    ------------------
    The world is full of apathy, but who cares?

  • #2
    If you want to set an icon for an app, add it into a resource and send %WM_SETICON to your dialog on dialog startup either in the dialog show procedure or under %WM_INITDIALOG in the callback.

    If you'll search the forum on 'WM_SETICON' it will return some good code samples...

    ------------------
    Adam Drake
    PowerBASIC

    Comment


    • #3
      Mike,

      I just tried a blank dialog with an icon. No problems, The code is generated.
      Code:
          DIALOG NEW hParent, "test", 70, 70, 400, 246, %WS_POPUP OR %WS_BORDER OR _
              %WS_DLGFRAME OR %WS_CAPTION OR %WS_SYSMENU OR %WS_CLIPSIBLINGS OR _
              %WS_VISIBLE OR %DS_MODALFRAME OR %DS_3DLOOK OR %DS_NOFAILCREATE OR _
              %DS_SETFONT, %WS_EX_CONTROLPARENT OR %WS_EX_LEFT OR _
              %WS_EX_LTRREADING OR %WS_EX_RIGHTSCROLLBAR, TO hDlg
          DIALOG  SET ICON hDlg, "#" + FORMAT$(%IDR_IMGFILE1)
      However, as you will note PB-Forms is also generating the resource file and copying the selected icon there.
      Code:
          //#PBForms Begin RCData
          IDR_IMGFILE1    ICON   DISCARDABLE "C:\\PBWin80\\All_Projects\\Project101\\pdv_program_icon.ico"
          //#PBForms End RCData
      I'd suggest looking at the .rc and making sure the icon in that path is still there and is still valid. This does not sound like a PB/Forms issue, but is because of some other anomalie during development that is causing the icon not to be loaded.

      ------------------
      Rick Angell

      [This message has been edited by Richard Angell (edited September 21, 2005).]
      Rick Angell

      Comment


      • #4
        Re-installed PBforms and didn't correct.
        Wonder if a corrupted resource compiler or bad path?
        Just added an icon to a blank dialog and the icon doesn't
        appear in the testing window or generate any code.
        Used one of the icons supplied with Power Basic to
        rule out the icon itself. Are there setup files that
        can be wiped out and recreated in PbWin80 and Power Forms?



        ------------------
        The world is full of apathy, but who cares?

        Comment


        • #5
          PBforms will not generate the ICON information for me also.

          Had to add it to the define line
          add the RCdata line and
          then in the .BAS file add
          the constant and the DIALOG SET ICON statement
          all manually

          If I changed the dialog in PBform 1.5 it gets rid of the
          Icon as well



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

          Comment


          • #6
            Thank, Kerry. I know it worked before.

            ------------------
            The world is full of apathy, but who cares?

            Comment


            • #7
              don't click apply in powerforms, just ok after adding icon. http://www.powerbasic.com/support/pb...ead.php?t=9630

              r&d, hope you read this.

              ------------------
              The world is full of apathy, but who cares?

              Comment

              Working...
              X