|
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);
}
|
|
|
|
|
|
|
Hello,
Does anyone know why the VC compiler doesn't seem template class method implementation in *.CPP module?
If I place the implementation into *.h file, everything is ok.
Here is the example:
test.h:
=====
template <class t="">
class A
{
public:
A() {};
virtual ~A() {};
int Func();
};
test.cpp:
=======
template <class t="">
int A<t>::Func()
{
asdfghjkl // It must produce compiler error!
ASDASDG
DSFGSDFG
return sizeof(T);
}
main.cpp:
=======
#include "test.h"
int main(int argc, char* argv[])
{
A<double> a;
int n1 = a.Func();
return 0;
}
The Linker can't find implementation of A::func(). If this implementation placed in test.h, everythig works fine!
|
|
|
|
|
There are no compilers out there that support this as of yet. In order to put the code in a .cpp file, the compiler needs to support the export keyword. I don't think you'll find many compilers supporting this for at least a few more years.
In the meantime, simply include your .cpp file in your .h file (I know that's backwards, but you can change it later when the compilers become conforming.
|
|
|
|
|
does anyone has an idea of how to create a playback software which records voice on a microphone and allows playback of the voice in the form a vxd ? Your help will be greatly appreciated.
|
|
|
|
|
Does anyone has a sample code of a playback software which records voice on a microphone an allows playback of the voice in c++? Thanks for replying.
|
|
|
|
|
I just started to learn VC, i got a problem now.
So,would u mind to leave your ICQ Number to me,
then i can contract u directly.Mine is 31161414.
Thank you for your kindly help!
|
|
|
|
|
Don't have ICQ - glad to help if you want to get specific.
|
|
|
|
|
I am trying for months now to create internet sessions
using proxies. The problem is not that creating the sessions
or making http connections fails, but downloading files
from the internet fails.
I have tried using CInternetSession specifying a proxy server
or letting it read the proxy-information used by IE
(INTERNET_OPEN_TYPE_PRECONFIG). Nothing ever worked.
The specific http statuscode returned was 405.
Another problem is, that I don't know how to use proxies
which need authentication. Is there a way to specify username
and password?
Would be great if anyone could help me!
Mike
|
|
|
|
|
Hi,
I am trying to display a circular image as a background with the transparency. The programs work if I use a mask image with the following operations
//draw
BitBlt(hDC, m_X, m_Y, m_X + m_Width, m_Y + m_Height, m_Image, 0, 0, SRCINVERT);
BitBlt(hDC, m_X, m_Y, m_X + m_Width, m_Y + m_Height, m_Mask, 0, 0, SRCAND);
BitBlt(hDC, m_X, m_Y, m_X + m_Width, m_Y + m_Height, m_Image, 0, 0, SRCINVERT);
where m_Image is the DC of the window
and m_Mask is the mask dc.
I try to do the same thing using Region but it don't works. Can anyone helps? Thanks
The code is like
//create th region
HBRUSH hBrush = CreateSolidBrush(RGB(0,0,0));
HBRUSH hOldBrush;
hRegion = CreateEllipticRgn(xPos, yPos, xPos + Width - 1, yPos + Height - 1);
hOldBrush = (HBRUSH)SelectObject(hDC, hBrush);
if(FillRgn(hDC, hRegion, hBrush))
DeleteObject(hBrush);
m_bUseRegion = true;
SelectObject(hDC, hOldBrush);
DeleteObject(hBrush);
// create the mask dc
m_Mask = CreateCompatibleDC(hDC);
SelectObject(m_Mask, hRegion);
DeleteObject(hRegion);
//draw
BitBlt(hDC, m_X, m_Y, m_X + m_Width, m_Y + m_Height, m_Image, 0, 0, SRCINVERT);
BitBlt(hDC, m_X, m_Y, m_X + m_Width, m_Y + m_Height, m_Mask, 0, 0, SRCAND);
BitBlt(hDC, m_X, m_Y, m_X + m_Width, m_Y + m_Height, m_Image, 0, 0, SRCINVERT);
|
|
|
|
|
How can you select a region into a DC ?
Region can only be selected as clipping region, meta region, or used in PaintRgn directly.
|
|
|
|
|
I am working on an SDI project, and I don't want to have main menu that is placed by the Wizard at all (it's a very simple app, and I'll just use the CToolbarCtrl).
I can't seem to find a way to remove it! If I remove the menu from the resources an exception is thrown; and I can't seem to find any other way to do it...
Can someone please help me?
|
|
|
|
|
The first thing that came to mind is to override CMainFrame::PreCreateWindow() and change the HMENU in the CREATESTRUCT to NULL.
I don't know if this is the "best" or "right" way, it's just the first thing I thought of.
|
|
|
|
|
Try changing CFrameWnd to CMiniFrameWnd. That might or might not be what you want.
|
|
|
|
|
Hi,
I used the following code to show the CFileDialog, but when I exit my application, there was a message in the output window: "The thread 0xFFFAB69D has exited with code -1 (0xFFFFFFFF)."
Is there something wrong?
CFileDialog dlg(TRUE, NULL,"*.bmp;*.jpg;*.gif\0", OFN_FILEMUSTEXIST, "Picture Files (*.bmp;*.jpg;*.gif)|*.bmp; *.jpg; *.gif|All Files(*.*)|*.*||", this);
if(dlg.DoModal() == IDOK)
{
m_strFileName = dlg.m_ofn.lpstrFile;
}
And strange enough: If I change the above "*.bmp" to others text file extension, such as "*.txt", or "*.cpp", no the warning message. I was greatly confused. I am looking forward your kind help.
Thanks;
Feng
|
|
|
|
|
That's not an error message. A thread used by the common dialog just finished running and exited. No worries.
|
|
|
|
|
Why all my control IDs for my FormView don't show up on the ClassWizard uder the Mermber Variables tab?
Is there anything that I can do manually. Any other shortcuts?
Thank you.
|
|
|
|
|