|
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
|
|
|
|
|
Maybe it is not linking properly somewhere? Try examining the DLL for linkages to MFC DLL.
|
|
|
|
|
JWood wrote:
Maybe it is not linking properly somewhere?
Yes, that was it. Thanx!
rechi
|
|
|
|
|
Dear friends,
I've seen many examples that shows how to insert images with text in rich text box.
But i like to insert animated gif imagesin rich text control. Please tell me how can i do so ?
|
|
|
|
|
|
hy, im trying to make a program to morph pictures.
does anybody knows, where i can get some code about this topic?? i didnt found anything!!
thanx a lot!
|
|
|
|
|
Try to find something on "Conformal Mapping".
|
|
|
|
|
Hi all,
where can i get the default use bitmaps of the arrows that window is using on the header control of the windows explorer??
i heard to look in shell32.dll , i couldn't find it there....
can any1 help?
thanks
Yaron
|
|
|
|
|
|
|
Does anyone how to wire up a pointer to access a certain part of of a data field. Such as:
<pre>usnigned short int x;
((char *) &x)[0];</pre>
to access the first byte in a 16 bit operand.
|
|
|
|
|
char *pChar = (char*)&x;
Access through pChar[0] or *pChar
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
You have no idea how much you just helped me. I don't know why that was so hard for me to figure out. I have been working on this all weekend trying to get ready for a test on it tomorrow. Pointers have always been somewhat confusing for me. But the more I play with them them more they are starting to make sense.
Now could you give me an example on how to make this work using a struct? The book I have is so vague or hard for me to understand.
|
|
|
|
|
Quickie posting tip, since I've noticed a pattern in a lot of your posts...
If you use the "Do no treat <'s as HTML tags" option, you don't need to use <pre> tags around your code. Use the "Preview" button to check what your post will look like before clicking "Submit".
- Mike
|
|
|
|