|
The first one.
#include <beer.h>
|
|
|
|
|
I found another information in the MSDN doc:
<br />
LONG RegSetValueEx( <br />
HKEY hKey, <br />
LPCWSTR lpValueName, <br />
DWORD Reserved, <br />
DWORD dwType, <br />
const BYTE *lpData, <br />
DWORD cbData ); <br />
...
cbData
[in] Specifies the size, in bytes, of the information pointed to by the lpData parameter. If the data is of type REG_SZ, REG_EXPAND_SZ, or REG_MULTI_SZ, cbData must include the size of the terminating null character. The maximum size of data allowed in Windows CE is 4 KB.
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
I need my application to stop a USB device, so I do not get the windows 'Unsafe Removal' message when the device is disconnected. Anyone know how to do this ?
|
|
|
|
|
Hi,
Not sure how it can be done from an appln, but if u writing the driver for your USB device, and in the IRP_MN_QUERY_CAPABILITIES handler, if u set the following flag,
get the pointer to the current IRP and in that,
stack->Parameters.DeviceCapabilities.Capabilities->SurpriseRemovalOK = TRUE;
U will not get the Unsafe removal dialog..
regds,
Shiva P
|
|
|
|
|
This will not help me as my device is using some default driver. I wonder if it could be done via 'DeviceIoControl'. I am able to connect to my device by using CreateFile, but using DeviceIoControl with IOCTL_CANCEL_IO does not work (last error = 0x32).
|
|
|
|
|
Hello, I am using MSXML to get HTTP response from a webserver. The problem is when I use
pIXMLHTTPRequest.CreateInstance("Microsoft.XMLHTTP");
it always goes to error and can't continue to open the connection.
Can someone tell me where possibly the problem is, and why should I create the instance?
Many thanks in advance.
*****************************************
BOOL CAPIDlg::MakeRequest()
{
BOOL bRetVal=FALSE;
BSTR Result=NULL;
try{
MSXML::IXMLHttpRequestPtr pIXMLHTTPRequest;
HRESULT hResult;
hResult = pIXMLHTTPRequest.CreateInstance("Microsoft.XMLHTTP");
//Test the connection
if ( FAILED(hResult) ) {
MessageBox("Fail to create the connection");
return bRetVal;
}
MessageBox("Continue anyway");
//Open the connection
pIXMLHTTPRequest->open("POST",(_bstr_t)"www.yahoo.com");
//Send the request
pIXMLHTTPRequest->send();
MessageBox("Success to open");
//Get the result
Result=pIXMLHTTPRequest->responseText;
if(Result)
//Display the result
{m_Result.SetWindowText((_bstr_t)Result);
}
else
//Report error
MessageBox("Can't make the connection");
}
catch(...) {
//Report error
MessageBox("Can't initialize the HTTP request");
}
return true;
}
|
|
|
|
|
I used to work a program on 98,using vc++60(pIII).Now ,I want to develope it on a new pc(pIV) with XP,using vc++60 too.However,Something bad happened.Every time i have to wait about 20 minutes to load the old program. It's awful and i have no idea of what's wrong with msvc++.
In new vc++,i have worked some projects and all are ok.
Why the old project work badlly?
help me please.
|
|
|
|
|
Try deleting your <projectname>.ncb file. Often does the trick.
Ryan
They read good books, and quote, but never learn
a language other than the scream of rocket-burn.
Our straighter talk is drowned but ironclad;
elections, money, empire, oil and Dad.
|
|
|
|
|
What source control system are you using?
|
|
|
|
|
I use Ms DataGrid(OLE)+ADO(OLE)+Crystal Report.In my old enviroment, It run faster. My old pc only has 128M meanwhile the new one has 256M.When i type the key ENTER,It will take my 2 minutes to redraw the screen.I don't stand up it at all.It's only 840 line code in edited class!
|
|
|
|
|
There is a file it contain picture data,and it be separate several part.Each
part be sign by eof.how can i jump over it to read next part of the picture.
thanks!!!
|
|
|
|
|
If it is bmp, ico(no compress), You need the pic file 'head description', then jump to you place to read part of pic!
But compress pic data can't be read part!
Every is my teacher!(From China saying)
|
|
|
|
|
fogmen wrote:
Each part be sign by eof.
EOF isn't actually a character in the file, it's something handled by the OS. It sounds like you're opening a binary file in text mode, so any bytes in the file that are 26 are interpreted as EOF (back in the DOS days, EOF was stored in the file as ^Z but only text files). Open it in binary mode so you can read the raw bytes without the OS or CRT doing any interpretation of the contents.
--Mike--
The Internet is a place where absolutely nothing happens.
-- Strong Bad
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
The file format is *.raw.
the problem is I cann't read the next part file,my code is like that:
while(!infile.eof())
{
outfile<
|
|
|
|
|
HI there ,
Normally FTP Server breaks a connection if it is idle for a specified time period.
How can a FTP client know about the break up of connection due to time-out?
Is there any api, or is there any trick involved?
I am using WinInet classes such as CInternetSession, CFTPConnection etc.
Please heeelllppppp
Bye,
|
|
|
|
|
Sir.....is it possible to access/use java class from VC++ ? If so...please let me know the mathod
Thanks a lot !!!!!!!
C.R.Naik
|
|
|
|
|
well I don't think it is possible...
|
|
|
|
|
Yes, but its ugly. We did it for a project at work. You have to use COM, which means you have to use MS J++ (or J# now) and expose a COM interface to be accessed from the C++ side. I don't know it well enough to go through the details.
If you are using .NET, then you should probably be able to access the J# Java classes seamlessly. At least that's what I've been told about VS.NET though I haven't played with it much yet.
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
Thanks a lot for showing me "a window of good hope".
I will go further on this way and if will found the way then I will write you.
Thanks again.
C.R.Naik
|
|
|
|
|
Dear Guys,
Can someone help me how to display the Percentage ("25%") font inside a Progress Bar as the bar moves, the way it displays while installing some software.
Neel.
|
|
|
|
|
One solution is to derive a class from CProgressCtrl. A simpler solution is to download a module someone has worked on already. Look in CodeProject code section.
Kuphryn
|
|
|
|
|
Dear Guys,
Can someone help me how to update an editbox control in a modeless dialog box on the fly. That is for example I've added this piece of code in "OnMouseMove" function.
CClientDC dc(this);
int xcordinate,ycordinate;
char str[100];
xcordinate = point.x;
ycordinate = point.y;
sprintf(str,"X->%d Y->%d",xcordinate,ycordinate);
dc.TextOut(600,20,str);
This code displays the X and Y co-ordinates on the fly in a SDI or MDI.What I mean by on the fly is you know, the way the number moves in a VCR while rewinding. The same functionality I would like to have inside a dialog box's edit box. I tried the usual m_edit=str; UpdateData(false) and SetDlgItemText but to no effect. It displays only the co-ordinate where the mouse was at first, but it doesn't update when I move it. Please Help.
Neel.
|
|
|
|
|
Are you sure that onmousemove is called inside your modeless dialog?
We are men. We are different. We have only one word for soap. We do not own candles. We have never seen anything of any value in a craft shop. We do not own magazines full of photographs of celebrities with their clothes on. - Steve
|
|
|
|
|
I may be going at this all wrong, but here goes: I wrote an app that uses tabs. I put a child dialog under each tab that hides and shows as the tab is clicked, in that child dialog I put a Listbox, then DDX_Contol'ed is to a CCheckListBox class. The listbox resource has fixed owner-drawn capability. I added AfxEnableControlContainer() in the WinApp InitInstance(). So here is my problem. I get an error when I hit the VERIFY(bitmap.LoadBitmap(AFX_IDB_CHECKLISTBOX_95)) statement under _AFX_CHECKLIST_STATE::_AFX_CHECKLIST_STATE() in winctrl3.cpp (VS .NET). This is all after I do the AddString() function for the box. I would assume that it's when it tries to paint. But why? and how do I fix it?
|
|
|
|
|
Sorry, I checked the mother of documentation, MSDN, and found my problem. I needed to derive my own class from CCheckListBox and call create(). This brings up an interesting question: why do I need to derive some classes and not others? I don't need to derive from CString and others but I do from CDialog and CCheckListBox. Is it that I need to derive when it has a WndProc()?
Thanks anyway.
|
|
|
|