Showing posts with label M.Sc (IT and CA). Show all posts
Showing posts with label M.Sc (IT and CA). Show all posts

Tuesday, November 17, 2009

How to Write a Program in Exam?

(1) Program or Question Title.
(2)Design




(3) Control Information.

Control Type
Control Name / ID
Member Variable Name
Variable Type
Validation / Extra Info.
EditBox
IDC_EDIT1
m_op1
int
value in[0,100]
EditBox
IDC_EDIT2
m_op2
int
value in[0,100]
EditBox
IDC_EDIT3
m_ans
int
value in[0,200]
Button
IDOK



Button
IDCANCEL




(4) Coding.

Filename : TempDlg.cpp



void CTempDlg::OnOK()
{
            UpdateData();
            m_ans=m_op1+m_op2;
            UpdateData(FALSE);
}         


* If you have done any initialization write with file and function/class structure.
** Always write the function signature in Code.

Monday, November 16, 2009

VC++ (Visual C++) Program List for Submission

 
M.Sc (IT & CA) Sem – I
Object Oriented Programming using Visual C++
List of Practical

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

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

Develop Calculator using Dialog.
Hint: 1 Edit Box, 4 Radio Buttons,
Error Message like Divide by 0 Error,
Use Appropriate Controls.
(3)
Create Dialog based Application as shown below with use of ListBox (3a) and ComboBox.(3b)

(4)
Create Dialog based Applications with two EditBox to show use of different String function and Show final answer in MessageBox.
Hint: 2 EditBox, Radio Buttons (Min 5), CheckBox (Min 5)
Create all Controls through Coding.
(5)
Create Dialog based Applications with multiple Dialog Box to Show functionality of ProgressBar and Slider.
Hint: 3 DialogBox ,
1-> Create and Send Message (Slider)
2-> Show the Status of Message (Progress Bar)
3-> Read Message
* If Possible Implement Vice-Versa and Use Animation.
(6)
Create Dialog based Application with Multiple Dialog box.

Create Dynamic Static Box in 1st Dialog with following values.
* Position where user press Left Button.
* Caption = Text in EditBox of 2nd Dialog Box.
(7)
Write a program to draw a line using three different mouse events.
Hint:

1-> LBUTTONDOWN
2-> LBUTTONUP
3-> MOUSEMOVE
(8)
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.
(9)
Write a program to Animate Circle.
Hint:

* Circle should be Moved from one Point to Another.
* While Moving towards another Point its size should be Changed.
(10)
Write a program to Make Simple Text Editor.
Hint:

* Use Virtual Key.
* User Can Enter and Edit Text.

Submission Date : 15-Nov-2009

VC++ Practical List - Done in Class and LAB

List of Practical For LAB


(1) TAKE TWO EDITBOX ENTER VALUE IN IT AND PRINT THE ADDITION OF THE VALUE IN THIRD EDITBOX BY CLICK ON BUTTON.

(2) WRITE A PROGRAM TO ENABLE & DISABLE EDIT BOX.

(3) WRITE A PROGRAM TO CREATE TWO EDIT BOX DYNAMICALLY & THEN SWAP THE VALUE OF EDIT BOX WHEN CLICK ON BUTTON.

(4) WRITE A PROGRAM TO SWAP THE VALUE OF STATICBOX & EDITBOX.

(5) STRING MANIPULATION ON SELECTION OF RADIO BUTTON
  - CHANGE INTO UPPER CASE
  - CHANGE INTO LOWER CASE
  - REVERSE THE STRING
  - CALCULATE CHARACTER IN STRING
  - MAKE STRING IN PROPER CASE

(6) WRITE A PROGRAM TO DEVELOP SIMPLE CALCULATOR.

(7) WRITE A PROGRAM TO SPLIT THE SENTENCE ENTER IN TEXTBOX TO LIST BOX
HINT : TEXT BOX: "THIS IS MY BOOK"
 LIST BOX:   THIS
                        IS
                        MY
                        BOOK

(8) TAKE TWO LIST BOX AND TRANSFER VALUES ONE LISTBOX TO ANOTHER LISTBOX ONE BY ONE AND ALL AT ONCE WHEN USER CLICKS TWO DIFFERENT BUTTONS RESPECTIVELY.
(Develop Same Application Using COMBOBOX Also)

(9) WRITE A PROGRAM TO IMPLEMENT SCROLLBAR AND PRINT THE POSITION OF SCROLLBAR IN NON CLIENT AREA. (TITLE BAR OF DIALOG)

