School Work

Drawing Polygon

Description
Program for drawing polygon using VC++
Categories
Published
of 15
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Share
Transcript
  POLYGONPROGRAM: #include<windows.h>const char g_szClassName[]= myWindowsClass !$%!& C'!!('C) Wnd*roc+,WN- hwnd%/N& msgW*''0 w*aram!*''0 l*aram12,-C hdc*'/N&$&%C& 3s*4/N& 3array[56]=256768676865696569686:686:696769676:656:6;switch+msg12case W0_*'/N&hdc=(egin*aint+hwnd3s1$elect4?ect+hdc@et$tocA4?ect+@'B_(%$,11$et*olyill0ode+hdc'!&N'&1*olygon+hdc3array561nd*aint+hwnd3s1return 6case W0_C!4$-estroyWindow+hwnd1 reaAcase W0_-$&4B*ostDuit0essage+61 reaAdeEaultreturn -eEWindow*roc+hwndmsgw*araml*aram1;return 6;  int W/N'*/ Win0ain+,/N$&'NC h/nstance,/N$&'NC h*reF/nstance!*$& l3Cmd!ineint nCmd$how12WN-C!'$$G wc,WN- hwnd0$@ 0sgwc.c$ize=sizeoE+WN-C!'$$G1wc.style=6wc.l3EnWnd*roc=Wnd*rocwc.cClsHtra=6wc.cWndHtra=6wc.h/nstance=h/nstancewc.h/con=!oad/con+N%!!/-/_'**!/C'&/4N1wc.hCursor=!oadCursor+N%!!/-C_'4W1wc.hr(acAground=+,(%$,1+C4!4_W/N-4WI51wc.l3sz0enuName=N%!!wc.l3szClassName=g_szClassNamewc.h/con$m=!oad/con+N%!!/-/_'**!/C'&/4N1iE+JegisterClassH+wc1120essage(oH+N%!! Window egistration ailed  rrorJ 0(_/C4NGC!'0'&/4NK0(_4)1return 6;hwnd = CreateWindowH+W$_G_C!/N&-@g_szClassName illed 'rea W$_4L!'**-W/N-4WCW_%$-'%!&CW_%$-'%!&M65M6N%!!N%!!h/nstanceN%!!1iE+hwnd == N%!!120essage(oH+N%!! Window Creation ailed  rrorJ 0(_/C4NGC!'0'&/4NK0(_4)1return 6  ;$howWindow+hwndnCmd$how1%3dateWindow+hwnd1while+@et0essage+0sgN%!!661>612&ranslate0essage+0sg1-is3atch0essage+0sg1;return 0sg.w*aram; OUTPUT:  MODELESS DIALOG USING MFCPROGRAM: OO 0ainrm.c33  im3lementation oE the C0ainrame class#include stdaEH.h #include 0odeless-ia.h #include 0ainrm.h #iEdeE _-(%@#deEine new -(%@_NW#undeE &,/$_/!static char &,/$_/![] = __/!__#endiE OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO C0ainrame/0*!0N&_-BNC'&+C0ainrame CrameWnd1(@/N_0$$'@_0'*+C0ainrame CrameWnd1OO22'G_0$@_0'*+C0ainrame1OO N4& P the ClassWizard will add and remoFe ma33ing macros here.OO -4 N4& -/& what you see in these locAs oE generated code J4N_W0_C'&+1OO;;'G_0$@_0'*N-_0$$'@_0'*+1static %/N& indicators[] =2/-_$*''&4 OO status line indicator /-_/N-/C'&4_C'*$/-_/N-/C'&4_N%0/-_/N-/C'&4_$C!;OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO C0ainrame constructionOdestructionC0ainrameC0ainrame+12OO &4-4 add memer initialization code here;C0ainrameQC0ainrame+12;int C0ainrame4nCreate+!*C'&$&%C& l3Create$truct12iE +CrameWnd4nCreate+l3Create$truct1 == P51return P5
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks