|
You don't need to get their HWNDs, just call SendMessage() with HWND_BROADCAST as the first param.
|
|
|
|
|
TAHNKS ,you are great exactly what i needed
|
|
|
|
|
how to create a new .c file and .dsp file .dsw file and a .h file and a .rc file ? How to make sure these files are linked together for my application? Sorrie I am new to c++ programming. Thanks for helping
|
|
|
|
|
What you need to do is purchase Microsoft Visual C++ Version 6.0 ( maybe even 5.0 ) and then
all the fancy dsp files will be automatically constructed for you. And a small matter : if you are doing
c++ programming then there is not necessarily a .c file--instead a .cpp file ! Sorry if this sounds
expensive.
Dave
|
|
|
|
|
Hi,
Is there anyway that I can convert an int to a double without losing any of the data?
Thanks
|
|
|
|
|
what about (double)intvar
the precision of a double is 64 bits, that should be enough
|
|
|
|
|
Sorry that doesn't work. What I want to do is put a double into SetPixel, but I need to do so without losing any of the data. I've tried your way and it doesn't work.
|
|
|
|
|
Hi!
I'd like to know where I could find a tutorial on how to create an "IE Add-on", as the one provided by Altavista. Is there any sample in this site that could help me?
I've already tried the MSDN samples.
Thanks in advance
|
|
|
|
|
I am not familiar with the term "Add-on" used to describe anything that works with IE. I am a beginner to learning about such things, though. The following describes the most common IE extensions. Are any of them the type of thing you are looking for?
http://msdn.microsoft.com/workshop/browser/ext/overview/overview.asp
For what it is worth, AltaVista seems to be one site that installs SpyWare that significantly degrades system performance. My performance improved very noticeably after I used AD-aware to remove CometCursor from my system. See:
http://www.lavasoft.de/free.html
See http://grc.com/optout.htm for a good description of Spyware, but AD-aware does everything that OptOut does plus more.
|
|
|
|
|
Toolbars inside explorer are forms of deskbands. There is an ATL object wizard available on this site, although it does have some bug issues currently. I will be posting an update later this week. There are other ways of adding toolbars, you can also create a browser helper object which can access the ShellBrowser object to add toolbar buttons and toolbars. I will be writing an article on this in coming weeks. If you have any specific implementation questions, feel free to ask.
Cheers,
-Erik
|
|
|
|
|
Hi!
my application is dynamically creating controls (=without resources). As long as the parent to these controls is a CDialog or CFormView derivate, the processing of tab/alt-keys work correctly.
But when I want to create the controls within a CScrollView-derivate that tab- and alt-key-processing does not work, though WS_EX_CONTROLPARENT is set for the parent.
Does somebody know why?
And if you know why, maybe you even know a solution!
Thanks!!!
Joe
|
|
|
|
|
Have you used Spy++ to look at the styles?
Have you used GetStyle and GetExStyle (and TRACE) to see what the styles are?
Have you looked at the MFC source code to see how CFormView is created?
I have used all three techniques to answer questions such as this.
|
|
|
|
|
I was wondering how is it a *.c file is linked to a *.rc file .
|
|
|
|
|
An rc file is dealt with the resource compiler, and the c file is compiled by the c complier.
The link is contained in one or more resource headers which are 'included' by both the rc file and the c file, and serve to identify the control IDs etc.
The resource compiler recognizes c preprocessor commands like #define and #include, but if other resource files are #included in the .rc they should have an rc extension. The resource compiler will not expect a .c or .h file to contain resources.
There's also a message compiler (MC), which is primarily concerned with string resources (helps when supporting multiple languages, or if you just want to compile messages for event log reporting etc.) Invoking the message compiler on a (typically named) .mc file will actually generate a header containing the resource IDs for you.
Basically, though, these are separate things. The output from the resource compiler (.res) and c compiler (.obj) will be fed to the linker to produce the executable.
|
|
|
|
|
Sorrie I need someone to explain to me the below code which is a .h file. I am very new to c++ . Thanks for helping.
#define IDM_ABOUT 100
#define IDM_CALLWNDPROC 200
#define IDM_CBT 201
#define IDM_GETMESSAGE 202
#define IDM_JOURNALPLAYBACK 203
#define IDM_JOURNALRECORD 204
#define IDM_KEYBOARD 205
#define IDM_MOUSE 206
#define IDM_MSGFILTER 207
#define IDM_SYSMSGFILTER 208
#define IDM_DEBUG 209
#define CALLWNDPROCINDEX 0
#define CBTINDEX (IDM_CBT - IDM_CALLWNDPROC)
#define GETMESSAGEINDEX (IDM_GETMESSAGE - IDM_CALLWNDPROC)
#define JOURNALPLAYBACKINDEX (IDM_JOURNALPLAYBACK - IDM_CALLWNDPROC)
#define JOURNALRECORDINDEX (IDM_JOURNALRECORD - IDM_CALLWNDPROC)
#define KEYBOARDINDEX (IDM_KEYBOARD - IDM_CALLWNDPROC)
#define MOUSEINDEX (IDM_MOUSE - IDM_CALLWNDPROC)
#define MSGFILTERINDEX (IDM_MSGFILTER - IDM_CALLWNDPROC)
#define SYSMSGFILTERINDEX (IDM_SYSMSGFILTER - IDM_CALLWNDPROC)
#define DEBUGFILTERINDEX (IDM_DEBUG - IDM_CALLWNDPROC)
#define NUMOFHOOKS 10
//
// Entry functions for the DLL
//
int FAR PASCAL InitHooksDll(HWND hwndMainWindow, int nWinLineHeight);
int FAR PASCAL PaintHooksDll(HDC hDC );
int FAR PASCAL InstallFilter (int nHookIndex, int nCode );
|
|
|
|
|
Huh? Your question doesn't make much sense. What are you trying to do?
|
|
|
|
|
That is one gigantic chunk of code, now to answer your question one would need to ask, *what part*
do you not understand? Do you have a compiler at home, like VC++ version 5 or 6. And the word
is spelled Sorry.
Dave
|
|
|
|
|
to blur : the way you spell "sorry" as "sorrie" makes me think that you are the same as the two guys
John and Loh, upstairs. A good way to get past the code that all the "sorrie" people have shown here
in the last three days is to get the book on C Programming by Kernighan and Ritchie and read in slowly.
Once you get the C language down straight then you can bounce up to C++.
C and C++ are two different animals.
These questions with 5 miles of code don't make any sense. You should try to be more specific when
you ask something, then the people will answer by the dozens.
Dave
|
|
|
|
|
Please send me a link/code piece or full source how can I grab the whole desktop into memory?
I implemented a code what can get the desktop image to memory and it can grab about 2-3 times a second. (awful slow.) I'd like to grab all sizes of desktop and any colors.
(environment, test, etc.: VC++, noMFC, WinNT4.0 SP6, source:1024x768x32, in memory 1 pixel=3bytes RGB and 1 empty byte)
Please reply me if only if you have faster solutions!!!
Thanks,Thanks,Thanks,Thanks,Thanks,Thanks,Thanks,Thanks,
---
AkelA
|
|
|
|
|
So you're grabbing 3,145,728 bytes of information 3 - 4 times per second. I don't think you're going to beat that by a large margin no matter what you do.
Speaking of that, what are you trying to do? the only way to improve your performance will be to limit the amount you're capturing, by doing delta comparisons, or intercepting the GDI calls at a lower level, I think.
D
|
|
|
|
|
Greetings,
I downloaded the CHyperLink class that is found on this site and compiled the code. That worked fine. I then went into the file HLSampleDlg and changed the line that says
m_HyperLink.SetURL(_T("mailto:cmaunder@mail.com"));
into
m_HyperLink.SetURL(_T("www.theregister.co.uk"));
Now, when I run the code, just after it opens IExplorer, I get the message
First-chance exception in HLSample.exe (KERNEL32.DLL): 0xC0000005: Access Violation.
Can anyone please help me as I haven't got a clue as to what is wrong. Thanks
Regards
Rick
|
|
|
|
|
What else do you get? What other error message and/or undesired behaviour?
|
|
|
|
|
Greetings,
I think that my first post maybe is a little bit unclear. When I modified the provided example to a hyperlink for a webpage instead of an email address, the program still runs fine(so its seems). The desired page is opened properly by Internet Explorer and I don't get any crashes or other nasties. The only thing that worries me is that as soon as IExplorer fires up I get this 'first-chance exception' in the debug window of Developer Studio and while I may be a complete newbie, I have this strange uneasy feeling that I should not really be getting this sort of messages. Here are a few lines cut&pasted from the debug window just after IExplorer fires up. Hope my explanation is clearer this time. Thanks.
Loaded 'C:\WINDOWS\SYSTEM\SHDOCVW.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SYSTEM\OLE32.DLL', no matching symbolic information found.
First-chance exception in HLSample.exe (KERNEL32.DLL): 0xC0000005: Access Violation.
The thread 0xFFE4B96D has exited with code 0 (0x0).
Regards,
Rick
|
|
|
|
|
http://support.microsoft.com/support/kb/articles/q105/6/75.asp
|
|
|
|
|
I've been trying to get video driver version information,
and video adapter information. I'm using VC++ and the code
needs to execute on Win95/Win NT 4.0, so that rules out
using some of the newer functionality in Win98 and Win2000.
I've tried, the following, but for the driver name I get a name that looks like a dll name (which coincidentally
exists as a name.dll in \winnt\system32). The driver version
value comes back as 0125 (0x0401). If I use the display properties->settings dialog I get a different name (ie its more like PerMedia Fire GL Pro 1000 etc) and a different
version number.
Anybody any idea what I should be doing instead of what I am doing?
decodeVersion() just swaps the DWORD value into a double
assuming that 0x0401 maps to 4.01 (which is true for other
parts of the OS, like file versions).
Hoping you can help me.
Stephen Kellett (skellett at solidworks dot com)
DEVMODE devMode;
BOOL rc;
ZeroMemory(&devMode, sizeof(devMode));
devMode.dmSize = sizeof(devMode);
rc = EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devMode);
if (rc)
{
// got valid data, see what we've got
TCHAR text[200];
double version;
version = decodeVersion(devMode.dmDriverVersion);
_stprintf(text, _T("%s V%2.2f X%d Y%d %d bits %dHz"),
devMode.dmDeviceName,
version,
devMode.dmPelsWidth,
devMode.dmPelsHeight,
devMode.dmBitsPerPel,
devMode.dmDisplayFrequency);
}
|
|
|
|