Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
I am trying to understand how to write an efficient OnPaint routine. That is, I want my routine
to only update the part of the screen that needs to be updated. Therefore I wrote a simple program
that creates a window and displays three lines. Below is the OnPaint routine for that program:
The code works but the routine GetUpdateRect always returns 0. I am wondering if the only way to
get GetUpdateRect to return non-zero is if the program sends (via something like SendMessage)
the WM_PAINT message.
You should also observe that in the current code, if GetUpdateRect does return a non-zero value
then the program crashes. Currently, the program never crashes.
Thanks for the response. I noticed that the item you mentioned gives me exactly what I want
and therefore it is very useful. However, m_ps is a public data member of the class. Therefore,
I do not like the idea of using public data. Is using public data such a bad idea? I am not sure.
I coded an app that searches for another window to overlay it. I used SetLayeredWindowAttributes to make a color transparent in my window. When the the window with right handle was found i want to set place my window over it. For that i created a timer that runs every 10ms. To place my window over the other i used
That works. But when hndWin (that one that should be overlayed) is in background of another window...and i click in hndwin it shortly flickers and the it's send back to background. But when i click a control in my overlaying transparent window the underlying window comes to front. But not if i click an area in the window that's overlayed.
The next thing is that the overlayed window is minimized and clicked in the taksbar, both windows should appear in front.
I just installed IE 8 and Vista SP2. I'm supporting several VC++ 6.0 (MFC) projects and need to keep it alive on my system.
Now that these are installed, I can open workspaces and recent files, however if I select File-Open in Visual C++ I get nothing (no dialog). If I do it a couple more times VC++ crashes and closes. If I try using the toolbar or "Ctrl-O", VC++ crashes immediately.
I am thinking that the version of VC++ 6.0 that is installed on your machine was damaged or
altered by the installation of IE 8 or Vista SP2. This could be related to a new version of a DLL.
I would address this issue by reinstalling VC++ 6.0.
On the first day- only write #include statements.
On the second day- write function definition for main
On the following day- write one and only one line of code
and so on and so forth according to your diary schedule.
do you want to write a program that allows the user to maintain his day to day work in the form of a diary.;
You need to google first, if you have "It's urgent please" mentioned in your question. _AnShUmAn_