|
How do i find the position of taskbar in MFC...
|
|
|
|
|
|
This should do it -
CWnd* tray = FindWindow(L"Shell_TrayWnd", NULL);
RECT rect;
tray->GetWindowRect(&rect);
rect will have the screen coordinates of the taskbar.
«_Superman_»
I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) (October 2009 - September 2013) Polymorphism in C
|
|
|
|
|
Hi
I am using VS2013 and I migrated a VS2005 to VS2013. It is a MDI application. I added in all the CMFCVisualManager code from the template project and it is working fine.
But in DEBUG mode when it terminates I see several memory leaks. I did the usual to try and track down where it was coming from and it took me to the MFC source code and a IMPLEMENT_DYNCREATE call that had the 2003 and 2007 VisualManagers as properties.
Has anyone else encountered memory leaks? Are they false?
Thanks.
Andrew
|
|
|
|
|
Hello!
I cannot offer any specific advice, but if you install Visual Leak Detector finding the root cause of your problem will be MUCH easier.
Regards
|
|
|
|
|
The problem was that I followed the tutorial for upgrading the Scribble application.
I changed the app class header to use CWinAppEx but not the source file. When I changed the source file the leak stopped.
|
|
|
|
|
Hi
I am using VS2013 Ribbon Designer and it allows you to select a 24 x 24 image for the application menu (that shows in the circle).
I have also added support for all the various visual styles to my application (CMFCVisualManager etc.).
My question relates to the Windows 7 style. It changes the application menu into a regular tab, coloured blue. This is more in line with MS Office 2013.
So my question is, my application menu has a name "FILE". Can I get that to display instead of the icon?
Thanks.
Andrew
|
|
|
|
|
I am programming a driver in kernel mode. I need my driver to detect a BSOD. When BSOD occurs my driver will write a flag out a registry or a file to mark BSOD occurred .In next boot ,My driver will read this flag to know BSOD in previous boot. if the flag is set the driver do something.
I found a way to detect BSOD by using KeRegisterBugCheckCallback routine. this routine registers a BugCheckCallback routine, which executes when the operating system issues a bug check.
but I don't know how to write file of write Registry in this callback (In this callback , ZwWriteFile or ZwSetValueKey can't do that)
Is there any way to do that?
or is there any other way to detect BSOD in previous boot ?
Thanks.
|
|
|
|
|
Not sure if it is even possible.
But here is a list of functions that work with the registry -
IoOpenDeviceRegistryKey
IoOpenDeviceInterfaceRegistryKey
RtlDeleteRegistryValue
RtlQueryRegistryValues
RtlWriteRegistryValue
ZwCreateKey
ZwDeleteKey
ZwDeleteValueKey
ZwEnumerateKey
ZwEnumerateValueKey
ZwOpenKey
ZwQueryKey
ZwQueryValueKey
ZwSetValueKey
Another possibility is for you to hook the KeBugCheckEx function.
Again not sure if this will actually work.
Here is an article on how to hook the kernel APIs - Hooking the kernel directly[^]
«_Superman_»
I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) (October 2009 - September 2013) Polymorphism in C
|
|
|
|
|
I am going to say either impossible or very complex. Ask at OSR online though, that's where kernel experts hang out, someone else might have a suggestion.
"The whole idea that carbon dioxide is the main cause of the recent global warming is based on a guess that was proved false by empirical evidence during the 1990s." climate-models-go-cold
|
|
|
|
|
Dear Friends,
I have header file named as sample.h. My intention is, I don't want to modified this header by others (programmer). So I decided to create lib file for this header file alone.whether is possible??
I don't know whether my approach is right..
kindly help on this..
your suggestion are highly appreciated.
Thanks
S. Shanmuga Raja
modified 9-May-14 3:22am.
|
|
|
|
|
I don't see your point. Both header and lib file are needed in order to link with a library.
Veni, vidi, vici.
|
|
|
|
|
You cannot prevent people from modifying the header file, but it will not be much use to them if it does not match the library that comes with it.
|
|
|
|
|
It would be easier to just make a DLL if that is all you are trying to do.
In vino veritas
|
|
|
|
|
I am not trying to do anything. And whether it's a static library or DLL makes no difference.
|
|
|
|
|
Lazy man.
Veni, vidi, vici.
|
|
|
|
|
Hey, I'm retired, I'm supposed to be lazy.
|
|
|
|
|
The Lion never sleeps.
Veni, vidi, vici.
|
|
|
|
|
Parturiunt montes, nascetur ridiculus mus.
|
|
|
|
|
Hello everybody.
I`m working on a project about Man In The Middle Attack by ARP poisoning method.
In this project I need to work like as a router. For example suppose In My Lan there is two other device (a modem & a laptop). I says to laptop that I`m the modem to fraud it. whenever the laptop wants to send a packet to outside of the LAN, sends the packet to me! All thing I need is I want to send the received packet to the modem & sends the response to victim laptop.
How can I do it programmatically?
Thanks a lot. Ya Ali.
|
|
|
|
|
I don't think anyone here is going to help you to create a program that can be used for illegal purposes.
|
|
|
|
|
There is already at least a program that does this rather good. It's called "Ettercap". No need to reinvent the wheel.
-- Gisle V.
|
|
|
|
|
I made two program , client and server.
The client program send a big data to the server using "send" windows API. I used a thread to send the data. in this case , my server took 5 minutes to receive 500Mb data. I want to reduce the time it takes.there any way to do that ?
tú xương
|
|
|
|
|
Without knowing anything about your programs, your computers or your network it is impossible to make a useful suggestion.
|
|
|
|
|
Exactly. On our internal network that is wired with terribly expensive switches it was possible to reach constant 100MByte/sec with good hardware and windows but some things had to be tweaked for that. The SO_SNDBUF and SO_RCVBUF socket options are definitely among these tweakable things, I used 1-2 megabytes if I remember right.
|
|
|
|