Newbee Study Group
I am using msn messenger and when I get home from work I will put you guys on my contact list so we can talk and share Ideas. I am new to C++ programming and I started in Python which is similar. I am looking forward to working with all of you on our journey to be the best!!!!!! LETS HAVE FUN GUYS!!! =)
THIS IS GREAT!! we are all talkin right now on msn messenger once again....cbare1208@hotmail.com
may the newb's grow and take over!!
may the newb's grow and take over!!
was thinking of starting something similar myself .. but since you've beaten me to it...
msn: jaikc@bluebottle.com
aim: jaikcAIM
msn: jaikc@bluebottle.com
aim: jaikcAIM
Great idea man I just bought a book on programmig games in c++ and I would be glad to study with you.
Great idea man I just bought a book on programmig games in c++ and I would be glad to study with you.
Yahoo email:
bestgamer07@yahoo.com
Yahoo email:
bestgamer07@yahoo.com
a basic win32 framework.
You guys can start discussion on this.
Cheers,
bool gameover = false;#include<windows.h>LRESULT CALLBACK WndProc(HWND hwnd,UINT iMsg,WPARAM wParam,LPARAM lParam){ switch(iMsg){ case WM_DESTROY: PostQuitMessage(0); gameover = true; break; } return DefWindowProc(hwnd,iMsg,wParam,lParam);}int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hpInstance, PSTR cmdline,int iCmd){ init(); WNDCLASS wc; MSG msg; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); wc.hCursor = LoadCursor(NULL,IDC_ARROW); wc.hIcon = LoadIcon(NULL,IDI_APPLICATION); wc.hInstance = hInstance; wc.lpfnWndProc = WndProc; wc.lpszClassName = "class"; wc.lpszMenuName = NULL; wc.style = CS_VREDRAW|CS_HREDRAW; RegisterClass(&wc); HWND hwnd = CreateWindow("class","window",WS_OVERLAPPEDWINDOW,0,0,800,600,NULL,NULL,hInstance,NULL); ShowWindow(hwnd,iCmd); UpdateWindow(hwnd); while(!gameover){ if(PeekMessage(&msg,NULL,0,0,PM_REMOVE)){ TranslateMessage(&msg); DispatchMessage(&msg); } else{ } } UnregisterClass("class",hInstance); return 0;}
You guys can start discussion on this.
Cheers,
On a separate note does anyone know why this code doesn't display the images correctly?
#include<windows.h>bool gameover = false;int map[5][5] = { {1,0,0,0,1}, {1,0,0,0,1}, {1,0,0,0,1}, {1,0,0,0,1}, {1,0,0,0,1}};HBITMAP bmps[1];HDC hdc;HDC imagedc;HWND hwnd;void init(HINSTANCE hInstance){ bmps[0] = (HBITMAP)LoadImage(hInstance,"image.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE); bmps[1] = (HBITMAP)LoadImage(hInstance,"image1.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE);}void draw(HWND hwnd){ int x = 0; int y = 0; hdc = GetDC(hwnd); imagedc = CreateCompatibleDC(hdc); for(int r = 0; r < 5; r++){ y += 10; for(int c = 0; c < 5; c++){ x += 10; if(map[r][c] == 1){ SelectObject(imagedc,bmps[0]); } else{ SelectObject(imagedc,bmps[1]); } BitBlt(hdc,x,y,10,10,imagedc,0,0,SRCCOPY); } }}void Cleanup(HWND hwnd){ SelectObject(imagedc,bmps[0]); DeleteObject(bmps[0]); SelectObject(imagedc,bmps[1]); DeleteObject(bmps[1]); DeleteDC(imagedc); ReleaseDC(hwnd,hdc);}LRESULT CALLBACK WndProc(HWND hwnd,UINT iMsg,WPARAM wParam,LPARAM lParam){ switch(iMsg){ case WM_DESTROY: PostQuitMessage(0); gameover = true; break; } return DefWindowProc(hwnd,iMsg,wParam,lParam);}int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hpInstance, PSTR cmdline,int iCmd){ init(hInstance); WNDCLASS wc; MSG msg; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); wc.hCursor = LoadCursor(NULL,IDC_ARROW); wc.hIcon = LoadIcon(NULL,IDI_APPLICATION); wc.hInstance = hInstance; wc.lpfnWndProc = WndProc; wc.lpszClassName = "class"; wc.lpszMenuName = NULL; wc.style = CS_VREDRAW|CS_HREDRAW; RegisterClass(&wc); HWND hwnd = CreateWindow("class","window",WS_OVERLAPPEDWINDOW,0,0,800,600,NULL,NULL,hInstance,NULL); ShowWindow(hwnd,iCmd); UpdateWindow(hwnd); while(!gameover){ if(PeekMessage(&msg,NULL,0,0,PM_REMOVE)){ TranslateMessage(&msg); DispatchMessage(&msg); } else{ draw(hwnd); } } Cleanup(hwnd); UnregisterClass("class",hInstance); return 0;}
Here's a useful list of contact information that I made. Save it in a txt file or do whatever. Parts are: Members, helpers, and resources(suggested by helpers).
BTW, tell me if there are any mistakes.
-------------------------------------------------------------
Members:
-------------------------------------------------------------
SN: Elitentity
Email: elitentity@yahoo.com
AIM: elitentity
MSN: elitentity@yahoo.com
Yahoo: elitentity
SN: C_Programmer0101
Email: C_Programmer0101@hotmail.com
or C_Programmer0101@yahoo.com
Yahoo: 1 of the above email?
MSN: 1 of the above email?
SN: GotenRulezU
Email: ssjcoryfisher@hotmail.com
AIM: wnxdurfinator
SN: Grim_reaper7
MSN: cbare1208@hotmail.com
AIM: grim1208
SN: Beers
AIM: nlbeers
SN: yayo_99
MSN: yayo_99@hotmail.com
SN: Sweetu
Email: tejas@tatvasoft.com
SN: B_Knight
Email: liviuemanuel@yahoo.com
Yahoo: liviuemanuel@yahoo.com
SN: Mad9
Email: madams_9@hotmail.com
SN: jaikc
msn: jaikc@bluebottle.com
aim: jaikcAIM
SN: bestgamer07
Email: bestgamer07@yahoo.com
Yahoo: bestgamer07@yahoo.com
-------------------------------------------------------------
Helpers:
-------------------------------------------------------------
SN: nosuchmethod
Email: nosuchmethod@earthlink.net
AIM: nosuchmethod
SN: CodeEnthusiast
Email: mindstorm111@sbcglobal.net
-------------------------------------------------------------
Resources:
-------------------------------------------------------------
http://cppreference.com/
http://www.gametutorials.com/Tutorials/C++/Cpp_Pg1.htm
http://www.cplusplus.com/doc/#tutorial
BTW, tell me if there are any mistakes.
-------------------------------------------------------------
Members:
-------------------------------------------------------------
SN: Elitentity
Email: elitentity@yahoo.com
AIM: elitentity
MSN: elitentity@yahoo.com
Yahoo: elitentity
SN: C_Programmer0101
Email: C_Programmer0101@hotmail.com
or C_Programmer0101@yahoo.com
Yahoo: 1 of the above email?
MSN: 1 of the above email?
SN: GotenRulezU
Email: ssjcoryfisher@hotmail.com
AIM: wnxdurfinator
SN: Grim_reaper7
MSN: cbare1208@hotmail.com
AIM: grim1208
SN: Beers
AIM: nlbeers
SN: yayo_99
MSN: yayo_99@hotmail.com
SN: Sweetu
Email: tejas@tatvasoft.com
SN: B_Knight
Email: liviuemanuel@yahoo.com
Yahoo: liviuemanuel@yahoo.com
SN: Mad9
Email: madams_9@hotmail.com
SN: jaikc
msn: jaikc@bluebottle.com
aim: jaikcAIM
SN: bestgamer07
Email: bestgamer07@yahoo.com
Yahoo: bestgamer07@yahoo.com
-------------------------------------------------------------
Helpers:
-------------------------------------------------------------
SN: nosuchmethod
Email: nosuchmethod@earthlink.net
AIM: nosuchmethod
SN: CodeEnthusiast
Email: mindstorm111@sbcglobal.net
-------------------------------------------------------------
Resources:
-------------------------------------------------------------
http://cppreference.com/
http://www.gametutorials.com/Tutorials/C++/Cpp_Pg1.htm
http://www.cplusplus.com/doc/#tutorial
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement