|
I have been offline for a bit so I wasn't able to answer any questions.
The strValue that is being used is CComBSTR so it is not a CString.
Where I am seeing the awkward values is in WMP, WinAmp, other media players, and in Explorer. It is displaying the box character for the length of the title.
|
|
|
|
|
Try
LPCWSTR pUnicodeStrValue = OLE2CW(strValue);
pHdr->AddAttribute(0, L"Title", &wDummy, WMT_TYPE_STRING,0,
(LPBYTE)pUnicodeStrValue, sizeof(WCHAR) * (wcslen(pUnicodeStrValue) + 1));
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
CComBSTR has an operator BSTR which gets you a pointer to the wrapped BSTR , so use that. Instead of (LPBYTE)&strValue use (LPBYTE)(BSTR)strValue
|
|
|
|
|
I want to thank everyone for the replies, works like a charm now!
|
|
|
|
|
I wrote a mfc activex control to embbed in web pages using vs 2005.
The ocx control can fire some events shoud be responded in web pages.
In web pages using javascript like this to respond to the ocx events:
{
window.alert(content);
}
where myctrlid is the ctrl id in web page, and Save(content) is one of the ocx control's events with one param--content(BSTR type).
In IE7 When I open 2 or more than 2 tabs containing the pages using the ocx control, the "Save" event only can be fired in the last opened web page, but in the previously opened web pages, the "Save" event just can't be fired.
Would you please give me some tips?
|
|
|
|
|
I have a pdf. I can convert the pdf to a bmp
and print text on top of the bmp. However, bitmaps
are really slow to print (really, really slow).
Is there any way to programmatically print a pdf
and print text and somehow they both go to the
printer at the same time and the text prints on
top of the pdf output?
?
Please any response any one can give me will be
greatly appreciated.
Sincerely,
Danielle Brina
|
|
|
|
|
DanYELL
If you have enough granularity in the pdf printing to where you are rendering it to the print
DC, then you could draw whatever you want on the DC after the pdf is rendered.
Possible?
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Hi,
I'm trying to setup an OpenGL application using Visual Studio 2005.
I'm doing all the necessary steps (i have followed several templates) but i always end up in one problem:
Visual Studio says that it can't find MSVCR80.dll or MSVCR80D.dll.
I look in my disk and it finds it in some windows subfolder.
If i put it in my project directory it says that the program used the library without permissions or something like that.
Does anyone knows what is going on here?
Thx,
Nuno
|
|
|
|
|
The background is GIF format.
I'm boy.
|
|
|
|
|
You should take a look at those classes: http://www.codeproject.com/buttonctrl/[^]
in the section that speaks about owner drawn buttons there are samples about that... (If I've understood you well.)
|
|
|
|
|
some where i found this way,
SHCreateDirectoryEx(NULL, "d:\\abc\\def\\ghi\\"), NULL);
but SHCreateDirectoryEx is not recognised.
|
|
|
|
|
Super Hornet wrote: but SHCreateDirectoryEx is not recognised.
Why? Do you have Windows 2000 or newer OS?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Then the function is available.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Even i tried in Win-XP. I am getting error:
error C2065: 'SHCreateDirectoryEx' : undeclared identifier
do i need to include any header file.
|
|
|
|
|
Super Hornet wrote: do i need to include any header file.
Yes, Shlobj.h .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I included the header file even the same error..
|
|
|
|
|
Have you included Shell32.lib ?
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
where should i include that lib file
|
|
|
|
|
You can either include it as part of the project like you would any other .lib file, or you can use the #pragma comment(lib, ...) directive.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Why would you suggest that for a compiler error?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
But did you also define _WIN32_WINNT ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
I don't know whether you've solved the problem yet.
I found that VS6 defaults to creating applications which are Win95 / NT3.5 compatible, which excludes some "more advanced" Win98 / Win2000 functions (I was trying to do multi-monitor stuff.)
The solution is to add a #define to tell VS6 you are using a later Windows version:
#define WINVER 0x0500<br />
|
|
|
|
|
I'm trying to target a digital camera (Canon DIGITAL IXUS 500) with a browseforfolder function, its visible in the browselist, but since its not and SFDIR like "My Computer" and "ControlPanel" it wont return any string other than NULL.(the browseforfolder function works with other usb devices since they return a driveletter). The camera inventory can be browsed with Explorer. So anyone know how to find the "driveletters" for these kinds of "drives" other than their names that shows in My Computer like "Canon DIGITAL IXUS 500" or "OLYMPUS SP-350"? maybe any workaround? or is this impossible?
thanx!
|
|
|
|