⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 windows_data_types.htm

📁 关于windows使用的一些文章收集,希望对入门者能有所帮助
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<META content=WCHAR name=MSHKeywordF></MSHELP:KEYWORD></MSHELP:KEYWORD>
<META content=WINAPI name=MSHKeywordF></MSHELP:KEYWORD></MSHELP:KEYWORD>
<META content=WORD name=MSHKeywordF></MSHELP:KEYWORD></MSHELP:KEYWORD>
<META content=WPARAM name=MSHKeywordF></MSHELP:KEYWORD>
<META content=Technology:winprog name=MSHAttr>
<META content=DevLang:C++ name=MSHAttr>
<META content=_win32_windows_data_types name=MSHKeywordA>
<META content=TopicType:kbArticle name=MSHAttr>
<META content=DocSet:PSDK name=MSHAttr>
<META content=Locale:kbEnglish name=MSHAttr>
<META content=Technology:winprog name=MSHAttr><!---VENUS_END---><LINK 
href="windows_data_types.files/css.css" type=text/css rel=stylesheet>
<SCRIPT language=javascript>
var doImage=doImage;var TType=TType;
function mhHover(tbl,idx,cls){var t,d;if(document.getElementById)t=document.getElementById(tbl);else t=document.all(tbl);if(t==null)return;if(t.getElementsByTagName)d=t.getElementsByTagName("TD");else d=t.all.tags("TD");if(d==null)return;if(d.length<=idx)return;d[idx].className=cls;}
function footerjs(doc){if(doImage==null){var tt=TType==null?"PV":TType;doc.write('<layer visibility="hide"><div style="display:none"><img src="http://c.microsoft.com/trans_pixel.asp?source=msdn&TYPE=' + tt + '&p=library_en-us_winprog_winprog_windows_data&URI=%2flibrary%2ftoolbar%2f3.0%2fasp.aspx%3fmode%3dhead%26c%3d%2fnonlibraryshell.config%26h%3dmsdn%252Emicrosoft%252Ecom%26u%3d%252Flibrary%252Fen%252Dus%252Fwinprog%252Fwinprog%252Fwindows%255Fdata%255Ftypes%252Easp%26r%3d&GUID=1F4FC18C-F71E-47FB-8FC9-612F8EE59C61" width=0 height=0 hspace=0 vspace=0 border=0 /></div></layer>');}}
</SCRIPT>

<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff leftMargin=0 topMargin=0 MARGINWIDTH="0" 
MARGINHEIGHT="0">
<TABLE height=24 cellSpacing=0 cellPadding=4 width="100%" bgColor=#ffffff 
border=0>
  <TBODY>
  <TR>
    <TD class=eyebrow vAlign=center align=left width="100%">&nbsp;&nbsp; <A 
      class=small href="http://msdn.microsoft.com/default.asp" target=_top>MSDN 
      Home</A>&nbsp;&gt;&nbsp; <A class=small 
      href="http://msdn.microsoft.com/library/default.asp" target=_top>MSDN 
      Library</A>&nbsp;&gt;&nbsp; <A class=small 
      href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/anch_win32com.asp" 
      target=_top>Win32 and COM Development</A>&nbsp;&gt;&nbsp; <A class=small 
      href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/devguides.asp" 
      target=_top>Development Guides</A>&nbsp;&gt;&nbsp; <A class=small 
      href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/windows_api_start_page.asp" 
      target=_top>Windows API</A>&nbsp;&gt;&nbsp; <A class=small 
      href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/windows_api_reference.asp" 
      target=_top>Windows API Reference</A><A 
      href="http://msdn.microsoft.com/library/en-us/winprog/winprog/"></A> 
  </TD></TR></TBODY></TABLE>
