Win32
discussion forum. Ask questions relating to Win32 Development and Win32 programming techniques.
Vaughan Kaufman
welcomes you to the Win32 Forum :
Welcome
to
KVK Consultancy
forums! This is the
Win32 Discussion
area where you can post your
Win32
related questions.
Please either
or
to respond.
Thank you
.
Anonymous
asked :
What is the Win32 API call to lookup the name of a keypress?
Vaughan Kaufman
said :
The function for looking up the name of a Keypress is called: GetKeyNameText Please consult this Microsoft article for furthur details. http://msdn.microsoft.com/en-us/library/ms646300(v=VS.85).aspx
Please either
or
to respond.
Thank you
.
Anonymous
asked :
How do I find out what default libraries the Visual Studio linker is including in the build?
Vaughan Kaufman
said :
Probably the simplest way to do this is to enable "Verbose" output from the linker. To do this in Visual Studio 2010, goto the "Project"->"Properties" menu item. Then in the left hand tree expand "Configuration Properties"->"Linker"->"General". Then in the right hand pane, set the option "Show Progress" to "Display all progress messages (/VERBOSE)". Then in the Compile Output window, all the default libraries used are listed by entries such as : 1> Processed /DEFAULTLIB:uuid.lib 1> Processed /DEFAULTLIB:atlsd.lib 1> Processed /DEFAULTLIB:kernel32.lib 1> Processed /DEFAULTLIB:user32.lib 1> Processed /DEFAULTLIB:advapi32.lib 1> Processed /DEFAULTLIB:ole32.lib 1> Processed /DEFAULTLIB:shell32.lib 1> Processed /DEFAULTLIB:oleaut32.lib 1> Processed /DEFAULTLIB:shlwapi.lib 1> Processed /DEFAULTLIB:libcpmtd 1> Processed /DEFAULTLIB:LIBCMTD 1> Processed /DEFAULTLIB:OLDNAMES 1> Processed /DEFAULTLIB:MSVCRTD The sum of all these entries constitutes the default libaries for your build. As a personal recommendation, don't use default libraries, since when moving between compilers the included default libraries may change (which adds a dependancy outside of the scope of the project/makefile). Having said that, there is no harm in using the default libraries, I just prefere every aspect of the build to be controlled / defined (no unexpected libraries being included).
Please either
or
to respond.
Thank you
.
Anonymous
asked :
What is the #define name of the Macro defined in Microsoft Visual Studio which report the version of the IDE being used at complilation time?
Vaughan Kaufman
said :
Possibly the best #define value to use is the value of : _MSC_VER This predefined macro holds the minor and major version numbers of the compiler. So, if you are using Visual Studio 6, it has a value of: 1200 and if your using Microsoft Visual Studio 2010 a value of: 1600 If you are using the ATL libraries you might also consider using the _ATL_VER macro: This will be set to: 0x1000 For Visual Studio 2010 and 0x0900 For Visual Studio 2008 etc. For a definitive list of Microsoft Visual Studio built in Macros please consult: http://msdn.microsoft.com/en-us/library/b0084kay(v=VS.100).aspx
Please either
or
to respond.
Thank you
.
Anonymous
asked :
How do you read the cursor hotspot coordinates from a cursor resource handle (HCURSOR)?
Vaughan Kaufman
said :
You can obtain the coordinates of the Cursor Hotspot from any cursor loaded using LoadCursor or LoadImage with the Win32 call GetIconInfo. HCURSOR hcArrow = LoadCursor(NULL,IDC_ARROW); // Get the Arrow Cursor ICONINFO iiAny; GetIconInfo(hcArrow,&iiAny); if (iiAny.hbmpColor) DeleteObject(iiAny.hbmpColor); if (iiAny.hbmpMask) DeleteObject(iiAny.hbmpMask); The cursor hotspot is found in the xHotspot and yHotspot values of the ICONINFO structure. Remember to call DeleteObject for the two bitmap handles returned.
Please either
or
to respond.
Thank you
.
Anonymous
asked :
What is the difference between Win32 and .NET and why would you use one and not the other?
Vaughan Kaufman
said :
.NET and Win32 both rely on lower layer operating system services. The key difference between .NET and Win32 (from a practical stance) is that Win32 more closely represents what the OS is doing at the lower level and .NET abstracts the lower level functioning of the operating system (presenting system services in a logical object hierarchy). How long this will remain the case though is uncertain as Microsofts latest generation of operating system has .NET built as a core part of the OS. It is possible that in time .NET may more closely represent the working of the OS than Win32 (as the OS core becomes more OOP based). At this time though, and based on OS's up to Windows XP, Win32 is a much more light weight API than using .NET. .NET and Win32 therefore have different strengths and are likely to co-exist for some time to come. .NET's strength is that is simplifies and wraps functionality in the way which is most likely to be required by business (therefore .NET could be considered to be a business oriented development framework.. and its what I certainly consider it to be). Win32's strength is its simplicity. When calling most .NET functions your passing through layers of the .NET framework before the "real" work begins. Using the Win32 API, one is generally only passing through a thin peice of wrapper code which delegate directly to a kernel call. Therefore .NET is ideal for rapid development, enterprise systems (as the framework supports this type of project explicitly) and business applicaitons. Win32 is best suited to implementing systems software, utilitys and applications which require either more direct access to the OS (e.g. wish to manipulate device drivers directly ect) or are required to be very efficient (e.g. lightweight).
Please either
or
to respond.
Thank you
.
Anonymous
asks :
Action Bar
Sorry, but your Response is too short!
Please expound upon your question.