|
Thanks a lot ,my close foreign friends!
|
|
|
|
|
hello
one simple question.
How to insert one frame window into one SDI project?
"They can because they think they can" - Voltaire
|
|
|
|
|
When I capture screen with PrintScreen then paste it in Paint.exe.........the cursor always disappear......
How can I capture include Cursor?
Is there a code to do this ?
thank
|
|
|
|
|
You know, I have been wondering the same thing for years. I know pressing ALT+Print Screen will only copy an image of the active window. I wonder if there is some other key combination that would do it?
BNEACETP
|
|
|
|
|
The cursor cannot be directly captured along with the screen, mainly due to all sorts of nifty hardware-side optimizations. This is also the reason why some apps that use hardware overlay surfaces (such as video players) cannot be captured (this may not be true for all video cards, however).
Some screen capture programs fake capturing the cursor by compositing an arrow cursor at the cursor location after the root window is grabbed. I suppose a smart capture program could look up what the current cursor scheme is, shadow options, etc., then use that for compositing.
- Mike
|
|
|
|
|
I have a video player appl. It runs in full screen mode on some machines but not on others.Is this a video card problem? I know my doubt is a bit offtrack from the original question raised.But i would be glad if u could throw some more light on this.
Thanx,
|
|
|
|
|
See here:
http://flounder.com/printbitmap.htm
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Can you help me or show me where have source code to do this
I want read/write BMP,JPG,GIF file
more detail:
I will capture all screen .....after then save it in BMP,JPG,GIF format
thank you very much
|
|
|
|
|
|
Chris,
I'm using your JpegFile[^] class - excellent! - and have recently been forced to stretch blit HBITMAP s created from Jpeg files. However, this results in skewed images. Plain blitting works fine, but since stretching skewes the image, I wonder if there might be data alignment issues.
I create the HBITMAP like this (only a snippet - allocated memory is deleted, I promise...):
UINT width, height;
LPBYTE pData = JpegFile::JpegFileToRGB(filename, &width, &height);
JpegFile::BGRFromRGB(pData, width, height);
UINT widthBytes;
LPBYTE pDataAligned = JpegFile::MakeDwordAlignedBuf(pData, width, height, &widthBytes);
HBITMAP hBmp = ::CreateBitmap(width, height, 1, 24, (PVOID)pDataAligned); Should I create a DIB section instead? If so, why?
Can you see something else, which is completely and utterly crazy?
Thanks for any input!
--
Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. (Douglas Adams)
|
|
|
|
|
the docs for CreateBitmap say that the image has to be WORD-aligned, not DWORD-aligned. so, that could be a problem.
i typically use CreateDIBitmap or CreateDIBSection. have you tried either of those?
-c
ImgSource | CheeseWeasle
|
|
|
|
|
As I'm on Windows CE, CreateDIBitmap isn't an option, but CreateDIBSection() solved it.
See an elaborate scheme in another thread[^].
Thanks!
--
Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. (Douglas Adams)
|
|
|
|
|
I am writing a simple game program using MS Visual C++ 6.0 and I keep getting the following error message:
error C2660: 'ExtFloodFill' : function does not take 4 parameters
The confusing thing is I have taken the function all almost literally from the C++ MSDN help. My actual line of code is:
ExtFloodFill( pbotLeft.x + 5, pbotLeft.y-5, RGB(0,0,255), FLOODFILLBORDER);
I have checked in the debugger that all arguments are defined except for FLOODFILLBORDER which I lifted straight off MSDN help again.
This code is in a function being called by my SDI windows View class OnDraw function.
I experienced a similar problem using the following code:
CRect lRect;
GetClientRect(lRect);
lRect.NormalizeRect();
If I placed it in the OnDraw function it worked perfectly. If I moved it to my new class and called it from OnDraw I got the
error C2660: 'GetClientRect' : function does not take 1 parameters.
Is this an MFC inheritance issue, a function override or just a stupid omission on my part?
Thanks to any help I can get.
|
|
|
|
|
You're confusing the API with the MFC wrapper. In a method that's a member of a CWnd -derived class, you can write:
GetClientRect(lRect); since that calls CWnd::GetClientRect() . Outside of a CWnd -derived class, that is an error since you must use the API which takes two params.
Similarly for ExtFloodFill() and CDC::ExtFloodFill() .
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
There is a saying in statistics that a million monkeys pounding on typewriters would eventually create a work of Shakespeare. Thanks to the Internet, we now know that this is not true.
|
|
|
|
|
How can you make certain words this color and certain words another color... kind of like in microsoft visual c++ 6 compiler, EX.
#include would be blue
// would be green
<marquee>Universal Project... Soon to be a .net
|
|
|
|
|
|
hello
I have added an porperty sheets tabs into my dialog based, since then every time I run the program I get an debug assertion failed in file asxwin1.inl line 22.
when I hit ignore the program works ok.
I used this:
m_dlgPropSheet.AddPage(&test);
m_dlgPropSheet.Create(this, WS_CHILD | WS_VISIBLE, 0);
m_dlgPropSheet.ModifyStyleEx (0, WS_EX_CONTROLPARENT);
m_dlgPropSheet.ModifyStyle( 0, WS_TABSTOP );
CRect rcSheet;
GetDlgItem( IDC_PROPSHEET )->GetWindowRect( &rcSheet );
ScreenToClient( &rcSheet );
m_dlgPropSheet.SetWindowPos( NULL, rcSheet.left-7, rcSheet.top-7, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE );
can anyone help me?
fm
|
|
|
|
|
Have you tried single-stepping through each of these lines to see which fires the assertion (Yes, I know it's line 22 of afxwin1.inl, but which of these eight lines of code was being executed at that time. Looking at the call stack would help)? Or, you could remove them all, and add them back one at a time to see which one is firing the assertion. Once you find the offending line, you can focus on it, rather than a bunch of lines.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Cpropertypage defenition under protected
|
|
|
|
|
Are you referring to declaration in the property sheet's .H file? I doubt that is firing an assertion, but without seeing more of the code, I can't say for sure.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
fixed the problem.
my error was the placement of the property sheet's declaration .
I putted it in the about class by mistake and not in the main app class.
silly me.
thanks for the help
|
|
|
|
|
Hi
the code below works fine in one of my apps. But when I copy the code into another project CreateWindows fails with GetLastError() == 0 .
static char szAppName[] = "LogWindow" ;
HINSTANCE hInstance = GetModuleHandle(NULL);
WNDCLASS WndClass;
DWORD style = WS_VISIBLE | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_SYSMENU | CS_NOCLOSE | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS;
WndClass.style = CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS | CS_NOCLOSE;
WndClass.lpfnWndProc = WndProc;
WndClass.cbClsExtra = 0;
WndClass.cbWndExtra = 0;
WndClass.hbrBackground = (HBRUSH) GetStockObject(LTGRAY_BRUSH);
WndClass.hCursor = LoadCursor(NULL, IDC_ARROW);
WndClass.hIcon = 0;
WndClass.hInstance = hInstance;
WndClass.lpszClassName = "LogWindow";
WndClass.lpszMenuName = NULL;
RegisterClass(&WndClass);
wndHiddenWindow = CreateWindow(
"LogWindow",
"LogWindow",
WS_THICKFRAME | WS_VISIBLE | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_SYSMENU,
0,
0,
100,
100,
NULL,
NULL,
hInstance,
NULL
);
What's the problem?
regards
Greg
modified 12-Sep-18 21:01pm.
|
|
|
|
|
It is not obvious to me why CreateWindow fails and at the same time I am not at my workstation to try and compile your code. However, I have a few suggestions. Use WNDCLASSEX instead of WNDCLASS, and try to see if you can actually register the class. I mean are you sure that RegisterClass doesn't fail?
// Afterall, I realized that even my comment lines have bugs
Experience is meaningless if you don't learn from it.
|
|
|
|
|
RegisterClass works, i.e. the return value is != 0. Just added a check for that. Strange enough, this code works fine in an older project.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I export a CPropertyPage derived class CMyPropertyPage from a MFC DLL extension; then i load a CMyPropertyPage* from the dynamically loaded DLL, and attempt to put it into a CPropertySheet .
The loading part works fine but when i call
m_PropertySheet.<code>AddPage</code>(pLoadedPropertyPage) an assertion occurs somewhere into the framework-called
pLoadedPropertyPage-><code>IsKindOf</code>(RUNTIME_CLASS(<code>CPropertyPage</code>))</code> This is weird because pLoadedPropertyPage appears to be a pointer of a class which is not derived from CPropertyPage
Any idea about how could i handle this problem?
rechi
|
|
|
|