Announcement

Collapse
No announcement yet.

DDT: Set Program/dialog icon?

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

  • DDT: Set Program/dialog icon?

    I have created an application, for the first time using DDT instead of API/SDK methods.

    I followed the sample program supplied in that the WinMain procedure program consists of a DIALOG NEW..CONTROL ADD...DIALOG SHOW MODAL; i.e, there is no "CreateWindow" for the application.

    When I minimize the dialog box, I get the 'Flying Windows' default icon. Is there a way to change the icon which shows on the taskbar?


    Question 2: Does anyone know where I can get a a collection of 'canned' icon files for use with these programs? (Cheap?)


    Thanks,



    ------------------
    Michael Mattias
    Racine WI USA
    [email protected]
    Michael Mattias
    Tal Systems Inc. (retired)
    Racine WI USA
    [email protected]
    http://www.talsystems.com

  • #2
    Here's what I do...

    Code:
    case %WM_INITDIALOG
          dialog send cbhndl, %WM_SETICON, %TRUE, LoadIcon(GetModuleHandle(byval %NULL), byval %IDC_APPLICATION)
    ------------------
    Cheers

    Comment


    • #3
      michael,

      listed below is a powerbasic forum thread that has a lot of info related to
      this topic. but the easiest way that i have found is to simply add the
      following:

      Code:
         case %wm_initdialog
               'show application icon
               hicon = loadimage(byval %null, bycopy "myicon.ico", %image_icon, 0, 0,_
                                 %lr_loadfromfile or %lr_defaultsize)
               dialog send hwnd, %wm_seticon, %icon_big, hicon
      to allow explorer to show the icon, you can create myicon.pbr from myicon.rc
      which contains the line: myicon icon myicon.ico

      and include it with #resource "myicon.pbr"





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

      Comment


      • #4
        Michael,

        Have a look at http://winfiles.cnet.com/apps/98/icons-misc.html , where you'll find
        tens of thousands of freeware icons.

        Paul


        [This message has been edited by Paul Noble (edited September 02, 2000).]
        Zippety Software, Home of the Lynx Project Explorer
        http://www.zippety.net
        My e-mail

        Comment


        • #5
          Thanks to Mr Smit; WM_SETICON worked good

          Thanks to Mr Noble; I'm on my way to the site mentioned.

          (I cannot draw an icon to save my life).

          MCM
          Michael Mattias
          Tal Systems Inc. (retired)
          Racine WI USA
          [email protected]
          http://www.talsystems.com

          Comment

          Working...
          X