|
I dont know (and its a question for me)why some people delete their questions maybe they think that their questions are simple but its not true.
|
|
|
|
|
toxcct wrote: one more stupid selfish... lol
May be he thought that's the protocol i.e. When your question is answered delete it.;)
|
|
|
|
|
that's selfish anyway, because forums are not chat rooms, and their purpose are to share knowledges...
an answer worthes nothing without its question...!
|
|
|
|
|
can any body help me for invoking bios service in vc++
vimal
|
|
|
|
|
Read this[^]. Be more specific.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
You can't. In general the BIOS is only used by Windows during the boot process. Once Windows is up and running device drivers do the jobs for which you'd use direct BIOS calls in DOS applications. When Windows runs old DOS applications using WOW the BIOS calls are intercepted and redirected through device drivers. Windows is a multitasking OS and in such an environment you can't have applications making direct BIOS calls.
Steve
|
|
|
|
|
Hi, currently I'm doing a program that needs to load data packets under HTTP and telnet protocol intercepted and stored in a database, then display the data interpreted. I wonder if there are some existing control/component or something that can do the HTTP/telnet protocol interpretation in VC++? Thanks a lot!
|
|
|
|
|
I want to differnetiate Group A and B due to certain conditions in a listcontrol. Can i use SelectItem()?
How can i do it?
|
|
|
|
|
Is SetItemState helpfuls ?
|
|
|
|
|
I didnot go for it.I will check it.
|
|
|
|
|
I use CHtmlView to open office documents. But how can I forbid the copy and paste operations in the embeded document? Anyone can give me a solution?Thanks a lot!
Joe
|
|
|
|
|
qiaohongbo wrote:
I use CHtmlView to open office documents. But how can I forbid the copy and paste operations in the embeded document? Anyone can give me a solution?Thanks a lot!
handle oncontextmenu!
<div class='ForumSig'>"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you </div>
|
|
|
|
|
I received this unknown message in Windows XP theme. Anybody has a clue about this message?
Thank you,
Ajay
|
|
|
|
|
hi,
i hav a editbox control in my dialog i want to set it minimum and maximum value thr coding how to do this??????????
zari
|
|
|
|
|
When you want to declare a variable for your control you can set Min and Max on that page
|
|
|
|
|
i knw dat but i want in coding.i want to set maximum and minimum value for the editbox member variable in the coding page .is it possible??? is it possible to set the max and min value for a CEdit control type variable???
zari
|
|
|
|
|
You mean numeric minimum/maximum, right? If so:
There's no built-in way to do it with a standard edit control.
You can add the ES_NUMBER style to only allow digits to be typed into the control.
You could either check the range when the user clicks OK or check as the user types each character
by checking the value every time you get a EN_CHANGE notification from the control.
|
|
|
|
|
Dear All,
I need to copy a string from CString to BYTE array ?
Can i use _tcscpy() fn ?
here my code is below..
_tcscpy((TCHAR*)&Datas[FilledData],TempStr.GetBuffer());
Datas is BYTE* and TempStr is CString.
here I am getting only the first character of TempStr in Datas. But i need full String. How ?
Kindly help me .
|
|
|
|
|
What happen if you run this code
<br />
CString m_Str = "123456abcdef";<br />
BYTE *m_Byte = (unsigned char*)m_Str.GetBuffer(0);<br />
|
|
|
|
|
try this
CString strData="Hello World";
TCHAR szData[15];
lstrcpy(szData, strData.GetBuffer(strData.GetLength()) );
Manu
|
|
|
|
|
kanduripavan wrote:
TCHAR szData[15];
lstrcpy(szData, strData.GetBuffer(strData.GetLength()) );
what about, if szData contain two NULL character!.. lstrcpy not going to work!
<div class='ForumSig'>"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you </div>
|
|
|
|
|
Another way haha
// Copy contents of CString str to BYTE buffer pByteBuffer
// (No NULL terminator is copied!)
memcpy(pByteBuffer, str.GetString(), str.GetLength() * sizeof(TCHAR);
|
|
|
|
|
Sakthiu wrote: _tcscpy((TCHAR*)&Datas[FilledData],TempStr.GetBuffer());
Datas is BYTE* and TempStr is CString.
here I am getting only the first character of TempStr in Datas. But i need full String. How ?
Are you sure you are only getting first char? If it's unicode then every 2 bytes is a char and
possibly every other byte is a 0.
|
|
|
|
|
How to stop a thread from a primary thread
In My project, a SDI CFormView application, I start a worker thread to accompolish a lengthy task by clicking a botton 'btnStart' on the form. I want stop the running work in the thread by clicking another button 'btnStop'. I cannot figure out why the following scheme cannot stop the thread.
handler for 'btnStop'
<br />
m_CEvent_StopThread.SetEvent();<br />
WaitForSingleObject(pMyTheadProc->m_hThread, INFINITE);<br />
delete pMyTheadProc;<br />
<br />
in the thread, an instance of class MyClass is running. The thread is started by the following lines (handler for btnStart)
<br />
MyClass * objMyClass = new MyClass(this); <br />
<br />
UpdateData(true);<br />
<br />
objMyClass->m_EditBox10Weight1Itemset = m_EditBox10Weight1Itemset;<br />
objMyClass->m_EditBox11Weight2Itemset = m_EditBox11Weight2Itemset;<br />
objMyClass->m_EditBox12Weight3Itemset = m_EditBox12Weight3Itemset;<br />
objMyClass->m_EditBox13SimiThreshold = m_EditBox13SimiThreshold;<br />
objMyClass->m_EditBox14HRmin = m_EditBox14HRmin;<br />
objMyClass->m_EditBox15Excel = m_EditBox15Excel;<br />
<br />
objMyClass->m_Radio = m_Radio;<br />
objMyClass->m_Radio3 = m_Radio3;<br />
<br />
objMyClass->m_CheckVerb = m_CheckVerb;<br />
objMyClass->m_CheckNoun = m_CheckNoun;<br />
objMyClass->m_CheckAbbr = m_CheckAbbr;<br />
objMyClass->m_CheckIdiom = m_CheckIdiom;<br />
objMyClass->m_CheckVg = m_CheckVg;<br />
objMyClass->m_CheckNg = m_CheckNg;<br />
<br />
objMyClass->m_EditBox6 = m_EditBox6;<br />
<br />
objMyClass->m_DebugMode = m_DebugMode;<br />
<br />
test_globalvariable = FALSE;<br />
pMyTheadProc = AfxBeginThread(MyThreadProc, objMyClass);<br />
pMyTheadProc->m_bAutoDelete=FALSE;<br />
<br />
The worker thread is coded as follows
<br />
UINT MyThreadProc(LPVOID pParam)<br />
{<br />
MyClass* pObject = (MyClass*)pParam;<br />
if (pObject == NULL) <br />
{<br />
return -1; <br />
}<br />
else<br />
{<br />
<br />
<br />
pObject->SubFunc();<br />
<br />
return 0; <br />
}<br />
<br />
}<br />
<br />
<br />
In the SubFunc(), the following code is used to response the stop-thread signal generated when clicking on btnStop.
<br />
if(WAIT_OBJECT_0==::WaitForSingleObject(m_TerminateThread.m_hObject,0))<br />
{<br />
AfxMessageBox("Exit Thread\n");<br />
::AfxEndThread( 0, FALSE ); <br />
<br />
}<br />
<br />
<br />
In addition, I wonder if the dynamically allocated mem in the thread can be automatically deallocated in the above scheme. Or I have to use additional code to release the allocated mem myself.
|
|
|
|
|
If you want to stop a thread you can use of TerminateThread
|
|
|
|