SlideShare a Scribd company logo
Text app
To write an implied text on client area, edit the
function CTextView::OnDraw(CDC* pDC)
void CTextView::OnDraw(CDC* pDC)
{
CTextDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
if (!pDoc)
return;
// TODO: add draw code for native data here
pDC->TextOut(30, 30, _T("Text"));
}
void CTextView::OnLButtonDown(UINT nFlags,
CPoint point)
{
// TODO: Add your message handler code here and/or call default
CClientDC dc(this);
dc.TextOut(60, 60, _T("Alt text"));
CView::OnLButtonDown(nFlags, point);
}
MFC Text app

More Related Content

What's hot

Tugas kelompok 3.2
Tugas kelompok 3.2Tugas kelompok 3.2
Tugas kelompok 3.2
1300018075
 
Progrma para calcular los numeros pares e impares
Progrma para calcular los numeros pares e imparesProgrma para calcular los numeros pares e impares
Progrma para calcular los numeros pares e imparesnacho155
 
Progrma para calcular los numeros pares e impares
Progrma para calcular los numeros pares e imparesProgrma para calcular los numeros pares e impares
Progrma para calcular los numeros pares e imparesnacho155
 
Infix prefix postfix expression -conversion
Infix  prefix postfix expression -conversionInfix  prefix postfix expression -conversion
Infix prefix postfix expression -conversion
Syed Mustafa
 
Event loops in java script 01 - stack
Event loops in java script 01 - stackEvent loops in java script 01 - stack
Event loops in java script 01 - stack
Vishnu Padmanabhan
 
C Program : Sorting : Bubble,
C Program : Sorting : Bubble, C Program : Sorting : Bubble,
C Program : Sorting : Bubble, Meita Jayani
 
Latihan individu
Latihan individuLatihan individu
Latihan individu1300018078
 
Programa de los vectores
Programa de los vectoresPrograma de los vectores
Programa de los vectoresmarearoja007
 
MFC ELC
MFC ELCMFC ELC
Linker
LinkerLinker
Bcsl 033 data and file structures lab s1-2
Bcsl 033 data and file structures lab s1-2Bcsl 033 data and file structures lab s1-2
Bcsl 033 data and file structures lab s1-2
Dr. Loganathan R
 
MFC List box
MFC List boxMFC List box
MFC List box
Razvan Raducanu, PhD
 
Memoria dinámica ejercicio
Memoria dinámica ejercicioMemoria dinámica ejercicio
Memoria dinámica ejercicio
Georghe
 
exercise of basic computer programming.docx
exercise of basic computer programming.docxexercise of basic computer programming.docx
exercise of basic computer programming.docx
miftah88
 
Wave ECG
Wave ECGWave ECG
Program using function overloading
Program using function overloadingProgram using function overloading
Program using function overloading
Swarup Boro
 

What's hot (17)

program sederhana
program sederhanaprogram sederhana
program sederhana
 
Tugas kelompok 3.2
Tugas kelompok 3.2Tugas kelompok 3.2
Tugas kelompok 3.2
 
Progrma para calcular los numeros pares e impares
Progrma para calcular los numeros pares e imparesProgrma para calcular los numeros pares e impares
Progrma para calcular los numeros pares e impares
 
Progrma para calcular los numeros pares e impares
Progrma para calcular los numeros pares e imparesProgrma para calcular los numeros pares e impares
Progrma para calcular los numeros pares e impares
 
Infix prefix postfix expression -conversion
Infix  prefix postfix expression -conversionInfix  prefix postfix expression -conversion
Infix prefix postfix expression -conversion
 
Event loops in java script 01 - stack
Event loops in java script 01 - stackEvent loops in java script 01 - stack
Event loops in java script 01 - stack
 
C Program : Sorting : Bubble,
C Program : Sorting : Bubble, C Program : Sorting : Bubble,
C Program : Sorting : Bubble,
 
Latihan individu
Latihan individuLatihan individu
Latihan individu
 
Programa de los vectores
Programa de los vectoresPrograma de los vectores
Programa de los vectores
 
MFC ELC
MFC ELCMFC ELC
MFC ELC
 
Linker
LinkerLinker
Linker
 
Bcsl 033 data and file structures lab s1-2
Bcsl 033 data and file structures lab s1-2Bcsl 033 data and file structures lab s1-2
Bcsl 033 data and file structures lab s1-2
 
MFC List box
MFC List boxMFC List box
MFC List box
 
Memoria dinámica ejercicio
Memoria dinámica ejercicioMemoria dinámica ejercicio
Memoria dinámica ejercicio
 
exercise of basic computer programming.docx
exercise of basic computer programming.docxexercise of basic computer programming.docx
exercise of basic computer programming.docx
 
Wave ECG
Wave ECGWave ECG
Wave ECG
 
Program using function overloading
Program using function overloadingProgram using function overloading
Program using function overloading
 

More from Razvan Raducanu, PhD

