The difference is that these files only get recompiled if you use "Rebuild All", otherwise they are assumed to be without any changes unless you make these changes from within Visual Studio.
Usually you will include in stdafx.h all libraries and other code that won't be modified by you during development.
Can anyone of you help me out for the below requirement.
I just want to desing an application that has the same functionality as a print application. Meaning that, if I enter the number of pages to be printed in a textboc or so how to manipulate the same internally.
Something makes me think there is no faster way. I mean if there was one why would it take Explorer so long to count the number of files when you invoke Properties command for a particularly huge directory?
Try optimizing your recursive function instead. After all, it gets called over and over again and if by chance it contains unoptimized code... well, it'll slow down for a reason.
I wish to know when printer settings are changed and which printer (in a users session), in a server environment (win2k3), I know about WM_SETTINGSCHANGE but lparam seems to get only "devices" and not the printer name.
What I can do is enumarate all printers and keep track of their DEVMODE and each time the notification WM_SETTINGSCHANGE happens i will enumrate AGAIN all printers and compare with the previous list of devmodes to check if a setting has chhanged. As you can see this is very inefficient.
In your opinion are there other ways to this, at least detect from which user this change has happened, so to check only his/her printers.
I made a program that used the gethostbyname(hostname); function in MFC. it worked fine. now when i tried to do the same in a win32 project it is returning null. before this i added the header file "winsock2.h". which showed some errors as redefinition of this xxxxxxx . then i removed it and added the ws2_32.lib reference, after which, it showed no errors but at gethostbyname(hostname); function it returns NULL. have i done anything wrong ? the hostname string contains a genuine hostname. Please answer this
according to MSDN:
The selection, if any, is always shown, even if the control does not have the focus.
This is true but it isn't highlighted in blue. Nomatter where I place the SetFocus call, nothing is happening. I have tried before setting item state, after setting state, beginning and end of WM_INITDIALOG, WM_CREATE, WM_SETFOCUS, WM_IMNOTGIVINGYOUFOCUSHAHAHA. Infact the only place it is working is within WM_PAINT, but this is just wrong.
This control is on a dialog along with sevral other controls. The only other thing I can think of is to change the tab order, but still, SetFocus should be unrelated to the tabs.