Windows F.A.Q. for PureBasic

Windows specific forum
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Windows F.A.Q. for PureBasic

Post by Rescator »

(This is a complement to the PureBasic General F.A.Q. Hopefully you can find similar ones in the Mac and Linux sections too.)

Windows Frequently Asked Questions

General

Guides
PureBasic General F.A.Q. http://www.purebasic.fr/english/viewtopic.php?t=4876
Windows Programming: Learning more about the Win32® API. http://www.purebasic.fr/english/viewtopic.php?t=10046
Windows Vista User Experience Guidelines http://msdn.microsoft.com/en-us/library/aa511258.aspx
Windows Vista/XP/2000 User Experience Guidelines PDF http://www.microsoft.com/downloads/resu ... layLang=en
Data Type Ranges http://msdn.microsoft.com/en-us/library/s3f49ktz.aspx
Windows Data Types http://msdn.microsoft.com/en-us/library ... 85%29.aspx
Windows API functions listed by Windows release http://msdn.microsoft.com/en-us/library ... 85%29.aspx
The n Habits of Highly Defective Windows Applications http://www.flounder.com/badprogram.htm

Tools
Tool to lookup all the weird Windows API definitions types! http://www.purebasic.fr/english/viewtopic.php?t=36689


Documents

How do I clear the recent documents menu?
SHAddToRecentDocs_(2,0)

How do I add a document to the recent documents menu?
SHAddToRecentDocs_(2,file$)


GUI

Vista / Windows 7 and DPI, font and Window scaling!
http://www.purebasic.fr/english/viewtop ... 12&t=40507


Keyboard

How do I send keystrokes to another application?
http://www.purebasic.fr/english/viewtopic.php?t=3766


Reboot

How do I reboot or shutdown my PC?
http://www.purebasic.fr/english/viewtopic.php?t=3808


Screenshots

How do I take a screenshot of the Desktop?
http://www.purebasic.fr/english/viewtopic.php?t=3695


Shortcuts

How do I create a shortcut to a file?
http://www.purebasic.fr/english/viewtopic.php?t=8668
Last edited by Rescator on Tue Jan 18, 2011 12:47 am, edited 8 times in total.
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Post by Rescator »

Added two useful links for those times you need to port some C or C++ source code.

Data Type Ranges http://msdn.microsoft.com/en-us/library/s3f49ktz.aspx
This page shows you what the base types are, so you know how much space a int needs and so on.

Windows Data Types http://msdn.microsoft.com/en-us/library ... 85%29.aspx
This page shows you what all those darn typedefs are.

Together those two urls should let you figure out things like a HDC actually being a HANDLE which is a int which actually is a 4byte data type aka a long in PureBasic.
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Post by Rescator »

Added url to Kale's thread about Win32 API resources http://www.purebasic.fr/english/viewtopic.php?t=10046
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Post by Rescator »

Added: Tools
Tool to lookup all the weird Windows API definitions types! http://www.purebasic.fr/english/viewtopic.php?t=36689
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Post by Rescator »

Added: Guides
Windows API functions listed by Windows release http://msdn.microsoft.com/en-us/library ... 85%29.aspx

Something I stumbled across, nice if you want to know which feature was added in which Windows release.
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Re: Windows F.A.Q. for PureBasic

Post by Rescator »

Added: The n Habits of Highly Defective Windows Applications http://www.flounder.com/badprogram.htm

If you are concerned about stable OS friendly multitasking and multithreaded programs I consider this one required reading!
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Re: Windows F.A.Q. for PureBasic

Post by Rescator »

Added: Vista / Windows 7 and DPI, font and Window scaling!
http://www.purebasic.fr/english/viewtop ... 12&t=40507
User avatar
niijel
User
User
Posts: 24
Joined: Sun Oct 30, 2005 7:55 pm

Re: Windows F.A.Q. for PureBasic

Post by niijel »

Please add that trying to use a 32bit dll with the windows 64bit purebasic often doesnt work and that the return code from openlib() should ALWAYS be checked.
:idea:
Post Reply