|
I am cleaning up my code a little bit and put the window procedure of a subclassed list box into a class but when I get the following compire error when calling SetWindowLong:
<br />
cSkinListObject.DefSkinListProc = (WNDPROC) GetWindowLong(hwndSkinList, GWL_WNDPROC);<br />
SetWindowLong(hwndSkinList, GWL_WNDPROC, (LONG) cSkinListObject.SkinListProc);<br />
<br />
error C2440: 'type cast' : cannot convert from 'long (__stdcall cSkinList::*)(struct HWND__ *,unsigned int,unsigned int,long)' to 'long'<br />
Where as if it is not in a class it casts fine...how to cast this properly?
|
|
|
|
|
A member function can't be a callback because of the implicit this parameter. Your options are use a global function or a static member function (which has no this ).
--Mike--
Ericahist [updated Oct 26] | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"Linux is good. It can do no wrong. It is open source so must be right. It has penguins. I want to eat your brain."
-- Paul Watson, Linux Zombie
|
|
|
|
|
Is there any way to display all the processes/applications which install Keyboard hook in windows.
|
|
|
|
|
Install a system wide WH_DEBUG hook then press a key?
(Not so sure about this as I haven't done it but I think it should give you the list?)
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
Can I close all the processes by using that process list.
|
|
|
|
|
from where can i get shlobj.h for version 5.0 of shell32.dll
its urgent
modified 21-Apr-21 21:01pm.
|
|
|
|
|
|
i already have visual studio 6. do i have to download the sdk again?
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Yes. The Platform SDK is a separate entity.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hello, everyone!
I have tried this sample on both Windows 2000 Professional and Windows 2000 Server, both works perfectly when monitering:
Network Interface --> Bytes Total/sec of [My network adapter]
But it does not run properly on Windows XP system. When monitering the above performance parameter of my XP machine, I can not get the bandwidth value output.
Here is the URL link of this sample,
URL Link:
----------
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/perfmon/base/browsing_performance_counters.asp
----------
Can anyone help?
Thanks in advance,
Geo
|
|
|
|
|
Hi, everybody, there is a article at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/creating_a_child_process_with_redirected_input_and_output.asp
I built the sample code into two programs: a parent process and a child process named child.exe. When I test it, it is sure the child process's output can write to the parent process's console. However, I seemed to be impossible for the child to read from the parent. Anyone who is interested can try it. Since it is put on the Ms's website......, I can not imagine there is a bug so prominent!
any advice by Gurus?
|
|
|
|
|
u need to create 2 pipes.
the pipe from parent to child is OK according to ur question.
create another one similar to this one from child to parent.
includeh10
|
|
|
|
|
Hi,
I have a button, which on clicking pops up a new dialog box. When I click the button once more the dialog box is created once more. i want to avoid this. I want the dialog box to be created only once, and if the button is clicked while its popped up , i dont want to be created. I just want only one instance of it .what should I do,
Thanks in advance
Deepak Samuel
|
|
|
|
|
Hi there,
there are several ways to avoid this
1 Can keep a Flag and check if it is set dont open the dialog box again,
2.If u can make ur dialog box class singleton it will solve ur prob !!
3. u Can also use Mutex to avoid this .
4. And dear u can also achieve this by making ur dialog box Modal instead of modeless...then no one can ever be able to click that dam'n button again
Abhishek Srivastava
Software Engg (VC++)
India ,Noida
Mobile no 9891492921
|
|
|
|
|
Thanks a lot four your kind suggestions..
Deepak Samuel.
|
|
|
|
|
I have a edit box, where i need to type in comments.There is also a ok button. my problem is that when i want to go to the next line in the edit box,I press enter (which is the usual procedure in MS word or applications like that) but it does not go to the next line , rather it reacts as if I pressed the ok button.What should I do in order to go to the next line in the edit box as soon as i press enter?
Thanks
Deepak Samuel
|
|
|
|
|
Hi ,
open the property dialog of ur edit box check the style of edit box -MultiLine,
it will solve ur prob !!
Abhishek Srivastava
Software Engg (VC++)
India ,Noida
Mobile no 9891492921
|
|
|
|
|
Edit the properties in the resource editor.
Select the Styles tab.
Ensure that "multiline" and "want return" are selected.
Then Enter will work as desired.
Kevin
|
|
|
|
|
a, b = 0;
Is the above assignment ONE statement in sense of C++ semantics?
(Under which name is this documented?)
|
|
|
|
|
|
Thanx, Michael. My example did not have any sense for itself; the point is, that it will be regarded as ONE statement. This is important for example in a FOR or IF etc. statement, if there is no bracket:
for (i=0; i<10; i++)
a=i, b=i*5;
I tested it and I found that BOTH will be executed in the loop, and I wanted to hear that this is ok. (Although I find this is a messy way to do it, but that's another issue.)
|
|
|
|
|
Vancouver wrote:
a, b = 0;
What should this do? It evaluates a and sets b to zero... If you want to set both variables a and b to zero, do this:
a = b = 0;
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
It should do nothing; it was the simplest example. Pls read my comment above to Michael Dunn.
Thanx anyway.
|
|
|
|
|
Hello, everyone!
One of my homework is to list all the ways (API functions or methods) which can be used to get the machine name of localhost. The value of machine name should be the same as the console output value when we run "hostname" command on Windows platform.
Can anyone help? Think as far as possible.
Thanks in advance,
Geo
|
|
|
|
|
I guess you can use getHostName(...) function
not very sure about syntax but try searching in msdn
modified 21-Apr-21 21:01pm.
|
|
|
|