Skip to main content
gamedev.net
🔒 Locked

Windows structure problems

Started by Aximal 6 replies 550+ views
Original Post
Aximal
Aximal
Okay, I am reading a walkthrough on gamedev.net Genisis(i believe) and I popped in the structure, but, when i compiled it it did not work. Can someone show me a sample winmain() structure please? ThanX, --Aximal
------------------------------"If you died today, where would you go?" -Some guy in a foreign country."I'm a good person, I am going to heaven." -laugh The guy that thinks that being "good" has anything to do with it."Why doesn't being good involve heaven?" -The concerned person on the street."Well, being good is important but anyone can be saved, regardless." -The guy again.
Aximal
Aximal
Oh and maybe a window''s window class structure if you feel so inclined please.

--Aximal
------------------------------"If you died today, where would you go?" -Some guy in a foreign country."I'm a good person, I am going to heaven." -laugh The guy that thinks that being "good" has anything to do with it."Why doesn't being good involve heaven?" -The concerned person on the street."Well, being good is important but anyone can be saved, regardless." -The guy again.
saisoft
saisoft
aximal, post your code here and i will tell u if anything is wrong, amazingly, the same problem that happens to u, has happened to me and its annoying.
Aximal
Aximal
Well I talked to Keshin in the chat room and i tweaked the code a bunch so here it goes i don''t think i heard him correctly anyways...



#include
#include
#define WIN32_LEAN_AND_MEAN
#ifdef DEBUG_MODE
printf("Debug mode is active!");
#endif

int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{

typedef struct m_WndClass{

m_WndClass.hInstance = hInstance;
m_WndClass.hCursor = LoadCursor(NULL, IDC_ARROW);
m_WndClass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
m_WndClass.hbrBackground = (HBRUSH) GetStockObject(BLACK_BRUSH);
m_WndClass.lpfnWndProc = lpWndProc;
m_WndClass.lpszClassName = WindowTitle.GetString();
m_WndClass.lpszMenuName = NULL;
m_WndClass.cbClsExtra = 0;
m_WndClass.cbWndExtra = 0;
m_WndClass.style = 0;
m_WindowTitle = WindowTitle.GetString();
/*UINT sizof(WNDCLASSEX);
UINT CS_OWNDC | CS_DBLCLKS;
WNDPROC lpfnWndProc;
int cbCl0;
int cbWndExtra*/0;
/*HANDLE hinstance;
HICON hIcon;
HCURSOR hCursor;
HBRUSH hbrBackground;
LPCTSTR lpszMenuName;
LPCTSTR lpszClassName;
HICON hIconSm;*/
} m_WndClass;



Okiees that''s it. The problem is after the structure, I don''t get why i can''t use the classes after the structure . Oh well thanx!

--Axe
------------------------------"If you died today, where would you go?" -Some guy in a foreign country."I'm a good person, I am going to heaven." -laugh The guy that thinks that being "good" has anything to do with it."Why doesn't being good involve heaven?" -The concerned person on the street."Well, being good is important but anyone can be saved, regardless." -The guy again.
Aximal
Aximal
Thanx. Okay but the
.

.

.

.''s concern me, what would go in there?

ThanX gin!
--Axe




------------------------------
"If you died today, where would you go?" -Some guy in a foreign country.
"I''m a good person, I am going to heaven." -*laugh* The guy that thinks that being "good" has anything to do with it.
"Why doesn''t being good involve heaven?" -The concerned person on the street.
"Well, being good is important but anyone can be saved, regardless." -The guy again.
------------------------------"If you died today, where would you go?" -Some guy in a foreign country."I'm a good person, I am going to heaven." -laugh The guy that thinks that being "good" has anything to do with it."Why doesn't being good involve heaven?" -The concerned person on the street."Well, being good is important but anyone can be saved, regardless." -The guy again.
Quantum
Quantum
No offence, but maybe you should learn C++ before tackling Windows programming.
Aximal
Aximal
None taken, I probably should. It''s just one of those things...well i know C...C++ isn''t THAT much different...is it...do i wanna waste the time learning it...*5 hrs later* I don''t think C++ will take too long cause not much changes...*opens the C++ book* WHOA! maybe it does...do i REALLY wanna learn it...
it''s just one of those do i really moods.

Thanx.

--Aximal

P.S. My compiler is a tad bit on the old side so not everything is compatable and that is one of the sources of my problems. I am going to get Watcom sometime in the future...

------------------------------
"If you died today, where would you go?" -Some guy in a foreign country.
"I''m a good person, I am going to heaven." -*laugh* The guy that thinks that being "good" has anything to do with it.
"Why doesn''t being good involve heaven?" -The concerned person on the street.
"Well, being good is important but anyone can be saved, regardless." -The guy again.
------------------------------"If you died today, where would you go?" -Some guy in a foreign country."I'm a good person, I am going to heaven." -laugh The guy that thinks that being "good" has anything to do with it."Why doesn't being good involve heaven?" -The concerned person on the street."Well, being good is important but anyone can be saved, regardless." -The guy again.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.