Sunday, November 1, 2009

Extra Practical List for Practice in VC++

1. Print Hello World! at top-left corner of the window using MDI
Application.

2. Change the color of Ellipse when the user presses the left mouse
button while the mouse pointer is inside the rectangle that bounds
the ellipse using MDI Application.

3. Change the color of Ellipse when the user presses the left mouse
button while the mouse pointer is inside the ellipse using MDI
Application.

4. Create Dialog based Application with command button and MessageBox()
(Use all Parameters) to print the message whenever user clicks on
command button.

5. Create Dialog based Application with command button and MessageBox()
(Use all Parameters) to print the message and to count the no. of
clicks on command button.

6. Create Dialog based Application with Five command buttons (First
two have the caption Disable & Hide accordingly). If user presses
the Disable button the rest of the three buttons (Left, Center &
Right) should disable and the Caption is changed to Enable. Apply
the same thing for the Hide button. Hide the buttons and change the
Caption to Show.

7. Create a dialog based Application with Radio Buttons to display the
message with the place user selected along with hotel type (Luxury,
Standard & Economy).

8. Create a Dialog based Application with Static Texts to get the
information like Computer Name, Total Memory, Free Memory and Total
Load on processor.

9. Create a Dialog based Application with Edit Boxes to give the
effect of first text box into second as user changes the text in
first.

10. Write a program that sorts strings stored in an object of
CStringList class.( Use Win32 Console Application)

11. Write a program to create chessboard like boxes (8 X 8) in the
client area. If the window is resized the boxes should also get
resized so that all the 64 boxes would be visible at all times.

12. Write a program to draw a circle, a polygon and a rectangle in the
client area. Create your own pen and brush. Each shape should be
drawn with different pen and brush.

13. Draw a graph . Take suitable points to draw the graph. Draw the lines representing x and y-axis in blue color. Draw rectangles with blue pen and yellow brush.

14. Write a program to draw three rectangles of suitable size using
following three brushes to fill the insides of the rectangle:
- Solid brush of yellow color
- Hatch brush of green color and a suitable pattern
- Pattern brush of blue color with the pattern showing small
dots.

15. Write a program to draw two lines, a vertical and a horizontal, so
that they intersect each other in the center of the window. Draw a
circle having the point of intersection of lines as the center and
radius as 100. Make a provision that if size of the window is
changed the lines and circle should get readjusted accordingly.

16. Write a program to draw 10 successive circles starting from the
smallest to biggest. All the circles must be visible.

17. Write a program through which the user would be able to draw a
rectangle interactively having a border of red color and thickness
5 pixels. One corner of the rectangle would be chosen by clicking
the left mouse button, whereas, for selecting the other corner the
user must be able to drag the mouse. As the mouse is dragged the
size of the rectangle must change.

18. Write a program such that when the user clicks left mouse button in
the client area then a string Hello should get displayed at the
point where the mouse has been clicked. Also make a provision that
every time the user clicks, the string should get written with
different font. Every time the font should be selected randomly.

19. Write a program to draw a freehand drawing.

20. Write a program that displays an animated cursor for the client
window.

21. Write a program that displays four graphical images in the view
window. When a user clicks on any one of the images other images
should be wiped off and the selected one should get enlarged so that
it covers the entire view window.

22. Write a program to display an image in the view window. Suppose the
image contains three colorspink, yellow and brown. If the user clicks
on the pink color a message box should pop up and display the red,
green and blue components of the color.

23. Create an application that provides a menu containing options like-
Color, Font, Attributes, Remove and Copy. On clicking a menu item a
common dialog related to the selected option should get displayed
from where user can make selections.

24. Create an application that would allow to set a different desktop
wallpaper, menu color, mouse double-click time, swap mouse buttons
etc.

25. Create an application for client-server communication (Chat
Application).

26. Create a FTP client which will allows you to download and upload
files on FTP Server.

27. Create a dialog-based application. On clicking Start button,
filenames should get displayed in the static control. The displaying
of filenames should stop the moment user click Stop button. The
window should get closed on clicking the Close. (Hint : Use
Multithreading).

28. Create a Web Browser. (Hint : Use SDI Application and derive the
class from CHtmlView class.

29. Create a line drawing Application using SDI Application and Document
View Architecture support. ( Hint : Derive class from CScrollView).

30. Create an ActiveX Control digital clock.


Courtesy by: Dhaval Thaker,Lecturer,Department of Computer Science,HNGU,Patan

1 comment:

Note: Only a member of this blog may post a comment.