(10) MAKE AN APPLICATION OF SALES DETAIL WHICH CONTAIN FOLLOWING DETAIL.
 - ITEM NAME
 - ITEM PRICE
 - QUANTITY
 - TOTAL AMOUNT.

(11) MAKE YOUR OWN FUCTION AND MAP IT WITH ANY WINDOWS OR CONTROL EVENT USING MESSAGE MAP.

(12) PRINT CURRENT CURSOR POSITION INTO EDITBOX AND ON TITLEBAR.

(13) PRINT TEXT FROM EDITBOX WHERE USER CLICK ON SCREEN.

(14) Create Dialog based Applications with multiple Dialog Box to Show functionality of ProgressBar and Slider.
Hint: 3 - DIALOGBOX,
          1-> Create and Send Message (Slider)
          2-> Show the Status of Message (Progress Bar)
          3-> Read Message

(15) DRAW LINE USING ALL MOUSE EVENTS.
    (1) BUTTONDOWN AND BUTTONUP
    (2) MOUSEMOVE

(16) 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.

(17) Write a program to Animate Circle OR Rectangle.
Hint: * Circle should be Moved from one Point to Another.
            * While Moving towards another Point its size AND COLOR   should be Changed.

(18) Write a program to draw a circle, a polygon and a rectangle in the client area. Shape should be selected from Menu or Toolbar.(Create New Menu and Buttons in Toolbar)

(19) Write a program to change font using font Dialog.

(20) Write a Program to Change Color of Text, Pen and Brush using Color Dialog.

Saturday, November 14, 2009

VC++ (Visual C++) Syllabus , AITS (Atmiya Institute) , Rajkot

Paper - 101 Object Oriented Programming using Visual C++
 
  • Introduction to OOP
  • Basic OOP Concepts & Applications
  • Introduction of VC++
  • Controls usages in Application
  • Mouse and Keyboard integration
  • Dialog based Application
  • Message Handling Mechanism
  • Multiple Dialog Handling
  • Documents, Views, and the Single Document Interface
  • Scroll Views, HTML Views, and Other View Types
  • Menu Environment
  • Text and Fonts handling
  • Incorporating Graphics, Drawing and Bitmaps
  • Device Contexts and GDI Objects
  • Single Document Interface Application
  • Multiple Documents and Multiple Views
  • CArchive and CFile classes
  • Database handling using ODBC
  • Database handling using DAO
  • Database handling using OLEDB
  • Error Detection and Exception Handling
  • Toolbars, Status Bars, and Rebars
  • Serialization
  • Creating DLLs (COM) using ATL & App Wizard
  • ActiveX Controls integration in VC++ application
  • Creating ActiveX controls

Reference Books:
 
Mastering VC++, BPB Publication
Practical VC++, PHI Publication
VC++ Unleashed, Techmedia Publication
Programming VC++, Microsoftpress Publication

Thursday, November 12, 2009

How to Use Bitmap in SDI? ( VC++)

void CBitmapView::OnDraw(CDC* pDC)
{
CBitmapDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);



CBitmap bm;
CRect rc;
CBrush br;
bm.LoadBitmap(IDB_BITMAP1);
br.CreatePatternBrush(&bm);
GetClientRect(&rc);
//rc.bottom=100;
//rc.top=50;
//rc.left=50;
//rc.right=100;
pDC->FillRect(rc,&br);


// TODO: add draw code for native data here


}


void CBitmapView::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CClientDC * Bms=new CClientDC(this);
if(point.x >= i && point.x <=j && point.y >=i && point.y <= j) { RedrawWindow(); CBrush br1; br1.CreateSolidBrush(RGB(100,100,50)); CRect rc1(i,i,j,j); Bms->FillRect(rc1,&br1);

}
CView::OnLButtonDown(nFlags, point);
}

Wednesday, November 11, 2009

nSBCode value for ScrollBar Control

SB_UP -- Scroll far to up.
SB_DOWN -- Scroll far to down.
SB_LINEUP -- Scroll to Upper side.
SB_LINEDOWN -- scroll to down side.
SB_LEFT -- Scroll far to left.
SB_RIGHT -- Scroll far to right.
SB_ENDSCROLL -- End scroll.
SB_LINELEFT -- Scroll left.
SB_LINERIGHT -- Scroll right.
SB_PAGELEFT -- Scroll one page left.
SB_PAGERIGHT -- Scroll one page right
SB_THUMBTRACK --
Drag scroll box to specified position.
nPos is the position that the scroll box has been dragged to.
SB_THUMBPOSITION --
Scroll to absolute position. nPos is the position of the
scroll box at the end of the drag operation.

Monday, November 9, 2009

Create RunTime EditBox,Radio Buttons & Check Box

