|
hi,
i need to draw a sin() function that move in the client area ( like the preformance of the CPU in the os' )
the grafh [the sin() func'] must have the ability to chang the frequency
and the amplitude.
h e l p ! ! !
thanks
|
|
|
|
|
Hi there,
Does anybody know a solution how to put a control into the taskbar like ibm does with their battery application?
At this time I'm working on
http://www.codeproject.com/useritems/batteryx.asp
and want to a way how to insert the progressbar into the taskbar.
I found just one solution:
1) get the HWND of the Windows clock (searching for the right class to get the hwnd)
2) create a dialog
3) make it always on top
4) get the rect of the clock
5) and cover it.
But this is not actually what I want. As you can see at the ibm battery. It's places on the left side of the tray notification bar. This means that I've to resize the one bar in which the tasks are placed.
My Question: Does anybody know how to modify the size of one ore more hwnd's in the taskbar. I tried it but it didn't work well.(it crashes)
|
|
|
|
|
i have a CLongBinary Object that contains bitmap i retrieve from Database using CRecordset, how can i Create CBitmap Object from CLongBinary?
|
|
|
|
|
I did not know there was a CLongBinary until just now.
If the memory block, represented by m_hData, is a DIB (device independent bitmap), my CDibData class (article at CP) may be able to load it and convert it to an CBitmap (ahhh, there's a minor flaw in CDibData, I still need to update it) with just that HGLOBAL handle (m_hData).
Any way look at the code for the articles CDibData and CDibSection (I think) to help you figure out what you need to do.
It should be farly simple, like reading data from a file or in this case an array.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
Hi,
Is there any way to detect if another program is reading stuff from a control in my software?
Let's say I have a program with a SysListView32 control. If there is another program in my system that reads the entries in that control using windows API calls or AutoIt, is there any way for me to detect it?
thanks
|
|
|
|
|
SHORT ANSWER: NO! (Well none I know of).
LONG ANSWER: YES! I have never done it, but you would have to write your entire program so that each command message would require that it set some internal flag before sending or make the flag (some how) part of the message. This, of course, would mean you could not use MFC or any other frame-work, to design you program.
It gets a lot more complicated from there on.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
Hi All,
I'm having a problem with the HeapAlloc and HeapFree functions. I'm using those functions on the default process heap and they seem to work okay upto a particular point. At one point, when a request for a big chunk of memory (~118 MB) was made, the call failed.
A snapshot of the virtual address space showed that the HeapManager never released the memory to the OS, instead, it kept it reserved, committing and decomitting it as necessary. I'm wondering if that was what actually caused the request to fail, maybe the HeapManager wasn't able to find a contiguous region of the requested size?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Although not technically correct, you process only has 2GB of virtual address space available to it. If you request 118MB, you have requested 5% of your virtual address space. That is a huge chunk.
Can the problem be that you don't have the contiguous space available? Yes, that can happen. On other VM systems, I have had to change allocation strategies to avoid this problem.
Not knowing if your program is multithreaded or what you allocation requirements are, I can't tell you what you can do. However, using such systems as VirtualAlloc to set aside a permanent block of memory can work. That is how we solved our issues.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
There are many object in the same windows,How to let the CListCtrl selected by program othe than by tne mouse?
|
|
|
|
|
i is the item number in the list you want to select
SetItemState(i, LVIS_SELECTED|LVIS_FOCUSED, LVIS_SELECTED|LVIS_FOCUSED);
|
|
|
|
|
|
If you have a pointer to the CListCtrl object, you can simply use CWnd::SetFocus[^] this way:
m_pListCtrl.SetFocus();
If you don't have a pointer to the CListCtrl, you can use CWnd::GetDlgItem [^] on the parent window to obtain one.
CTheControlParent::SetFocusOnListCtrl()
{
CWnd* pWnd = GetDlgItem(THE_ID_OF_THE_LIST_CTRL);
if (pWnd != NULL)
pWnd->SetFocus()
}
Hope that helps,
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Hello
I need to make a COM-DLL for use in VB and C# projects in vc6. I don't know how to start the vc project (what kind of new project), how i can see this dll from vb or c#. I need some documentation/sample.
Thanks,
Mihai
|
|
|
|
|
VC++ 6.0
NEW PROJECT: ATL COM AppWizard. (And a good book on the subject.)
Once you create/build it, it should be available to select in the commponts dialog in VB (as it is automaticaly register when you build it).
If you want the extension to be ocx instead of dll, then you need to change the output file extension (in the Project->Setting->Link[tab]) to ocx before building it.
For testing puposes, there is Tools->ActiveX Control Test Container.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
I tried using
SetupDiGetDeviceRegistryProperty(dev_info,&DeviceInfoData,SPDRP_DEVTYPE,
&prop_datatype,prop_buffer,100,&req_bufsize);
Its gives an error SPDRP_DEVTYPE undeclared identifier. I checked the included "setupapi.h" and could not find SPDRP_DEVTYPE defined. But this is a property given in the msdn.
Is there any other function to access the DeviceType from the regisrty.
Regards,
Nripun
|
|
|
|
|
Maybe you need a more recent Platform SDK? I have that define in my setupapi.h file. Here's an extract:
#define SPDRP_ENUMERATOR_NAME (0x00000016) // Enumerator Name (R)
#define SPDRP_SECURITY (0x00000017) // Security (R/W, binary form)
#define SPDRP_SECURITY_SDS (0x00000018) // Security (W, SDS form)
#define SPDRP_DEVTYPE (0x00000019) // Device Type (R/W)
#define SPDRP_EXCLUSIVE (0x0000001A) // Device is exclusive-access (R/W)
#define SPDRP_CHARACTERISTICS (0x0000001B) // Device Characteristics (R/W)
#define SPDRP_ADDRESS (0x0000001C) // Device Address (R)
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Hello.
I need to create ActiveX for IE. When user click on some document in IE this ActiveX mast do somthing with this document. I do not know how can I get user click message. Please help me.
|
|
|
|
|
Shapovalov Alexandr wrote:
When user click on some document in IE this ActiveX mast do somthing with this document. I do not know how can I get user click message. Please help me.
I Believe you are looking for BHO (Browser Helper Object).
This link certainly going to help you
http://msdn.microsoft.com/library/en-us/dnwebgen/html/bho.asp[^]
"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
|
|
|
|
|
Thank you, I read this arcticle, and I trying to do it. I create Class
class IMyIEExtention :<br />
public IOleCommandTarget,<br />
public IObjectWithSite,<br />
public IDispatch<br />
and in function STDMETHODIMP IMyIEExtention::SetSite(IUnknown *pUnkSite);
i write
<br />
m_pMyWB = (IWebBrowser2*)pUnkSite;<br />
IServiceProviderPtr pServProv(pUnkSite);<br />
pServProv->QueryService(SID_SWebBrowserApp, IID_IWebBrowser2, (void**)&m_pMyWB);<br />
m_pMyWB->QueryInterface(IID_IConnectionPointContainer, (void**)&m_pCPC);<br />
if (m_pCPC)<br />
{<br />
IConnectionPoint *spCP = NULL;<br />
hr = m_pCPC->FindConnectionPoint(DIID_DWebBrowserEvents2, &spCP);<br />
if (spCP)<br />
{<br />
spCP->Advise(reinterpret_cast<IDispatch*>(this), &m_dwCookie);<br />
}<br />
}<br />
{
then i create function Invoce
<br />
HRESULT IMyIEExtention::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS __RPC_FAR *pDispParams, VARIANT __RPC_FAR *pVarResult, EXCEPINFO __RPC_FAR *pExcepInfo, UINT __RPC_FAR *puArgErr)<br />
{<br />
return S_OK;<br />
}<br />
and I never been in function Invoke.
|
|
|
|
|
Send me a mail at thatsalok#gmail.com , i will send you summy source code!
"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
|
|
|
|
|
i had created a ATL DLL now i wants to call the dll in mfc project
i know 1 way-->
include .H file and >C which contain the IID and CLSID defination
is there any other better way to call the dll
virender
|
|
|
|
|
virender chauhan wrote:
include .H file and >C which contain the IID and CLSID defination
is there any other better way to call the dll
Other ways.... Hmm.. Import the Dll in your Mfc code using the #import directive, this will provide a COM Runtime wrapper just like VB provides like.
Have a look at this discussion:-
http://www.codeproject.com/atl/SimpleATLCom.asp?msg=978969#xx978969xx[^]
"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
|
|
|
|
|
how can i detect a file's name(in a specified directory) has changed by other user in my program written with visual c++ 6.0? i want to do something when the filename has changed.
any help is appriciated.
|
|
|
|
|
|
the code smooths the problem,thanks a lot!
|
|
|
|