|
It is very easy. Use new project wizard of visual c++ to create a MFC AppWizard(dll) project. That is all you need to do.
|
|
|
|
|
so i've spent well over $200 on books so far trying to get some understanding of VC++6 to no avail. i've taken a course on it and still no gain. does anyone out know of a book that will actually help me learn it or do they all read like stereo intructions? ultimately i want to get into writing my own games so i started with the course, it helped a little but now i'm finished the course and the only thing i can code without copying step by step instructions from a book is an mfc messagebox. it's pitifull!! the first book i got is beginning vc++6 by ivor horton, it seems to explain alot but nothing really partaining to game construction, the second book was isometric game programming with directx 7, it would appear it does the trick but then i stumble onto a website, gamedev.com and read. it tells me that i won't learn a thing until i can make a simple tetris and a couple of other simple? games. the iso book starts with breakout which is the last step at gamedev. it's recomended book is windows game programming for dummies, so i get that and start reading. it's old and according to it windows 98 is the latest version. the code inside works fine if i copy the included files into my projects but when trying to write the code directly i get a ton of errors. so now i'm thinking of gettin vc6 for dummies to see if that will help and i thought i'd stop by here first to see if anyone had a better suggestion.
thanx if anyone can help out. i heard squirrel's game programming book is good, anyone know?
|
|
|
|
|
hey. go to school -> http://www.digipen.edu
it's where i went. you'll learn exactly what you want....
i could only afford 2 years... $6000 a semester) and it's in Redmond, WA.
sorry about your luck... you probably shouldnt have gotten Beginning VC++ 6.0.... i would have suggested beginning C by Ivor Horton, which was amazing and helped me alot when i was starting from scratch 3 years ago, but you probably think Ivor sucks now. You should play with structs and classes alot more than you probably have... try just doing a text based game in DOS or something and design some good efficient structs or classes and try not to worry about pictures and stuff quite yet until you've got C or C++ down pretty decent, i struggle with having things just pictured in my head (at least with code) just from reading about how to do things. feel free to show some error messages too though, i'm sure i've encountered just about all of them 10 times trying to learn C, and libraries and header files...
SHABBA!!
|
|
|
|
|
Tricks of the Windows Game Programming Gurus is a great beginner game programming book.
But I'd suggest you learn some console C++ programming and some other windows stuff before tackling a game.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
My suggestion is that you play around with VC, and try to fix any errors you don't understand at first. Make sure that you get a grip on the windows API before trying to use DirectX. It is much simpler to learn to program by trial and (finding and fixing) error than by reading any book. When you have a basic understanding of windows, you could start blitting and flipping using OpenGL (somewhat simpler to learn) or DirectX (cooler and faster).
Another thing - if you have taken prevoius programming courses, forget anything they might have said about clean code. Game programming is not clean - it is fast. Read "T&T of the game programming gurus" from SAMS. It is one of few gameprogramming books that are affordable and really useful for beginners.
Hope to see your name on the box of the next bestselling game;)
/moliate
|
|
|
|
|
my program gets a assertion error when i try to fire an event from my (made with VC) OCX, the reason why i get it is because at the beginning of a method in the ocx, i make a thread so multiple controls can run at once, and i think what the event is doing is trying to Fire the event, but since it's in a new thread, there isnt that control to catch the event... ? Am i right?
But how do i fix it!?! CWinThread? I NEED this to be multithreaded, is there any way to make sure the event gets fired to the correct thread? Am I way off base? Help me!!!!!
<sigh> desperate.
|
|
|
|
|
Hi!
I've written a shell extension which allows you to browse your Linux ext2 filesystem from windows explorer on NT/2000. A new icon will pop up below My Computer.
It has full read-capability, you can copy and paste from your Linux filesystem to C:, D: or for example to a network resource.
Since not a single write command exists in the code, it is impossible for the extension to destroy anything.
The reason for writing this letter is that it needs beta testing. If you are interested, mail olowo726@student.liu.se. If there is any interest, I will release it as freeware in the future.
//Olof Wolgast
|
|
|
|
|
When compiling a regular dll in Beta2, it gives the following error:
error C2065:'ILS_NORMAL':undeclared identifier c:\program Files\...\atlmfc\include\afxcmn.h line 1336
It seems 'ILS_NORMAL' is not defined in any of the header files in beta2. It is more like ILS_??????? has something to do with the internet than with the image lists. Defining ILS_NORMAL as 0x0 (re: cmnctl.h) at the top of afxcmn.h makes the compile go through, but are there better solutions?
|
|
|
|
|
#define ILS_NORMAL 0x00000000
#define ILS_GLOW 0x00000001
#define ILS_SHADOW 0x00000002
#define ILS_SATURATE 0x00000004
#define ILS_ALPHA 0x00000008
from commctrl.h in RC1...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
You mean to say to include commctrl.h besides afxcmn.h?
|
|
|
|
|
Ernest wrote:
You mean to say to include commctrl.h besides afxcmn.h?
Yep, the following is from the latest Platform SDK (in the buttom it says what header to include)
ILS_NORMAL (0x00000000)
The image state is not modified.
ILS_GLOW (0x00000001)
Adds a glow effect to the icon, which causes the icon to appear to glow with a given color around the edges. The color for the glow effect is passed to the IImageList::Draw method in the crEffect member of IMAGELISTDRAWPARAMS.
ILS_SHADOW (0x00000002)
Adds a drop shadow effect to the icon. The color for the drop shadow effect is passed to the IImageList::Draw method in the crEffect member of IMAGELISTDRAWPARAMS.
ILS_SATURATE (0x00000004)
Saturates the icon by increasing each color component of the RGB triplet for each pixel in the icon. The amount to increase is indicated by the frame member in the IMAGELISTDRAWPARAMS method.
ILS_ALPHA (0x00000008)
Alpha blends the icon. Alpha blending controls the transparency level of an icon, according to the value of its alpha channel. The value of the alpha channel is indicated by the frame member in the IMAGELISTDRAWPARAMS method. The alpha channel can be from 0 to 255, with 0 being completely transparent, and 255 being completely opaque.
Constants Information
Header commctrl.h
Minimum operating systems Windows XP
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
|
Does anyone know how to fix the bars of a CSplitterWnd bar so the user cannot resize them? I can't find any info in the MSDN, CP, or CodeGuru. Thanks for any help.
Mark
Sonork ID 100.10778:Waxy
------------------------------------------------
I am not discouraged because every wrong attempt discarded is another step forward
-- Thomas Edison --
|
|
|
|
|
1)
Use ClassWizard to create a new class named CMySplitterWnd of class type "generic CWnd" and change the references to CWnd in the class declaration and BEGIN_MESSAGE_MAP macro to CSplitterWnd.
2)
Using ClassWizard, create message handlers for WM_LBUTTONDOWN, WM_LBUTTONUP, WM_LBUTTONDBLCLK, and WM_MOUSEMOVE. Bypass the CSplitterWnd functionality in each of these overrides by calling the corresponding CWnd handlers. The following example illustrates the WM_LBUTTONDOWN handler:
void CMySplitterWnd::OnLButtonDown(UINT nFlags, Cpoint point)
{
CWnd::OnLButtonDown(nFlags, point);
}
3)
Change any embedded CSplitterWnd members of your frame class to type CMySplitterWnd.
4)
Remove any menu items that generate a ID_WINDOW_SPLIT command (such as the "Split" item on the VIEWEX sample's "Window" menu). This prevents CView::OnSplitCmd() from being called.
By the way, this is "Copy-Paste" from the MSDN.
--BlackSmith--
|
|
|
|
|
I guess it all depends what you're searching for. "Tracking" was the keyword I should've searched for. It worked like a charm. I also over-rode the OnMouseMove message so the cursor doesn't change to a resize cursor.
Thanks for the help!!
Mark
Sonork ID 100.10778:Waxy
------------------------------------------------
I am not discouraged because every wrong attempt discarded is another step forward
-- Thomas Edison --
|
|
|
|
|
I'm developing serv-cli game
( using CSocket, negotiating with Send()/Receive() )
I also have these classes:
[1]
class CMsg{
public:
virtual void method() = 0;
};
[2]
class CMsgDerive : public CMsg{
public:
virtual void method()
{
AfxMessageBox("Moo");
}
};
both sides familiar with this classes. Next, I send the data to the server:
clientSocket.Send((void*)&CMsgDerive(), sizeof(CMsgDerive));
I receive the data at the server:
void CServrSocket::OnReceive(int err)
{
TCHAR lpBuffer[1024]; //The data is much smaller
Receive(lpBuffer, sizeof(lpBuffer));
CMsg *pMsg = (CMsg*)lpBuffer;
pMsg->method(); //Here I get "unhandable exception" error, WHY???
}
Thank you all!
--BlackSmith--
|
|
|
|
|
I think the server try to call CMsg::method() which is abstract. There is AFAIK no way the server knows that it's actually a CMsgDerive class that you are sending...
Virtual functions are great, but I have seen a lot of errors when used like you do...
Have you tried CMsg *pMsg = (CMsgDerive*)lpBuffer; instead, or even CMsgDerive *pMsg = (CMsgDerive*)lpBuffer;?
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
It is crashing because the virtual function pointers are not the same on the client and the server. Your current approach is really bad, try looking through the source of some open source client/server network games for some better ideas.
Chris Hafey
|
|
|
|
|
I am developing a piece of software for my Diploma Thesis Project. When I created the framework with AppWizard, I was asked what language I wanted my resources in. The only choice was English (U.S.). But I run a Greek version of Windows 98 and, after all, Greek is my mother tongue. How can I have an application with all resources in Greek?
George Metaxas
Student of Electrical & Computer Engineering
Aristotle University of Thessaloniki, Greece
|
|
|
|
|
I would like to check the status of the SQL Server Service from within a C++ app.
My Installshield app installs MSDE if needed so I can assume SQL Server is a least present on the PC.
The functions I am looking for:
- See if it is installed - I currently do this via CurrentVersion item under the Software\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion key
- See if it is running
- See if it is configured to start automattically at boot time
I would also like the ability to set up SQL Server to run and start at boot time from my app as well.
The difficult part is that I am looking to do this under Windows 98, ME, NT, 2000 and XP. I know there are functions in NT, 2000 and XP that I can use but I need all OS's.
Thanks
AW
|
|
|
|
|
You need to Cheek the status Service.
Use OpenService and then use QueryServiceStatus for check the status of service....
Best Regards....
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Carlos:
It appears OpenService and QueryServiceStatus do not run under Win 98.
AW
|
|
|
|
|
|
Look on MSDN for "Windows Address Book"
Michael
|
|
|
|
|