|
hello,
i want to make a game trainer using mfc. please guide me and tell me is it good to write a tainer in mfc ??
sorry, but here it is.
i have a game "Fallout 3". there are several trainers available for it on internet but i want to develop my own trainer for this game. so i want to say that is there any tutorial available for writing a game trainer in mfc for any game ?
btw thanks
rahul
modified on Saturday, August 1, 2009 12:59 AM
|
|
|
|
|
Kindly read the guidelines. It's the sticky post, saying "How to get an answer to your question" and is located at the top of this forum.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
|
Hi,
I'm using Michael Chourdakis's very nice SSL package from here:
http://www.codeproject.com/KB/IP/ssl_sockets.aspx
I used the code as a base for a test app and its working very well, however, I'm having a strange issue.
On one remote test machine, when I run as a server in NON SSL mode, sending a few hundred bytes back and forwards, its lightening fast. I switch to SSL mode and its a little slower (due, I suppose to the encryption) but it's still fast.
However, on a second remote test machine at a different location the results vary. The NON SSL mode works lightening fast, however the SSL mode takes 30-40 seconds to complete. It connects and then there is a long period until the data is transferred back and forth, but once it starts its fast.
Is it possible that on this second machine the Certificate is being re-negotiated every time? If so, do you know if there is an app or an OS fix?
Thanks for your help,
Phil
|
|
|
|
|
I'd like to be able to put content into the clipboard so it could be pasted into Excel... but I also want some formatting information (font, color, ...) so the CF_TEXT is not good enough. Any idea, pointer?
Regards,
Jerry
|
|
|
|
|
hi all,
i am writing content into a notepad file using _wfopen function and saving it in unicode format by giving cc = unicode as one of the arguments..
its saving the file in unicode encoding too.. but when i tried to read the file, its not reading as unicode rather its reading as ascii..
i found this by giving an if condition like this:
wchar_t firstchar = NULL;
if (file.Read(&cFirstChar, sizeof(wchar_t)) && firstchar == (wchar_t)0xFEFF)..
its not showing the first character as 0xfeff rather its showing the first character as the letter present in the notepad file..
am i wrong in saving the file? if so, how to make the first character of the file as oxfeff..
thanks,
rakesh
|
|
|
|
|
First about Unicode.
There are two ways to store Unicode.
E.g 'a' (ASCII) could be stored in Unicode like so:
0x61 0x00 or 0x00 0x61
How do you know the difference ?
By storing a FE FF at the beginning of every Unicode string (this is called a Unicode Byte Order Mark) you know which way to read the bytes.
Example: If I store 'a' in Unicode file I can have:
FF FE 61 00
OR
FE FF 00 61
|
|
|
|
|
hi,
ya you were correct..its showing the ascii value rather FEFF as the first character of the file..
but the file encoding is in unicode.. (i have made it to write it in unicode encoding thru code..)
Thanks,
Rakesh.
|
|
|
|
|
That means you didn't save it as Unicode ....
What code are you using to write to the file ?
|
|
|
|
|
Hi there,
The GetKeyNameText function returns the name of the key pressed in the keyboard.
My question is, is there a way to tell whether the key is upper case or lower case?
Jr.
|
|
|
|
|
I think ctype.h is the class that holds the functions isupper and islower which accepts a char and returns whether it is capitalized or lowercase.
|
|
|
|
|
Can you tell me please how can call or access a global variable or a function defined in th Doc.cpp or anyaother class from inside UINT ThreadProc (LPVOID param)?
UINT ThreadProc(LPVOID param)
{
CTestDoc* pDoc = GetDocument(); // error: GetDocument() is not defined???
ASSERT_VALID(pDoc);
::WaitForSingleObject(m_Thread_Sel_Start.m_hObject , INFINITE);
::MessageBox((HWND)param, strThread_Start, strThread_Caption, MB_OK);
CSQLCommand::FindSQLCmd(pDoc,m_strSelect);// error :m_strSelect is defined in the CTestView.h but he can not find it , pDoc is already unkown
bool bKeepRunning = true;
while(bKeepRunning)
{
int nResult = ::WaitForSingleObject (m_Thread_Sel_End.m_hObject ,0);
if(nResult == WAIT_OBJECT_0)
bKeepRunning = false;
}
::PostMessage((HWND)param, WM_THREADENDED, 0, 0);
return 0;
}
Can i define the UINT ThreadProc(LPVOID param) in the CTestDoc.cpp?
And why when i declare UINT ThreadProc(LPVOID param) in the CTestView.h i get this error:
error C3867: "CTestView::ThreadProc": use "&CTestView::ThreadProc".
and when i use &CTestView::ThreadProc i get a csting problem that can not be solved through an explict cast.
|
|
|
|
|
Your problem stems mainly from the fact that the ThreadProc function is static, and therefore cannot access any instance members of your application class.
The easiest fix is the following:
When you call AfxBeginThread, pass the "this" pointer as your Param.
Then, inside the ThreadProc, cast the Param back to whatever object it was when you passed it originally, such as your app class or your document class.
That way, you now have access to all the instance members of your class by using the -> operator.
|
|
|
|
|
Hello,
i tried it the way you said, but it did not work , maybe i did something wrong, hier is the code:
void CTestView::ThreadStart(CTestDoc* pDoc, CString strSel)
{
m_Thread_Sel_Start.SetEvent ();
HWND hWnd = GetSafeHwnd();
m_strSelect = strSel;
m_pDoc = pDoc;// i need to access the CTestDoc.cpp, i passed pDoc from the CTestDoc.cpp to the CTestView.cpp
// and then assigend pDoc to m_pDoc which defined in the top of the CTestView.cpp
AfxBeginThread(ThreadProc, this/*hWnd*/, THREAD_PRIORITY_NORMAL);// Hier i passed this to the ThreadProc function
}
UINT ThreadProc
(
LPVOID param
)
{
(CTestView*)param-> // casting to CTestView did not work?
return 0;
}
|
|
|
|
|
You're almost there.
The correct cast is:
((CTestView*)param)->function();
|
|
|
|
|
okay but i got an application crash hier:
#ifdef _DEBUG
void CTestView::AssertValid() const
{
CView::AssertValid();
}
#ifndef _WIN32_WCE
void CTestView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
#endif
#endif
|
|
|
|
|
Do you have a valid CTestView object before starting your thread?
If not, that will cause this crash.
|
|
|
|
|
Hi all,
I am writing contents from an application into a notepad file.. i have used fwrite function... but the file is not saving in unicode format as default...
i want the file to be saved in unicode format...can anyone guide me how to make it through?
Thanks,
Rakesh.
|
|
|
|
|
|
can you please update me the latest version of Dr. Watson, the dump must be suitable to open ind VS 2005 Team edition.
I had older version of Dr. Watson installed, and the dump created with the version is not supported in VS 2005. I get below error msg, Please advice
---------------------------
Microsoft Visual Studio
---------------------------
Unable to start program 'C:\.........\DebugMDd\user8.dmp'.
Debugging older format crashdumps is not supported.
---------------------------
OK
---------------------------
|
|
|
|
|
|
Hi,
i when exactly ExcludeCliprect is usefull.. i had a look in msdn it was as follows but i do not know what is a clipping region..
Creates a new clipping region that consists of the existing clipping region minus the specified rectangle.
|
|
|
|
|
kumar sanghvi wrote: but i do not know what is a clipping region..
See here and here.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi all,
i am making my application unicode supporting one. i have to read content from a file..(say a notepad file)..
i have the contents in this format: "rakesh","male"
"shekar","male" etc.,
When i read the content, it is reading as "rakesh","male"(one squarebox)". when i debugged, i found the hexadecimal value of the box as FEFF which is UNICODE_BOM value..(if i am correct)..
So,after some operations(trim operations),it will come as "rakesh","male"" which leads my final output as rakesh" , male;
how to get rid of that square box? why is it coming actually? if i remove that square box, i can overcome this double quote prob. i think...
Please let me know if am unclear in my question..
Thanks,
Rakesh.
|
|
|
|
|
Someone might be able to offer you help if you show your code.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|