12. edit record
12. edit record12. edit record
12. edit record
Razvan Raducanu, PhD
 
11. delete record
11. delete record11. delete record
11. delete record
Razvan Raducanu, PhD
 
10. view one record
10. view one record10. view one record
10. view one record
Razvan Raducanu, PhD
 
9. add new record
9. add new record9. add new record
9. add new record
Razvan Raducanu, PhD
 
8. vederea inregistrarilor
8. vederea inregistrarilor8. vederea inregistrarilor
8. vederea inregistrarilor
Razvan Raducanu, PhD
 
7. copy1
7. copy17. copy1
6. hello popescu 2
6. hello popescu 26. hello popescu 2
6. hello popescu 2
Razvan Raducanu, PhD
 
5. hello popescu
5. hello popescu5. hello popescu
5. hello popescu
Razvan Raducanu, PhD
 
4. forme in zend framework 3
4. forme in zend framework 34. forme in zend framework 3
4. forme in zend framework 3
Razvan Raducanu, PhD
 
3. trimiterea datelor la vederi
3. trimiterea datelor la vederi3. trimiterea datelor la vederi
3. trimiterea datelor la vederi
Razvan Raducanu, PhD
 
2.routing in zend framework 3
2.routing in zend framework 32.routing in zend framework 3
2.routing in zend framework 3
Razvan Raducanu, PhD
 
1. zend framework intro
1. zend framework intro1. zend framework intro
1. zend framework intro
Razvan Raducanu, PhD
 
18. images in symfony 4
18. images in symfony 418. images in symfony 4
18. images in symfony 4
Razvan Raducanu, PhD
 
17. delete data
17. delete data17. delete data
17. delete data
Razvan Raducanu, PhD
 
16. edit data
16. edit data16. edit data
16. edit data
Razvan Raducanu, PhD
 
15. view single data
15. view single data15. view single data
15. view single data
Razvan Raducanu, PhD
 
14. add data in symfony4
14. add data in symfony4 14. add data in symfony4
14. add data in symfony4
Razvan Raducanu, PhD
 
13. view data
13. view data13. view data
13. view data
Razvan Raducanu, PhD
 
12.doctrine view data
12.doctrine view data12.doctrine view data
12.doctrine view data
Razvan Raducanu, PhD
 
11. move in Symfony 4
11. move in Symfony 411. move in Symfony 4
11. move in Symfony 4
Razvan Raducanu, PhD
 

More from Razvan Raducanu, PhD (20)

12. edit record
12. edit record12. edit record
12. edit record
 
11. delete record
11. delete record11. delete record
11. delete record
 
10. view one record
10. view one record10. view one record
10. view one record
 
9. add new record
9. add new record9. add new record
9. add new record
 
8. vederea inregistrarilor
8. vederea inregistrarilor8. vederea inregistrarilor
8. vederea inregistrarilor
 
7. copy1
7. copy17. copy1
7. copy1
 
6. hello popescu 2
6. hello popescu 26. hello popescu 2
6. hello popescu 2
 
5. hello popescu
5. hello popescu5. hello popescu
5. hello popescu
 
4. forme in zend framework 3
4. forme in zend framework 34. forme in zend framework 3
4. forme in zend framework 3
 
3. trimiterea datelor la vederi
3. trimiterea datelor la vederi3. trimiterea datelor la vederi
3. trimiterea datelor la vederi
 
2.routing in zend framework 3
2.routing in zend framework 32.routing in zend framework 3
2.routing in zend framework 3
 
1. zend framework intro
1. zend framework intro1. zend framework intro
1. zend framework intro
 
18. images in symfony 4
18. images in symfony 418. images in symfony 4
18. images in symfony 4
 
17. delete data
17. delete data17. delete data
17. delete data
 
16. edit data
16. edit data16. edit data
16. edit data
 
15. view single data
15. view single data15. view single data
15. view single data
 
14. add data in symfony4
14. add data in symfony4 14. add data in symfony4
14. add data in symfony4
 
13. view data
13. view data13. view data
13. view data
 
12.doctrine view data
12.doctrine view data12.doctrine view data
12.doctrine view data
 
11. move in Symfony 4
11. move in Symfony 411. move in Symfony 4
11. move in Symfony 4
 

MFC Text app

  • 2.
  • 3.
  • 4.
  • 5. To write an implied text on client area, edit the function CTextView::OnDraw(CDC* pDC) void CTextView::OnDraw(CDC* pDC) { CTextDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); if (!pDoc) return; // TODO: add draw code for native data here pDC->TextOut(30, 30, _T("Text")); }
  • 6.
  • 7.
  • 8.
  • 9. void CTextView::OnLButtonDown(UINT nFlags, CPoint point) { // TODO: Add your message handler code here and/or call default CClientDC dc(this); dc.TextOut(60, 60, _T("Alt text")); CView::OnLButtonDown(nFlags, point); }