|
How to implement a scrollbar in CStatic-derived class. When I wrote:
EnableScrollBarCtrl(SB_HORZ);
SetScrollRange(SB_HORZ, 0, 100);
ShowScrollBar(SB_HORZ);
I can see a scrool bar but I can't control it. WM_HSCROLL don't received too.
What's a problem. How to implement it.
Best regards,
Eugene Pustovoyt
ICQ UIN: 161325180
|
|
|
|
|
I have captured a frame from a video stream using capEditCopy, then created a IDataObject pointer called frame1,
IDataObject * frame1;
then used OleGetClipboard with frame1,
OleGetClipboard(&frame1);
Now as I understand this, and I don't understand this all that well, this means that the frame1 is now a pointer to the data that was placed on the clipboard with capEditCopy. If this is true, how do I know that it is grabbing the right stuff from the clipboard, if this is not true, can anyone suggest a way to get the data from the clipboard.
My aim is to get the data in some format, bitmap for example, that I can examine the RGB values of each of the pixels in the frame. What I don't understand also, is, what format is the data associated with frame1, I assume IDataObject. How can I turn this into a bitmap where I can examine the pixel values. Is this what the GetData function does, and if so how do I use it?
Any help with this would be very much appreciated. Thankyou in advance.
Micheal
|
|
|
|
|
The question is off-topic, but as the answer is quite simple, I'll bite:
No idea
But you should be able to figure this one out yourself (especially as it sounds like a homework-question). Will the library contain many books? The books contain many libraries? Can a loan belong to several people? Can a person have several loans? Go on like this, and you have solved the multiplicity (this is fun!)
The association, is a library a part of a book? A book a part of a library? A loan a part of a book? A book a part of a loan? Will the part outlive the whole?
And dependancy, is a library a part of a person, or is the library only using the person? Or vice versa?
|
|
|
|
|
Too kind
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
I feel like I'm someones mum... BTW, you've forgotten the 'r' in fruity in the sig
|
|
|
|
|
Thanks, And I was sure that I proof read it!
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Hi folks!
Is there a generic way to query the current CPU temperature?
Thanks,
Eric
|
|
|
|
|
Not that i know of. Usually the motherboard will come with utilities to doe this, but i don't recall ever seeing any with an API you could call into from your your code.
There might be something in the WMI computer system hardware classes.
e.g. Win32_TemperatureProbe
I've never used it so i don't know if/how it works.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
On many systems you get this from the I2C bus. That might be a good starting place for your search for more info. That said, it wouldn't surprize me if windows didn't allow you to use this bus, instead required you to use some hidden functions to do it.
Though as the other guy said, each motherboard is different. So don't be surprized if you can't get it the same on all systems.
|
|
|
|
|
How about:
hr = pService->CreateInstanceEnum(_bstr_t("Win32_TemperatureProbe"), WBEM_FLAG_RETURN_IMMEDIATELY | WBEM_FLAG_FORWARD_ONLY, NULL, &pEnum);
if (WBEM_S_NO_ERROR == hr)
{
do
{
hr = pEnum->Next(WBEM_INFINITE, 1, &pClass, &ulReturned);
if (WBEM_S_NO_ERROR == hr)
{
hr = pClass->Get(L"Accuracy", 0, &v, NULL, NULL);
if (VT_NULL != v.vt)
TRACE("Accuracy = %ld\n", V_I4(&v));
hr = pClass->Get(L"CurrentReading", 0, &v, NULL, NULL);
if (VT_NULL != v.vt)
TRACE("CurrentReading = %ld\n", V_I4(&v));
hr = pClass->Get(L"LowerThresholdCritical", 0, &v, NULL, NULL);
if (VT_NULL != v.vt)
TRACE("LowerThresholdCritical = %ld\n", V_I4(&v));
hr = pClass->Get(L"LowerThresholdFatal", 0, &v, NULL, NULL);
if (VT_NULL != v.vt)
TRACE("LowerThresholdFatal = %ld\n", V_I4(&v));
hr = pClass->Get(L"LowerThresholdNonCritical", 0, &v, NULL, NULL);
if (VT_NULL != v.vt)
TRACE("LowerThresholdNonCritical = %ld\n", V_I4(&v));
hr = pClass->Get(L"NominalReading", 0, &v, NULL, NULL);
if (VT_NULL != v.vt)
TRACE("NominalReading = %ld\n", V_I4(&v));
hr = pClass->Get(L"NormalMax", 0, &v, NULL, NULL);
if (VT_NULL != v.vt)
TRACE("NormalMax = %ld\n", V_I4(&v));
hr = pClass->Get(L"NormalMin", 0, &v, NULL, NULL);
if (VT_NULL != v.vt)
TRACE("NormalMin = %ld\n", V_I4(&v));
TRACE("\n");
pClass->Release();
}
} while (WBEM_S_NO_ERROR == hr);
pEnum->Release();
} I've not tested it as my machine has no temperature probe.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I'll check that out, thanks.
Eric
|
|
|
|
|
hi,
i got an Doc/View app,
i want to transfer data (objects etc..) from my CFirstView to CSecondView that being open from CFirstView.
i open the CSecondView by getting the template and calling OpenDocumentFile.
can i transfer data between them?
this is the code (if it helps):
<br />
POSITION templatePos = pxApp->GetFirstDocTemplatePosition();<br />
<br />
while(templatePos != NULL)<br />
{<br />
CDocTemplate* pTemplate = pxApp->GetNextDocTemplate(templatePos);<br />
CString strDocName;<br />
pTemplate->GetDocString(strDocName, CDocTemplate::docName);<br />
if(strDocName == "CSecondView")<br />
{<br />
pTemplate->OpenDocumentFile(NULL);<br />
}<br />
}<br />
<br />
|
|
|
|
|
Well my first comment is why isn't the data in the document if it is shared across views!!
If you must continue then try CDocument::GetFirstViewPosition() etc. to iterate the Doc.Views.
Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com
|
|
|
|
|
well, about your comment. that what i did eventually... thanks!
|
|
|
|
|
|
Hello,
I am having a win32 dll in which there are some exported funation. i want to use the that dll from another win32 application and call its functions. How can i know the the no of parameters to be passed and its datatypes. The name of function i get from the Dependency tool of visual studio but it does not shows the no of parameters and its types.
Plz help me regarding that.
Thanks
Kuldeep
|
|
|
|
|
You can't find out the parameter list of functions in a dll. You need a description or a header file.
MS
|
|
|
|
|
how to insert Microsoft chart control into a dialog box and the make a pie chart and continuously keep updating the the chart
|
|
|
|
|
hi evrybody
i have written an app that draws graph on a window, can anyone help on how to save this graph to a bitmap to any desired location ?
what i want is that by clicking the save button a savedialog will be opened and i can choose to waht dir i want to save the bitmap , that i first of all need to know how to make. i'm working in VC++ the program is a win32 project and is written in C and C++ ,not in MFC .
thanx alot
|
|
|
|
|
|
See CxImage, CDibData and totorials.
INTP
|
|
|
|
|
Is there some way how to find out whether WM_ACTIVATE / WA_ACTIVE
was caused by call to SetForegroundWindow(), or by user ?
(Alt-Tab or clicking into task bar) ?
rrrado
|
|
|
|
|
Probably not. But make the important alternative question instead: Why would you want to know? This might lead to an answer. If it is inside an application you control yourself, for example, you can code around it. If not, the reason you want to do it might lead to a different solution.
|
|
|
|
|
hi,
i call OpenDocumentFile to open a new Doc/View, how can i make it response window?
|
|
|
|
|
Hi all.
I am trying to customize the cookie data in the http headers of my IE. That is to say I must add my own 'Cookie' header to standard IE http headers. But, each time when I use IWebBrowser2::Navigate2() function to add 'Cookie' header(such as 'Cookie: jsessionid=0DE9IIUD03D23'), the 'Cookie' header will be filtered by IE. It seems that the 'Cookie' header is maintained by IE itself and it is not changeable.
Is there any way to modify IE's 'Cookie' http header according to you need?
Any suggestion will be appreciated.Thanks very much.
Leo.
|
|
|
|
|