0% found this document useful (0 votes)
47 views3 pages

On Programming in Windows Laboratory Work nr.1

This document is a report from a student at the Technical University of Moldova about a laboratory work creating a simple "Hello World" program in Windows. The program creates a window class, registers the class, creates a window instance, and uses DrawText to display the text "Hello, Windows!" centered in the client area. The conclusion states that the program was successfully executed and the student gained experience with basic Windows programming in Microsoft Visual C++.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views3 pages

On Programming in Windows Laboratory Work nr.1

This document is a report from a student at the Technical University of Moldova about a laboratory work creating a simple "Hello World" program in Windows. The program creates a window class, registers the class, creates a window instance, and uses DrawText to display the text "Hello, Windows!" centered in the client area. The conclusion states that the program was successfully executed and the student gained experience with basic Windows programming in Microsoft Visual C++.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Ministry of Education, Science, Youth and Sports of Republic of Moldova

Technical University of Moldova


CIM Department
Report
n pro!rammin! in "indo#s
$aboratory #or% nr&'
Made by( student of !r& )*)+,-' .isov
I!or
/erified by( prof& Chihai /&
Laboratory work nr.1
E0ample of the first pro!ram(
1++++++++++++++++++++++++
1 2E$$"I3&M*4 ma%e file
1++++++++++++++++++++++++
hello#in&e0e ( hello#in&ob5
67$I34ER8 679UI)$*9S8 +UT(hello#in&e0e hello#in&ob5 679UI$I:S8
hello#in&ob5 ( hello#in&c
67CC8 67C)$*9S8 hello#in&c
;<++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2E$$"I3&C ++ Displays =2ello, "indo#s >-?= in client area
7c8 Charles .et@old, '>>A
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<;
1include B#indo#s&hC
$RESU$T C*$$:*C4 "nd.roc 72"3D, UI3T, ".*R*M, $.*R*M8 D
int "I3*.I "inMain 72I3ST*3CE hInstance, 2I3ST*3CE h.revInstance,
.STR s@Cmd$ine, int iCmdSho#8
E
static char s@*pp3ameFG H =2ello"in= D
2"3D h#nd D
MS9 ms! D
"3DC$*SSEI #ndclass D
#ndclass&cbSi@e H si@eof 7#ndclass8 D
#ndclass&style H CSJ2REDR*" K CSJ/REDR*" D
#ndclass&lpfn"nd.roc H "nd.roc D
#ndclass&cbClsE0tra H , D
#ndclass&cb"ndE0tra H , D
#ndclass&hInstance H hInstance D
#ndclass&hIcon H $oadIcon 73U$$, IDIJ*..$IC*TI38 D
#ndclass&hCursor H $oadCursor 73U$$, IDCJ*RR"8 D
#ndclass&hbr:ac%!round H 72:RUS28 9etStoc%b5ect 7"2ITEJ:RUS28 D
#ndclass&lps@Menu3ame H 3U$$ D
#ndclass&lps@Class3ame H s@*pp3ame D
#ndclass&hIconSm H $oadIcon 73U$$, IDIJ*..$IC*TI38 D
Re!isterClassE0 7L#ndclass8 D
h#nd H Create"indo# 7s@*pp3ame, ;; #indo# class name
=The 2ello .ro!ram=, ;; #indo# caption
"SJ/ER$*..ED"I3D", ;; #indo# style
C"JUSEDE)*U$T, ;; initial 0 position
C"JUSEDE)*U$T, ;; initial y position
C"JUSEDE)*U$T, ;; initial 0 si@e
C"JUSEDE)*U$T, ;; initial y si@e
3U$$, ;; parent #indo# handle
3U$$, ;; #indo# menu handle
hInstance, ;; pro!ram instance handle
3U$$8 D ;; creation parameters
Sho#"indo# 7h#nd, iCmdSho#8 D
Update"indo# 7h#nd8 D
#hile 79etMessa!e 7Lms!, 3U$$, ,, ,88
E
TranslateMessa!e 7Lms!8 D
DispatchMessa!e 7Lms!8 D
M
return ms!&#.aram D
M
$RESU$T C*$$:*C4 "nd.roc 72"3D h#nd, UI3T iMs!, ".*R*M #.aram, $.*R*M
l.aram8
E
2DC hdc D
.*I3TSTRUCT ps D
RECT rect D
s#itch 7iMs!8
E
;; case "MJCRE*TE (
;;.laySound 7=hello#in&#av=, 3U$$, S3DJ)I$E3*ME K S3DJ*SY3C8 D;;
;;return , D
case "MJ.*I3T (
hdc H :e!in.aint 7h#nd, Lps8 D
9etClientRect 7h#nd, Lrect8 D
Dra#Te0t 7hdc, =2ello, "indo#s >-? =, +', Lrect,
DTJSI39$E$I3E K DTJCE3TER K DTJ/CE3TER8 D
End.aint 7h#nd, Lps8 D
return , D
case "MJDESTRY (
.ostNuitMessa!e 7,8 D
return , D
M
return Def"indo#.roc 7h#nd, iMs!, #.aram, l.aram8 D
M
The output of the pro!ram #ill be (
Conclusion( *t this laboratory #or% #e did a #inOP aplication pro!ram and
e0ecuted it, #e obtained a result Q ' #indo# #ith the messa!e R2ello, #indo#s
>-S in it& Elaboratin! this laboratory #or% #e havenTt met bi! problems, #e have
made ourselves familiar #ith the basics of Microsoft visual CUU A&,

You might also like