|
I discovered the problem; a previously overwritten WS_SETTEXT command. Thanks for the suggestion, though.
"Never play drinking games with coffee"
|
|
|
|
|
|
I need to make a time stamp every second but, I need the format to be a double.
I know about the Now().FormatString("ddddd hh:nn:ss"); function, but I really need it in a double or float type.
any ideas?
sj
|
|
|
|
|
::VariantTimeToSystemTime
::SystemTimeToVariantTime
|
|
|
|
|
I want to include a background image in my programs about dialog, which is derived from CDHtmlDialog. Using the toolbar, I added the image and it inserted the following code:
This works fine on my computer but when I try the program on another computer it can't find the image since the path doesn't exist. I've tried using a relative path like but that doesn't work, even on my computer. VC doesn't seem to follow nornal HTML coding rules. Can someone please explain how to code this so the image will display properly on any computer?
|
|
|
|
|
You can put the image into your exe and use the res:// protocol in your body background tag.
onwards and upwards...
|
|
|
|
|
Can res:// be used to access a resource like a file in any application?
|
|
|
|
|
|
|
Thanks for the help. That took care of it.
|
|
|
|
|
Does anyone know any good Speech Recognition SAPI 5 Tutorials (preferably for Visual C++ .NET)
that really works?
I've found some on the net, but I can't get them all to work!
thanx
Superstein
|
|
|
|
|
hello,
I have a code that raise this error "Not enough storage is available to process this command." when I try to Realloc a buffer ....
temp = (DWORD)GlobalReAlloc((HGLOBAL)eyeConClients[msg - SOCKET_ID - 1].buffer, szTemp, GMEM_MOVEABLE);
this works ok many times ... and randomly raise that error ....
any suggestions ? please help ....
thanks !!!
|
|
|
|
|
GlobalRealloc() does not necessarily return the same memory handle as the one passed to it - it's value may change. You need to store the new value:
eyeConClients[msg - SOCKET_ID - 1].buffer = GlobalReAlloc((HGLOBAL)eyeConClients[msg - SOCKET_ID - 1].buffer, szTemp, GMEM_MOVEABLE); If you need to cast your buffer to a HGLOBAL, you will need to cast the return value of GlobalRealloc() to make it fit with your buffer variable. You didn't say what type it was, so I don't know what to cast it to - you'll need to do that.
Hope this helps,
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
what is the value and datatype of szTemp?
What amount of physical memory available at the moment of the error?
What is the page file size?
What is the error number?
|
|
|
|
|
Hello. I have a problem. I want to make autoplay cdrom function disable in windows. I don't know how do it. Can you help me? Thanks
welcome to meet you!
|
|
|
|
|
you need to change value of registry key
HKEY_CURRENT_USER\Software\Microsoft\Windows\
CurrentVersion\Policies\explorer\NoDriveTypeAutorun
to (DWORD) 0x0FF disable
or (DWORD) 0x095 enable autoplay
|
|
|
|
|
Just to supplement what skaanji said...
For the NoDriveTypeAutorun variable, each bit in the value represents a type of drive. A bit set to '1' disables autorun for that drive type, '0' enables it.
Bit 0 = Unknown drive types
Bit 1 = Drives without a root directory
Bit 2 = Removeable drives (floppy, zip, jazz, etc.)
Bit 3 = Fixed drives (hard drives)
Bit 4 = Network drives
Bit 5 = CD/DVD drives
Bit 6 = RAM drives
Bit 7 = Reserved (always set to 0)
Hope this helps,
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Dear skaanji and Ryan Binns:
At first, Thanks a lot for you. You have said is correctly. But Because I have a little about register. So maybe it is difficult. Can you give me a example about it? I saw some about Enabling and Disabling AutoPlay articles in Microsoft MSDN. It's tittle is "Enabling and Disabling AutoPlay" . It seems that maybe have other method. Can you see the article for me. I am expecting...
welcome to meet you!
|
|
|
|
|
I don't think that there is any other way so you need to change the registry but this is what I use:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CDRom]
"Autorun"="0" // 0 disable, 1 enable
I also agree with the other posts that suggest that you should not change user settings unless you let them know what you're doing.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
It is a VERY BAD IDEA to change people's registry. Look in MSDN for "disable autoplay" and it tells you a way to do it while your program is running without changing people's registry.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
If this is your own computer I would change the registry however if this is a product you should not mess with the user settings in the registry unless you at least inform the user of what you are doing and allow them to cancel your change.
John
|
|
|
|
|
Hi, Sir:
I saw your answer about disable CDROM autoplay function . and I think so that It is a very bad idea to change people's registry. And I have sawn the "Enable and Disable AutoPlay" in MSDN. I do it that:
UINT g_uQueryCancelAutoPlay = 0;
BOOL DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg) {
...
default:
if (!g_uQueryCancelAutoPlay)
{
g_uQueryCancelAutoPlay = RegisterWindowMessage(TEXT("QueryCancelAutoPlay"));
}
if (uMsg == g_uQueryCancelAutoPlay)
{
SetWindowLong(hDlg, DWL_MSGRESULT, TRUE);
return 1;
}
}
}
but I can't success. Can you tell me How to do it? I wish to get your reply? Thanks
|
|
|
|
|
Does anyone know how to change the standard view in the MDI project with a Property sheet (wizard style)?
|
|
|
|
|
You can find a class 'CPropertySheetView' here[^] at CP.
But I have no idea if it can be used as a Wizard.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
hi
Just declare a member variable of your propertysheet class in the view class, override OnInitialUpdate, create the member propertysheet as a child.
void CMdiView::OnInitialUpdate() <br />
{<br />
CView::OnInitialUpdate();<br />
<br />
CMySheet *m_pMySheet = new CMySheet("foooo");<br />
<br />
m_pMySheet->Create(this,WS_CHILD|WS_VISIBLE,0); <br />
<br />
}
best wishes..mil10
|
|
|
|