BOOL CMy4_EdRdCkDlg::OnInitDialog()
{
CEdit *ed=new CEdit;
CEdit *ed1=new CEdit;

ed->Create(ES_MULTILINE|WS_CHILD|WS_VISIBLE
|WS_TABSTOP|WS_BORDER,CRect(30,30,130,70),this,1);

ed1->Create(ES_MULTILINE|WS_CHILD|WS_VISIBLE
|WS_TABSTOP|WS_BORDER,CRect(150,30,270,70),this,2);

CButton *ck1=new CButton;
CButton *ck2=new CButton;
CButton *ck3=new CButton;
CButton *ck4=new CButton;
CButton *ck5=new CButton;

ck1->Create("Check1",WS_CHILD|WS_VISIBLE
|BS_AUTOCHECKBOX,CRect(30,80,150,110),this,21);

ck2->Create("Check2",WS_CHILD|WS_VISIBLE
|BS_AUTOCHECKBOX,CRect(30,110,150,140),this,22);

ck3->Create("Check3",WS_CHILD|WS_VISIBLE
|BS_AUTOCHECKBOX,CRect(30,140,150,170),this,23);

ck4->Create("Check4",WS_CHILD|WS_VISIBLE
|BS_AUTOCHECKBOX,CRect(30,170,150,200),this,24);

ck5->Create("Check5",WS_CHILD|WS_VISIBLE
|BS_AUTOCHECKBOX,CRect(30,200,150,230),this,25);

CButton *rd1=new CButton;
CButton *rd2=new CButton;
CButton *rd3=new CButton;
CButton *rd4=new CButton;
CButton *rd5=new CButton;

rd1->Create("Redio1",WS_CHILD|WS_VISIBLE|WS_GROUP
|WS_TABSTOP|BS_AUTORADIOBUTTON,CRect(150,80,270,110),this,11);

rd2->Create("Redio2",WS_CHILD|WS_VISIBLE|WS_TABSTOP
|BS_AUTORADIOBUTTON,CRect(150,110,270,140),this,11);

rd3->Create("Redio3",WS_CHILD|WS_VISIBLE|WS_TABSTOP
|BS_AUTORADIOBUTTON,CRect(150,140,270,170),this,11);

rd4->Create("Redio4",WS_CHILD|WS_VISIBLE|WS_TABSTOP
|BS_AUTORADIOBUTTON,CRect(150,170,270,200),this,11);

rd5->Create("Redio5",WS_CHILD|WS_VISIBLE|WS_TABSTOP
|BS_AUTORADIOBUTTON,CRect(150,200,270,230),this,11);

return TRUE; // return TRUE unless you set the focus to a control
}

Saturday, November 7, 2009

List of Function in VC++, Explain with Example


  1. GetClientRect
  2. CloseWindow
  3. GetDlgItem
  4. EnableWindow
  5. Invalidate
  6. RedrawWindow
  7. GetWindowText
  8. SetWindowText
  9. GetScrollPos
  10. GetScrollRange
  11. SetScrollPos
  12. SetScrollRange
  13. SetTimer
  14. MessageBox
  15. GetCurSel
  16. GetLBText
  17. GetLBTextLen
  18. AddString
  19. DeleteString
  20. InsertString
  21. ResetContent
  22. GetCount
  23. GetText
  24. GetTextLen
  25. UpdateData
  26. MoveTo
  27. LineTo
  28. Rectangle
  29. Ellipse
  30. DoModal
  31. atoi 
  32. IsEmpty
  33. Empty
  34. GetAt
  35. SetAt
  36. MakeLower
  37. MakeUpper
  38. MakeReverse
  39. Remove
  40. Format
  41. Insert
  42. Delete
  43. Find
  44. ReverseFind
  45. SetRange
  46. GetRange
  47. GetPos
  48. SetPos
  49. OffsetPos
  50. SetStep
  51. StepIt
Explain All Function in Brief. Write Explanation in Notebook.

Wednesday, November 4, 2009

Line Draw Program OnMouseMove_Evet

void CMouse_Move_EventView::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
//start=point;
if(i==0)
{
start=point;
}
else
{
CClientDC *kBC = new CClientDC(this);
kBC->MoveTo (start);
kBC->LineTo (point.x,point.y);
start=point;
}
i++;


CView::OnMouseMove(nFlags, point);
}

void CMouse_Move_EventView::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
/*start=point;

CClientDC *kBC = new CClientDC(this);
kBC->MoveTo (start);
kBC->LineTo (point.x,point.y);*/
CView::OnLButtonDown(nFlags, point);
}