Page 219 - DCAP408_WEB_PROGRAMMING
P. 219

Unit 13: Windows GDI




          needs to be redrawn (or NULL for the whole window) and a Boolean indicating if you wish the  Notes
          window to be cleared first. So the standard call for clearing the whole window is:
          InvalidateRect(hWnd,NULL,TRUE);

          Self Assessment


          Fill in the blanks:
          1.   To display some text you can use the ……………………  function.
          2.   To obtain the handle you call: BeginPaint, it takes your window handle and a pointer to a
               ………………………………..  that you have declared.
          3.   We can  use  a  macro (RGB)  to  convert  from  three Red, Green  and Blue  values  to  a
               …………………………….. type.

          4.   Additionally the colour you want to set the …………………….. to can be provided.
          5.   You can use ……………………. and LineTo to position a pen on the screen and draw a line
               to another position.

          6.   ……………………  draws lines between points defined in an array you pass to the function.
          7.   Additionally the user can simply alter the ………………. of your window at any time.
          8.   You can use a bitmap as a repeating pattern for your brush using ………………………….
          9.   A ………………….. defines the style and colour that pixels will be drawn in while a brush
               determines the fill colour of shapes.
          10.  The ………………….. structure contains member variables left, right, top and bottom.


             

             Caselet     Banking on BlackBerry

                  here's this old joke about two campers who spy a grizzly coming towards them
                  from afar. One of them immediately takes off his shoes and substitutes them for
             Trunners. "Why are you doing that? You can't outrun that bear even with running
             shoes," said his friend, to which he replied, "Who cares about the grizzly? All I have to do
             is outrun you."
             Employ  this  logic  in  the  real  world,  and  you  see  a  similar  situation  with  mobile
             manufacturers who are busy trying to woo users, and have to keep developers on their
             side. Because if you can't attract developers, you won't get any great apps, and without
             apps, your smartphone isn't worth the pixels on its screen.

             Rise of the Underdog?

             In this game, BlackBerry is at a slight disadvantage because it is not perceived to be a big
             player, and so has to strive a little harder to keep up.

             Pointing this out, Anil Pai, Mobile Security Analyst, TCS, says, "Android and iPhone are
             the market leaders, followed by Windows. BlackBerry is in the fourth spot and may pick
             up in future." Pai says that the launch of the QNX operating system for BlackBerry in a few
                                                                                 Contd...




                                           LOVELY PROFESSIONAL UNIVERSITY                                   213
   214   215   216   217   218   219   220   221   222   223   224