|
Well - Solitaire doesn't redraw by blitting an image. It redraws the cards individually, based on the size of the window.
To get that sort of behaviour, that's what you need to do.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
I would like to know where can I get sample code for game developed using C++ Or MFC.
Thanks
|
|
|
|
|
Which kind of game ? Because the technologies used to develop a solitaire will be completely different than those used to develop World of Warcraft.
Anyway, don't forget that google is your best friend to help you find what you need.
|
|
|
|
|
I would like to use VC 6.0 which involves loading of BMP, JPEG, WAV files.
|
|
|
|
|
So, you didn't even answer my question. How could you expect help if you don't provide any details about what you want to achieve ?
|
|
|
|
|
Don't get angry....
Actually we have to develop some game based on cards like solitare but it also involves loading of other JPG,BMP...which we load based on some logic. It is kind of amusment games (e.g. Golden Wheel)
Thanks
|
|
|
|
|
Supra2 wrote: Don't get angry....
I don't get angry, I was stating the fact: if you don't provide enough information, nobody will be able to help you. We don't know what you are trying to achieve.
Supra2 wrote: Actually we have to develop some game based on cards like solitare but it also involves loading of other JPG,BMP...which we load based on some logic. It is kind of amusment games (e.g. Golden Wheel)
I guess using a plain MFC SDI application on which you draw things would do the trick. However, you'll need to learn a bit about MFC and GDI. I think for that it would be good to read a book on MFC (sorry but I don't have any name in head). However, I don't think you will be able to find a full tutorial on how developping a game with MFC.
Loading an image is not possible directly but you can have a look at CXImage[^].
|
|
|
|
|
Hi,
I need suggestion based on this game development using .Net (C# or VB.Net). I would like to create GUI at client side using C# or VB.Net and at server side needs to validate the user. pls let me know which option is feasible in terms of game development(VC++ MFC or .Net).Also I want to draw images at client side. At server side I would like to access and modify database (Access) so I am not sure whether which option is suitable in this case.
Thanks
|
|
|
|
|
I am currently writing an MDI app', with views based upon the CFormView. Could someone kindly let me know how I can set these formViews so that they are non -resizeable?
Thanks.
|
|
|
|
|
Add a handler to WM_GETMINMAXINFO and set the ptMinTrackSize and ptMaxTrackSize members of the MINMAXINFO structure to your desired size.
I think that's what I've used in the past, anyway.
|
|
|
|
|
I am creating an application which will read data from a smart card and send it across to a server on the network
it is an MFC dialog based application
i am a starter with VC++
whenever i compile my application it shows me error:
Assertion failure in afxwin1.inl at line 27
the code at line 27 is:
{ ASSERT(afxCurrentAppName != NULL); return afxCurrentAppName; }
if i ignore it my application runs fine
but this error is not fine.
i am using VC++ 6.0
it comes if i add
SCard SCManager;
to be a global variable in my app
SCard definition is:
class SCard : public CWnd
{
public:
SCard();
public:
LONG GetDataString(CString &DataStream, DWORD &dwRecvLength);
CString GetErrorMessage(LONG lReturn);
LONG m_SCardConnect();
void m_SCardSelectReader();
LONG m_SCardReleaseConext();
LONG m_SCardEstablishContext();
CString m_SCardListReaders();
CString m_SelectedReader; // the selected reader
SCARDHANDLE m_hCardHandle; // handle to the card
SCARDCONTEXT m_hSC; //context handle to the card
virtual ~SCard();
protected:
CString m_csReaderList; //list of available readers.
DECLARE_MESSAGE_MAP()
};
please help me
|
|
|
|
|
It's possibly trying to initialise SCManager before your CWinApp instance? Try doing this, see if it makes a difference:
- Declare SCManager as
SCard *SCManager - In your CWinApp's InitInstance, include the code
SCManager = new SCard;
That way, you're delaying the use of CWinApp in SCManager construction until the CWinApp is constructed?
[edit]Forgot to say - global variables are bad, m'kay?[/edit]
|
|
|
|
|
thanks for your interest
but now the code wont compile with 2 errors.
error 1:
error C2040: 'SCManager' : 'class SCard *' differs in levels of indirection from 'class SCard'
AT
SCard *SCManager;
error 2:
error C2582: 'SCard' : 'operator =' function is unavailable
AT
SCManager = new SCard;
-----------------------------------------------------------------------------------
for the 2nd error my opinion is that i will need to override 'operator =' as we do in turbo c++.
i also do have an initial guess
the inline assert says someting about application name
_AFXWIN_INLINE LPCTSTR AFXAPI AfxGetAppName()
{ ASSERT(afxCurrentAppName != NULL); return afxCurrentAppName; }
my idea is if i somehow set afxCurrentAppName to NULL wont it rule out??
|
|
|
|
|
Well, obviously if you change SCManager from SCard to SCard*, you need to alter the references to it - I thought that went without saying - obviously not.
|
|
|
|
|
oops
sorry didnt see that coming
sorry for the lame reply
well now i tried id again
but with more number of errors.
the previous two remain when i have changed all refrences from SCManager.function() to SCManager->function()
new error says that scard does not have an overloaded operator -> ???
what exactly to interpret from this?
in my dialog class i define variable as extern SCard SCmanager how to deal with that?
sorry for the silly questions
wont repeat that..
|
|
|
|
|
Parinay Bansal wrote: how to deal with that?
Read a good book about C++, it seems you are really lacking some fundamuntal C++ skills yet.
If you declare your variable as extern SCard SCmanager; then it means it is not a pointer, thus you have to use the dot and not the "->" to access members. If you declare it as SCard* SCmanager , then you have to use the "->" because it is a pointer.
This is basic C++ and if you can't grasp those concepts, I'm afraid nobody will be able to help you.
|
|
|
|
|
thank you gentlemen
i was missing out on the part "extern SCard SCManager" replaced with "extern SCard *SCManager"
such a fool i have been
yes sir thank you for your advice,
i really must go back to my c++ basics.
It appears that i have missed out on very basic and important lessons which i sould have taken before starting to develop a full fledged application
i will surely do that from now on.
but yes thanks to you, now my code runs with no error.
i will not forget to get back with any other problems i face in the future.
|
|
|
|
|
Hi there!!
I want to embed WMP plugin into a dialogue based MFC application..but i m not etting from where to start anyone can help me in guiding so?
|
|
|
|
|
You need to embed it as an ActiveX control - this[^] seems a good introduction.
|
|
|
|
|
but how to embedd it as an active x ctrl? and infact which file of WMP i need to add to my application?
|
|
|
|
|
alizey khan wrote: how to embedd it as an active x ctrl
Did you read the page I pointed you at? It really isn't difficult - try reading the doucmentation.
alizey khan wrote: infact which file of WMP i need to add to my application
What do you mean? The WMP active X control will be a DLL or OCX file that will have to be installed on the system for your application to work. Either you include it in your installer, or you make an assumption that it's already installed.
|
|
|
|
|
let me rephrase my question:
How can i create an activeX control for WMP 11 using WMP SDK?
can u refer me some link for the steps and WMP11 SDk ASAP...
It will be of great help!
|
|
|
|
|
|
Hi,
I am running a C app and ran into a Buffer Overrun problem
After debugging the program I Found the offending API to be a
strcpy statement
After researching the problem I deduced the that I needed to use the
corresponding string safe api for strcpy ...StringCchCopy
However when I included strsafe.h I got loads of compile errors
I have warnings a W0 -- Turn of all warnings could this be the
problem ????
Thankx
|
|
|
|
|
ForNow wrote: After researching the problem I deduced the that I needed to use the
corresponding string safe api for strcpy ...StringCchCopy
The secure version of strcpy is strcpy_s[^]
ForNow wrote: I have warnings a W0 -- Turn of all warnings
That's very bad practice. Instead of disabling the warnings, why don't you remove them by writing clean code ?
|
|
|
|