|
|
|
Does anybody know the order in which windows are painted? I have an owner drawn STATIC control which is the parent of an owner drawn BUTTON . The I handle all of the region clipping for child controls in my own code rather than using the WS_CLIPCHILDREN style. The trouble is the button does not recieve any WM_PAINT messages preventing it from being displayed. The parent is correctly clipped, though the region is filled with a NULL brush causing a hole in the window. The button recieves all other messages including mouse input and WM_WINDOWPOSCHANGED . With the latter, I call InvalidateRect() hoping to force a redraw, but the WM_PAINT is never recieved. The only way I have managed to paint the button is to send the WM_PAINT message myself, which I know is a bad thing to do.
|
|
|
|
|
I spent hours trying to fix this last night, get up this morning and the answer is staring me in the face. I was calling ValidateRect() from the static control which in turn would validate the chidren. Since WM_PAINT is only sent when there is an invalidated region it was failing. The solution was simply to validate the clipping region in the static control or to call BeginPaint() which does the same.
|
|
|
|
|
My application build using VS2005 now I want run it on the comp. which has only .net Framework 1.1 I put in app. directory
ATL80.dll
gdiplus.dll
mfc80.dll
mfc80ENU.dll
msvcirt.dll
msvcp80.dll
msvcr80.dll
msvcrt.dll
Am I missing somthing? May be I need more modules to avoid installation of .net Framework on that machine?
When I do regisration of my COM componetns I am getting error
somthing like "... Configuration error application could not be loaded reinstall could help to fix problem"
|
|
|
|
|
Do you use the .NET framework in your code? If so you'll need the .NET framework installed on
the machine. None of the dlls in your list have anything to do with .NET.
Mark
|
|
|
|
|
No I don't use .net Framework. I only use MFC80 and ATL30
|
|
|
|
|
Can you post the exact error instead of "somthing like"?
|
|
|
|
|
regsvr32 MyDll.dll
"Load library (MyDll.dll) failed. This application failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."
|
|
|
|
|
|
Man thanks a lot it really helped. It was simple and so obvious.
I will build monument to you in Georgia Tbilisi at the city Victory park, with the short modest words on it. "Here is standing monument to the smart guy". And please don’t ask me where is Georgia Tbilisi I don’t know, I know it is real.
Just kidding
-- modified at 15:19 Friday 3rd November, 2006
|
|
|
|
|
Where is Georgia Tbilisi ?
|
|
|
|
|
By the way, what was the fix??
|
|
|
|
|
|
Cool thanks
|
|
|
|
|
I took add files from C:\PROG Files\VS8\VC\Redist
5 files something like mfc80cm.dll which means it if not enough to take files from C:\windows\System32\WinSxS\... you also need to take files from C:\PROG Files\VS8\VC\Redist
So second part I was missing.
You see developer relying on manifest but ... there is always old comp. which have no clue about .net Framework which don't care about where key in your manifest pointing and what that manifest means at all
Your catch my fix. Thanks again.
Tbilisi is next to Chechnia on North and Arminia and Turkey on South, but you really don't need to know that. Sometimes it is enough to know that somebody somewhere build monument for you. (Old high school joke)
|
|
|
|
|
I downloaded some cool software/source files from SourceForge.net. When I tried to open the project workspace, it told me that it is for a newer version of Visual Studio than I have. I am running Visual Studio 2003 .NET. Is there any way around this? I'd really like to get at the source files and project to make modifications and just learn from what I see in it.
Any help you can provide would be great. (BTW, don't know if it matters, but the program is called KeePass, it saves and encrypts passwords in a database. It seems really well implemented.)
Thanks,
BP
|
|
|
|
|
have you ever heard of Visual Studio 2005 ?
|
|
|
|
|
LOL!!! Yes I have heard of it...I don't have it. I have VS 2003 .NET. Is there any way to get it to work? Can I just import the files individually and then compile it?
Holla,
BP
|
|
|
|
|
if the project is not using MFC, you can still download the Express Edition for free.
otherwise, the best you can do is recreating a solution under VS2003 and importing the files, at the risk that you won't have the solution settings anymore...
|
|
|
|
|
I would really recomend upgrading to 2005. I recently did it myself, though it takes a while to get used to the new layout it is by far one of the best compilers MS has produced.
|
|
|
|
|
are you certain?
Most of the reviews I read here on CP are bad, or even worse for C++/MFC coding.
the compiler might be good, but the IDE looks to be slow and slugish.
|
|
|
|
|
Of course I'm not certain, it's only my opinion. I used VC6 and 7 in the past. While version 7 was ok, 6 gave me nothing but a headache. It often froze while building, repositioned breakpoints without my sayso and forgot settings. Not to mention it's anability to correctly handle unicode caracters.
VC8 does take a little getting used to. Infact I hated it at first, the GUI is big and the controls were not where I liked them. But everything can be configured. I now have it layed out the way I like and not once had a problem with it.
|
|
|
|
|
( on vs.net 2003, on WinXP )
I'm trying to validate a path on my machine.
I use SHBrowseForFolder to select a folder on my system, as a test, I select "My Document"
The path returned is "C:\Documents and Settings\me\My Documents" which is a valid path, if I copy this in an windows explorer, it goes to that folder.
In my code, I use stat to check the folder like this :
struct stat St;
int iRet = stat( sPath, &St );
if( iRet != 0 )
{
perror( "Problem getting information" );
switch (errno)
{
case ENOENT:
printf("File %s not found.\n", sPath);
break;
case EINVAL:
printf("Invalid parameter to _stat.\n");
break;
default:
printf("Unexpected error in _stat.\n");
}
}
The problem I get is that stat return -1 for a lot of valid paths, and the error returned goes to the case default .
am I doing this wrong ?
Thanks.
|
|
|
|
|
Are you using stat() to validate a path returned by SHBrowseForFolder() ? If so, why?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|