<TABLE class=clsContainer style="TABLE-LAYOUT: fixed" cellSpacing=0 
cellPadding=15 width="100%" border=0 float="left">
  <TBODY>
  <TR>
    <TD vAlign=top><!--TOOLBAR_START--><!--TOOLBAR_EXEMPT--><!--TOOLBAR_END--><!-- Begin Content -->
      <TABLE class=buttonbarshade cellSpacing=0>
        <TBODY>
        <TR>
          <TD>&nbsp;</TD></TR></TBODY></TABLE>
      <TABLE class=buttonbartable cellSpacing=0>
        <TBODY>
        <TR id=hdr>
          <TD class=runninghead noWrap>Platform&nbsp;SDK:&nbsp;Windows 
        API</TD></TR></TBODY></TABLE>
      <DIV class=clsServerSDKContent>
      <H1><A name=winprog.windows_data_types></A>Windows Data Types</H1>
      <P>The data types supported by Microsoft® Windows® are used to define 
      function return values, function and message parameters, and structure 
      members. They define the size and meaning of these elements. For more 
      information about the underlying C/C++ data types, see <A 
      href="http://msdn.microsoft.com/library/en-us/vclang/html/_langref_Data_Type_Ranges.asp" 
      target=_blank>Data Type Ranges</A>.</P>
      <P>
      <P>The following table contains the following types: character, integer, 
      Boolean, pointer, and handle. The character, integer, and Boolean types 
      are common to most C compilers. Most of the pointer-type names begin with 
      a prefix of P or LP. Handles refer to a resource that has been loaded into 
      memory.</P>
      <P>For more information about handling 64-bit integers, see <A 
      href="http://msdn.microsoft.com/library/en-us/winprog/winprog/large_integers.asp">Large 
      Integers</A>.</P>
      <P></P>
      <TABLE class=data>
        <TBODY>
        <TR class=data>
          <TH>Term</TH>
          <TH>Description</TH></TR>
        <TR class=data>
          <TD class=data><B>ATOM</B></TD>
          <TD class=data>Atom. For more information, see <A 
            href="http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/dataexchange/atoms.asp">Atoms</A>. 

            <P>This type is declared in WinDef.h as follows:</P>
            <DIV class=conditionalSection id=newLanguageFilteredSection 
            development_language="C++">
            <P></P>
            <DIV class=codeSnippet><PRE class=syntax xml:space="preserve">typedef WORD ATOM;</PRE></DIV></DIV></TD></TR>
        <TR class=data>
          <TD class=data><B>BOOL</B></TD>
          <TD class=data>Boolean variable (should be TRUE or FALSE). 
            <P>This type is declared in WinDef.h as follows:</P>
            <DIV class=conditionalSection id=newLanguageFilteredSection 
            development_language="C++">
            <P></P>
            <DIV class=codeSnippet><PRE class=syntax xml:space="preserve">typedef int BOOL;</PRE></DIV></DIV></TD></TR>
        <TR class=data>
          <TD class=data><B>BOOLEAN</B></TD>
          <TD class=data>Boolean variable (should be TRUE or FALSE). 
            <P>This type is declared in WinNT.h as follows:</P>
            <DIV class=conditionalSection id=newLanguageFilteredSection 
            development_language="C++">
            <P></P>
            <DIV class=codeSnippet><PRE class=syntax xml:space="preserve">typedef BYTE BOOLEAN;</PRE></DIV></DIV></TD></TR>
        <TR class=data>
          <TD class=data><B>BYTE</B></TD>
          <TD class=data>Byte (8 bits). 
            <P>This type is declared in WinDef.h as follows:</P>
            <DIV class=conditionalSection id=newLanguageFilteredSection 
            development_language="C++">
            <P></P>
            <DIV class=codeSnippet><PRE class=syntax xml:space="preserve">typedef unsigned char BYTE;</PRE></DIV></DIV></TD></TR>
        <TR class=data>
          <TD class=data><B>CALLBACK</B></TD>
          <TD class=data>Calling convention for callback functions. 
            <P>This type is declared in WinDef.h as follows:</P>
            <DIV class=conditionalSection id=newLanguageFilteredSection 
            development_language="C++">
            <P></P>
            <DIV class=codeSnippet><PRE class=syntax xml:space="preserve">#define CALLBACK __stdcall</PRE></DIV></DIV></TD></TR>
        <TR class=data>
          <TD class=data><B>CHAR</B></TD>
          <TD class=data>8-bit Windows (ANSI) character. For more information, 
            see <A 
            href="http://msdn.microsoft.com/library/en-us/gdi/fontext_89gz.asp">Character 
            Sets Used By Fonts</A>. 
            <P>This type is declared in WinNT.h as follows:</P>
            <DIV class=conditionalSection id=newLanguageFilteredSection 
            development_language="C++">
            <P></P>
            <DIV class=codeSnippet><PRE class=syntax xml:space="preserve">typedef char CHAR;</PRE></DIV></DIV></TD></TR>
        <TR class=data>
          <TD class=data><B>COLORREF</B></TD>
          <TD class=data>Red, green, blue (RGB) color value (32 bits). See <A 
            href="http://msdn.microsoft.com/library/en-us/gdi/colors_9xiq.asp">COLORREF</A> 
            for information on this type. 
            <P>This type is declared in WinDef.h as follows:</P>
            <DIV class=conditionalSection id=newLanguageFilteredSection 
            development_language="C++">
            <P></P>
            <DIV class=codeSnippet><PRE class=syntax xml:space="preserve">typedef DWORD COLORREF;</PRE></DIV></DIV></TD></TR>
        <TR class=data>
          <TD class=data><B>CONST</B></TD>
          <TD class=data>Variable whose value is to remain constant during 
            execution. 
            <P>This type is declared in WinDef.h as follows:</P>
            <DIV class=conditionalSection id=newLanguageFilteredSection 
            development_language="C++">
            <P></P>
            <DIV class=codeSnippet><PRE class=syntax xml:space="preserve">#define CONST const</PRE></DIV></DIV></TD></TR>
        <TR class=data>
          <TD class=data><B>DWORD</B></TD>
          <TD class=data>32-bit unsigned integer. 
            <P>This type is declared in WinDef.h as follows:</P>
            <DIV class=conditionalSection id=newLanguageFilteredSection 
            development_language="C++">
            <P></P>
            <DIV class=codeSnippet><PRE class=syntax xml:space="preserve">typedef unsigned long DWORD;</PRE></DIV></DIV></TD></TR>
        <TR class=data>
          <TD class=data><B>DWORDLONG</B></TD>
          <TD class=data>64-bit unsigned integer. 
            <P>This type is declared in WinNT.h as follows:</P>
            <DIV class=conditionalSection id=newLanguageFilteredSection 
            development_language="C++">
            <P></P>
            <DIV class=codeSnippet><PRE class=syntax xml:space="preserve">typedef ULONGLONG DWORDLONG;</PRE></DIV></DIV></TD></TR>
        <TR class=data>
          <TD class=data><B>DWORD_PTR</B></TD>
          <TD class=data>Unsigned long type for pointer precision. Use when 
            casting a pointer to a long type to perform pointer arithmetic. 
            (Also commonly used for general 32-bit parameters that have been 
            extended to 64 bits in 64-bit Windows. ) 
            <P>This type is declared in BaseTsd.h as follows:</P>
            <DIV class=conditionalSection id=newLanguageFilteredSection 
            development_language="C++">
            <P></P>
            <DIV class=codeSnippet><PRE class=syntax xml:space="preserve">typedef ULONG_PTR DWORD_PTR;</PRE></DIV></DIV></TD></TR>
        <TR class=data>
          <TD class=data><B>DWORD32</B></TD>
          <TD class=data>32-bit unsigned integer. 
            <P>This type is declared in BaseTsd.h as follows:</P>
            <DIV class=conditionalSection id=newLanguageFilteredSection 
            development_language="C++">
            <P></P>
            <DIV class=codeSnippet><PRE class=syntax xml:space="preserve">typedef unsigned int DWORD32;</PRE></DIV></DIV></TD></TR>
        <TR class=data>
          <TD class=data><B>DWORD64</B></TD>
          <TD class=data>64-bit unsigned integer. 
            <P>This type is declared in BaseTsd.h as follows:</P>
            <DIV class=conditionalSection id=newLanguageFilteredSection 
            development_language="C++">
            <P></P>
            <DIV class=codeSnippet><PRE class=syntax xml:space="preserve">typedef unsigned __int64 DWORD64;</PRE></DIV></DIV></TD></TR>
        <TR class=data>
          <TD class=data><B>FLOAT</B></TD>
          <TD class=data>Floating-point variable. 
            <P>This type is declared in WinDef.h as follows:</P>
            <DIV class=conditionalSection id=newLanguageFilteredSection 
            development_language="C++">
            <P></P>
            <DIV class=codeSnippet><PRE class=syntax xml:space="preserve">typedef float FLOAT;</PRE></DIV></DIV></TD></TR>
        <TR class=data>
          <TD class=data><B>HACCEL</B></TD>
          <TD class=data>Handle to an <A 
            href="http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardaccelerators.asp">accelerator 
            table</A>. 
            <P>This type is declared in WinDef.h as follows:</P>
            <DIV class=conditionalSection id=newLanguageFilteredSection 
            development_language="C++">
            <P></P>
            <DIV class=codeSnippet><PRE class=syntax xml:space="preserve">typedef HANDLE HACCEL;</PRE></DIV></DIV></TD></TR>
        <TR class=data>
          <TD class=data><B>HALF_PTR</B></TD>
          <TD class=data>Half the size of a pointer. Use within a structure 
            that contains a pointer and two small fields. 
            <P>This type is declared in Basetsd.h as follows:</P>
            <DIV class=conditionalSection id=newLanguageFilteredSection 
            development_language="C++">
            <P></P>
            <DIV class=codeSnippet><PRE class=syntax xml:space="preserve">#ifdef _WIN64
 typedef int HALF_PTR;
#else
 typedef short HALF_PTR;
#endif</PRE></DIV></DIV></TD></TR>
        <TR class=data>
          <TD class=data><B>HANDLE</B></TD>
          <TD class=data>Handle to an object. 
            <P>This type is declared in WinNT.h as follows:</P>
            <DIV class=conditionalSection id=newLanguageFilteredSection 
            development_language="C++">
            <P></P>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -