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_
Is there any changes in CView::OnFilePrintPreview() between V6.0 and VS2005. Same bare bones application acts differently on both when doing FilePrintPreview as far as the print preview frame itself. Am I missing something, or what has changed?
Why I can use file to the handle in functions which needs
a handle to the volume, for example ZwFsControlFile with FSCTL_QUERY_USN_JOURNAL
in kernel mode?
If I will try the same in user-mode (with DeviceIoControl and FSCTL_QUERY_USN_JOURNAL),
This is working only with kernel handle and only in WinXP an Vista, not
in W2000! It is by design, bug or is it only my misunderstanding?
My application is for windows Vista and XP.
There are more than on Hard drive connected to my machine. I need to get Drive Letters of the Hard drive from which my system is booting.
By using GetLogicalDriveStrings Function I can get the drive letters of all Hard drives. But how can I differentiate that this particular drive letter is the partition name of my booting Hard drive?
I am having one Edit Control on my application and edit control having VScroll bar in disable mode. at one stage i need to know that this Vscroll is enabled or not? for that i need handle of VScroll bar.
I want to develop a company visitors software. the software will have the following columns:
Purpose of visiting
Who you are visiting
I am having a problem in how the interface should be. I am new in programming please can you descibe for me how the interface should be. especially the time out column. the managment should be able to see those who visited.
Last Visit: 31-Dec-99 18:00 Last Update: 2-Sep-15 18:54