C++ data type vers Pb

Partagez votre expérience de PureBasic avec les autres utilisateurs.
Avatar de l’utilisateur
celtic88
Messages : 309
Inscription : sam. 12/sept./2015 14:31
Localisation : Alger

C++ data type vers Pb

Message par celtic88 »

Bonjour Les Pures, :)

un code que je l'utilise souvent pour convertir les types de data windows vers Purebasic

Code : Tout sélectionner

Structure StValType
  S1.s
  S2.s
  S3.s
EndStructure

Global NewList ListValType.StValType()

Procedure ResizeGadgetsWindow()
  Protected FormWindowWidth, FormWindowHeight
  FormWindowWidth = WindowWidth(0)
  FormWindowHeight = WindowHeight(0)
  ResizeGadget(0, 10, 40, FormWindowWidth - 20, FormWindowHeight - 50)
EndProcedure

Procedure Exit()
  End 0
EndProcedure

Procedure EvEnt()
  Protected gst.s = GetGadgetText(2)
  Select EventType()
    Case #PB_EventType_Change
      If gst = ""
        SetGadgetText(2,"Data Type...")
        SetGadgetColor(2,#PB_Gadget_FrontColor,$8B8C8F)
        SetGadgetFont(2,FontID(0))
        ClearGadgetItems(0)
        ForEach ListValType()
          AddGadgetItem(0,-1,  ListValType()\S1 + Chr(10) +
                               ListValType()\S2+ Chr(10) +
                               ListValType()\S3)
        Next
      Else
        SetGadgetColor(2,#PB_Gadget_FrontColor,$00)
        SetGadgetFont(2,FontID(1))
        If CountString(gst,"Data Type...")
          gst = ReplaceString(gst,"Data Type...","")
          SetGadgetText(2,"")
          SendMessage_(GadgetID(2), #EM_REPLACESEL, 1, @gst)
        EndIf
        ClearGadgetItems(0)
        ForEach ListValType()
          If FindString(ListValType()\S1,gst,1,#PB_String_NoCase)
            AddGadgetItem(0,-1,  ListValType()\S1 + Chr(10) +
                                 ListValType()\S2+ Chr(10) +
                                 ListValType()\S3)
          EndIf
        Next
      EndIf
      
  EndSelect
EndProcedure

Procedure CreateWindow()
  OpenWindow(0, 0, 0, 600, 400, "", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_ScreenCentered | #PB_Window_WindowCentered)
  BindEvent(#PB_Event_CloseWindow,@Exit())
  BindEvent(#PB_Event_SizeWindow,@ResizeGadgetsWindow())
  ListIconGadget(0, 10, 40, 580, 350, "Type Name", 100)
  AddGadgetColumn(0, 1, "Pb Type", 100)
  AddGadgetColumn(0, 2, "Info", 100)
  StringGadget(2, 270, 10, 210, 25, "Data Type...")
  LoadFont(0, "Arial"  ,  8, #PB_Font_Italic) 
  LoadFont(1, "Arial", 9) 
  SetGadgetColor(2,#PB_Gadget_FrontColor,$8B8C8F)
  SetGadgetFont(2,FontID(0))
  BindGadgetEvent(2,@EvEnt(),#PB_EventType_Change)
EndProcedure

Procedure.s FileRead_String(FilePath.s,StringType = #PB_Ascii)
  Protected hfile = OpenFile(#PB_Any, FilePath)
  If hfile
    Protected SizeFile = Lof(hfile)
    Protected *pFile = AllocateMemory((SizeFile+4) * 1 + (Bool(StringType<>#PB_Ascii)))
    ReadData(hfile,*pFile,SizeFile)
    CloseFile(hfile)
  EndIf
  Protected Strfile.s= PeekS(*pFile,-1,StringType)
  If *pFile:FreeMemory(*pFile):EndIf
  ProcedureReturn Strfile
EndProcedure

CreateWindow()

ValType.s = FileRead_String("Windows Data Types to PB.txt")

For p = 1 To CountString(ValType,#CRLF$)
  sLine.s = StringField(ValType, p,#CRLF$)
  Svtype.s = StringField(sLine, 1,";;")
  AddElement(ListValType())
  ListValType()\S1 = StringField(Svtype, 1,"=")
  ListValType()\S2 = StringField(Svtype, 2,"=")
  ListValType()\S3 = ReplaceString(StringField(sLine, 2,";;"),Chr(10)," ")
  AddGadgetItem(0,-1,  ListValType()\S1 + Chr(10) +
                       ListValType()\S2+ Chr(10) +
                       ListValType()\S3)
Next

Repeat:WaitWindowEvent():ForEver
Windows Data Types to PB.txt
APIENTRY=stdcall;;#define APIENTRY WINAPI;The calling convention for system functions. // This type is declared in WinDef.h as follows:
ATOM=u;;typedef WORD ATOM;;An atom. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... spx">About Atom Tables</a>. // This type is declared in WinDef.h as follows:
BOOL=l;;typedef int BOOL;;A Boolean variable (should be <strong>TRUE</strong> or <strong>FALSE</strong>). // This type is declared in WinDef.h as follows:
BOOLEAN=a;;typedef BYTE BOOLEAN;;A Boolean variable (should be <strong>TRUE</strong> or <strong>FALSE</strong>). // This type is declared in WinNT.h as follows:
BYTE=a;;typedef unsigned char BYTE;;A byte (8 bits). // This type is declared in WinDef.h as follows:
CALLBACK=stdcall;;#define CALLBACK __stdcall;The calling convention for callback functions. // This type is declared in WinDef.h as follows:
CCHAR=a;;typedef char CCHAR;;An 8-bit Windows (ANSI) character. // This type is declared in WinNT.h as follows:
CHAR=a;;typedef char CHAR;;An 8-bit Windows (ANSI) character. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... >Character Sets Used By Fonts</a>. // This type is declared in WinNT.h as follows:
COLORREF=l;;typedef DWORD COLORREF;;The red, green, blue (RGB) color value (32 bits). See <a href="https://msdn.microsoft.com/en-us/librar ... x"><strong xmlns="http://www.w3.org/1999/xhtml">COLORREF</strong></a> for information on this type. // This type is declared in WinDef.h as follows:
CONST=#;;#define CONST const;A variable whose value is to remain constant during execution. // This type is declared in WinDef.h as follows:
DWORD=l;;typedef unsigned long DWORD;;A 32-bit unsigned integer. The range is 0 through 4294967295 decimal. // This type is declared in IntSafe.h as follows:
DWORDLONG=q;;typedef unsigned __int64 DWORDLONG;;A 64-bit unsigned integer. The range is 0 through 18446744073709551615 decimal. // This type is declared in IntSafe.h as follows:
DWORD_PTR=*.Long;;typedef ULONG_PTR DWORD_PTR;;An 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.) // This type is declared in BaseTsd.h as follows:
DWORD32=l;;typedef unsigned int DWORD32;;A 32-bit unsigned integer. // This type is declared in BaseTsd.h as follows:
DWORD64=q;;typedef unsigned __int64 DWORD64;;A 64-bit unsigned integer. // This type is declared in BaseTsd.h as follows:
FLOAT=f;;typedef float FLOAT;;A floating-point variable. // This type is declared in WinDef.h as follows:
HACCEL=i;;typedef HANDLE HACCEL;;A handle to an <a href="https://msdn.microsoft.com/en-us/librar ... ccelerator table</a>. // This type is declared in WinDef.h as follows:
HALF_PTR=i;;;Half the size of a pointer. Use within a structure that contains a pointer and two small fields. // This type is declared in BaseTsd.h as follows:
HANDLE=i;;typedef PVOID HANDLE;;A handle to an object. // This type is declared in WinNT.h as follows:
HBITMAP=i;;typedef HANDLE HBITMAP;;A handle to a <a href="https://msdn.microsoft.com/en-us/librar ... >bitmap</a>. // This type is declared in WinDef.h as follows:
HBRUSH=i;;typedef HANDLE HBRUSH;;A handle to a <a href="https://msdn.microsoft.com/en-us/librar ... ">brush</a>. // This type is declared in WinDef.h as follows:
HCOLORSPACE=i;;typedef HANDLE HCOLORSPACE;;A handle to a <a href="https://msdn.microsoft.com/en-us/librar ... spx">color space</a>. // This type is declared in WinDef.h as follows:
HCONV=i;;typedef HANDLE HCONV;;A handle to a dynamic data exchange (DDE) conversation. // This type is declared in Ddeml.h as follows:
HCONVLIST=i;;typedef HANDLE HCONVLIST;;A handle to a DDE conversation list. // This type is declared in Ddeml.h as follows:
HCURSOR=i;;typedef HICON HCURSOR;;A handle to a <a href="https://msdn.microsoft.com/en-us/librar ... >cursor</a>. // This type is declared in WinDef.h as follows:
HDC=i;;typedef HANDLE HDC;;A handle to a <a href="https://msdn.microsoft.com/en-us/librar ... px">device context</a> (DC). // This type is declared in WinDef.h as follows:
HDDEDATA=i;;typedef HANDLE HDDEDATA;;A handle to DDE data. // This type is declared in Ddeml.h as follows:
HDESK=i;;typedef HANDLE HDESK;;A handle to a <a href="https://msdn.microsoft.com/en-us/librar ... desktop</a>. // This type is declared in WinDef.h as follows:
HDROP=i;;typedef HANDLE HDROP;;A handle to an internal drop structure. // This type is declared in ShellApi.h as follows:
HDWP=i;;typedef HANDLE HDWP;;A handle to a deferred window position structure. // This type is declared in WinUser.h as follows:
HENHMETAFILE=i;;typedef HANDLE HENHMETAFILE;;A handle to an <a href="https://msdn.microsoft.com/en-us/librar ... ">enhanced metafile</a>. // This type is declared in WinDef.h as follows:
HFILE=l;;typedef int HFILE;;A handle to a file opened by <a href="https://msdn.microsoft.com/en-us/librar ... x"><strong xmlns="http://www.w3.org/1999/xhtml">OpenFile</strong></a>, not <a href="https://msdn.microsoft.com/en-us/librar ... x"><strong xmlns="http://www.w3.org/1999/xhtml">CreateFile</strong></a>. // This type is declared in WinDef.h as follows:
HFONT=i;;typedef HANDLE HFONT;;A handle to a <a href="https://msdn.microsoft.com/en-us/librar ... x">font</a>. // This type is declared in WinDef.h as follows:
HGDIOBJ=i;;typedef HANDLE HGDIOBJ;;A handle to a GDI object. // This type is declared in WinDef.h as follows:
HGLOBAL=i;;typedef HANDLE HGLOBAL;;A handle to a global memory block. // This type is declared in WinDef.h as follows:
HHOOK=i;;typedef HANDLE HHOOK;;A handle to a <a href="https://msdn.microsoft.com/en-us/librar ... x">hook</a>. // This type is declared in WinDef.h as follows:
HICON=i;;typedef HANDLE HICON;;A handle to an <a href="https://msdn.microsoft.com/en-us/librar ... x">icon</a>. // This type is declared in WinDef.h as follows:
HINSTANCE=i;;typedef HANDLE HINSTANCE;;A handle to an instance. This is the base address of the module in memory. // <strong>HMODULE</strong> and <strong>HINSTANCE</strong> are the same today, but represented different things in 16-bit Windows.
HKEY=i;;typedef HANDLE HKEY;;A handle to a registry key. // This type is declared in WinDef.h as follows:
HKL=i;;typedef HANDLE HKL;;An input locale identifier. // This type is declared in WinDef.h as follows:
HLOCAL=i;;typedef HANDLE HLOCAL;;A handle to a local memory block. // This type is declared in WinDef.h as follows:
HMENU=i;;typedef HANDLE HMENU;;A handle to a <a href="https://msdn.microsoft.com/en-us/librar ... x">menu</a>. // This type is declared in WinDef.h as follows:
HMETAFILE=i;;typedef HANDLE HMETAFILE;;A handle to a <a href="https://msdn.microsoft.com/en-us/librar ... etafile</a>. // This type is declared in WinDef.h as follows:
HMODULE=i;;typedef HINSTANCE HMODULE;;A handle to a module. The is the base address of the module in memory. // <strong>HMODULE</strong> and <strong>HINSTANCE</strong> are the same in current versions of Windows, but represented different things in 16-bit Windows.
HMONITOR=i;;if(WINVER >= 0x0500) typedef HANDLE HMONITOR;;A handle to a display monitor. // This type is declared in WinDef.h as follows:
HPALETTE=i;;typedef HANDLE HPALETTE;;A handle to a palette. // This type is declared in WinDef.h as follows:
HPEN=i;;typedef HANDLE HPEN;;A handle to a <a href="https://msdn.microsoft.com/en-us/librar ... px">pen</a>. // This type is declared in WinDef.h as follows:
HRESULT=l;;typedef LONG HRESULT;;The return codes used by COM interfaces. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... >Structure of the COM Error Codes</a>. To test an <strong>HRESULT</strong> value, use the <a href="https://msdn.microsoft.com/en-us/librar ... x"><strong xmlns="http://www.w3.org/1999/xhtml">FAILED</strong></a> and <a href="https://msdn.microsoft.com/en-us/librar ... x"><strong xmlns="http://www.w3.org/1999/xhtml">SUCCEEDED</strong></a> macros. // This type is declared in WinNT.h as follows:
HRGN=i;;typedef HANDLE HRGN;;A handle to a <a href="https://msdn.microsoft.com/en-us/librar ... >region</a>. // This type is declared in WinDef.h as follows:
HRSRC=i;;typedef HANDLE HRSRC;;A handle to a resource. // This type is declared in WinDef.h as follows:
HSZ=i;;typedef HANDLE HSZ;;A handle to a DDE string. // This type is declared in Ddeml.h as follows:
HWINSTA=i;;typedef HANDLE WINSTA;;A handle to a <a href="https://msdn.microsoft.com/en-us/librar ... px">window station</a>. // This type is declared in WinDef.h as follows:
HWND=i;;typedef HANDLE HWND;;A handle to a <a href="https://msdn.microsoft.com/en-us/librar ... >window</a>. // This type is declared in WinDef.h as follows:
INT=l;;typedef int INT;;A 32-bit signed integer. The range is -2147483648 through 2147483647 decimal. // This type is declared in WinDef.h as follows:
INT_PTR=*.Long;;;A signed integer type for pointer precision. Use when casting a pointer to an integer to perform pointer arithmetic. // This type is declared in BaseTsd.h as follows:
INT8=a;;typedef signed char INT8;;An 8-bit signed integer. // This type is declared in BaseTsd.h as follows:
INT16=u;;typedef signed short INT16;;A 16-bit signed integer. // This type is declared in BaseTsd.h as follows:
INT32=l;;typedef signed int INT32;;A 32-bit signed integer. The range is -2147483648 through 2147483647 decimal. // This type is declared in BaseTsd.h as follows:
INT64=q;;typedef signed __int64 INT64;;A 64-bit signed integer. The range is –9223372036854775808 through 9223372036854775807 decimal. // This type is declared in BaseTsd.h as follows:
LANGID=u;;typedef WORD LANGID;;A language identifier. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... ">Language Identifiers</a>. // This type is declared in WinNT.h as follows:
LCID=l;;typedef DWORD LCID;;A locale identifier. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... px">Locale Identifiers</a>. // This type is declared in WinNT.h as follows:
LCTYPE=l;;typedef DWORD LCTYPE;;A locale information type. For a list, see <a href="https://msdn.microsoft.com/en-us/librar ... px">Locale Information Constants</a>. // This type is declared in WinNls.h as follows:
LGRPID=l;;typedef DWORD LGRPID;;A language group identifier. For a list, see <a href="https://msdn.microsoft.com/en-us/librar ... x"><strong xmlns="http://www.w3.org/1999/xhtml">EnumLangu ... strong></a>. // This type is declared in WinNls.h as follows:
LONG=l;;typedef long LONG;;A 32-bit signed integer. The range is –2147483648 through 2147483647 decimal. // This type is declared in WinNT.h as follows:
LONGLONG=q;;;A 64-bit signed integer. The range is –9223372036854775808 through 9223372036854775807 decimal. // This type is declared in WinNT.h as follows:
LONG_PTR=*.Long;;;A signed long type for pointer precision. Use when casting a pointer to a long to perform pointer arithmetic. // This type is declared in BaseTsd.h as follows:
LONG32=l;;typedef signed int LONG32;;A 32-bit signed integer. The range is –2147483648 through 2147483647 decimal. // This type is declared in BaseTsd.h as follows:
LONG64=q;;typedef __int64 LONG64;;A 64-bit signed integer. The range is –9223372036854775808 through 9223372036854775807 decimal. // This type is declared in BaseTsd.h as follows:
LPARAM=*.Long;;typedef LONG_PTR LPARAM;;A message parameter. // This type is declared in WinDef.h as follows:
LPBOOL=*.Long;;typedef BOOL far *LPBOOL;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... L">BOOL</a>. // This type is declared in WinDef.h as follows:
LPBYTE=*.Ascii;;typedef BYTE far *LPBYTE;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... E">BYTE</a>. // This type is declared in WinDef.h as follows:
LPCOLORREF=*.Long;;typedef DWORD *LPCOLORREF;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... x"><strong xmlns="http://www.w3.org/1999/xhtml">COLORREF</strong></a> value. // This type is declared in WinDef.h as follows:
LPCSTR=*.Ascii_String;;typedef __nullterminated CONST CHAR *LPCSTR;;A pointer to a constant null-terminated string of 8-bit Windows (ANSI) characters. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... >Character Sets Used By Fonts</a>. // This type is declared in WinNT.h as follows:
LPCTSTR=*.Ascii_String;;;An <a href="https://msdn.microsoft.com/en-us/librar ... LPCWSTR</a> if <strong>UNICODE</strong> is defined, an <a href="https://msdn.microsoft.com/en-us/librar ... >LPCSTR</a> otherwise. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... x">Windows Data Types for Strings</a>. // This type is declared in WinNT.h as follows:
LPCVOID=*;;typedef CONST void *LPCVOID;;A pointer to a constant of any type. // This type is declared in WinDef.h as follows:
LPCWSTR=*.Unicode_String;;typedef CONST WCHAR *LPCWSTR;;A pointer to a constant null-terminated string of 16-bit Unicode characters. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... >Character Sets Used By Fonts</a>. // This type is declared in WinNT.h as follows:
LPDWORD=*.Long;;typedef DWORD *LPDWORD;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... ">DWORD</a>. // This type is declared in WinDef.h as follows:
LPHANDLE=*.Integer;;typedef HANDLE *LPHANDLE;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... >HANDLE</a>. // This type is declared in WinDef.h as follows:
LPINT=*.Long;;typedef int *LPINT;;A pointer to an <a href="https://msdn.microsoft.com/en-us/librar ... NT">INT</a>. // This type is declared in WinDef.h as follows:
LPLONG=*.Long;;typedef long *LPLONG;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... G">LONG</a>. // This type is declared in WinDef.h as follows:
LPSTR=*.Ascii_String;;typedef CHAR *LPSTR;;A pointer to a null-terminated string of 8-bit Windows (ANSI) characters. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... >Character Sets Used By Fonts</a>. // This type is declared in WinNT.h as follows:
LPTSTR=*.Ascii_String;;;An <a href="https://msdn.microsoft.com/en-us/librar ... >LPWSTR</a> if <strong>UNICODE</strong> is defined, an <a href="https://msdn.microsoft.com/en-us/librar ... ">LPSTR</a> otherwise. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... x">Windows Data Types for Strings</a>. // This type is declared in WinNT.h as follows:
LPVOID=*;;typedef void *LPVOID;;A pointer to any type. // This type is declared in WinDef.h as follows:
LPWORD=*.Unicode;;typedef WORD *LPWORD;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... D">WORD</a>. // This type is declared in WinDef.h as follows:
LPWSTR=*.Unicode_String;;typedef WCHAR *LPWSTR;;A pointer to a null-terminated string of 16-bit Unicode characters. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... >Character Sets Used By Fonts</a>. // This type is declared in WinNT.h as follows:
LRESULT=*.Long;;typedef LONG_PTR LRESULT;;Signed result of message processing. // This type is declared in WinDef.h as follows:
PBOOL=*.Long;;typedef BOOL *PBOOL;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... L">BOOL</a>. // This type is declared in WinDef.h as follows:
PBOOLEAN=*.Ascii;;typedef BOOLEAN *PBOOLEAN;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... BOOLEAN</a>. // This type is declared in WinNT.h as follows:
PBYTE=*.Ascii;;typedef BYTE *PBYTE;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... E">BYTE</a>. // This type is declared in WinDef.h as follows:
PCHAR=*.Ascii;;typedef CHAR *PCHAR;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... R">CHAR</a>. // This type is declared in WinNT.h as follows:
PCSTR=*.Ascii_String;;typedef CONST CHAR *PCSTR;;A pointer to a constant null-terminated string of 8-bit Windows (ANSI) characters. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... >Character Sets Used By Fonts</a>. // This type is declared in WinNT.h as follows:
PCTSTR=*.Ascii_String;;;A <a href="https://msdn.microsoft.com/en-us/librar ... >PCWSTR</a> if <strong>UNICODE</strong> is defined, a <a href="https://msdn.microsoft.com/en-us/librar ... ">PCSTR</a> otherwise. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... x">Windows Data Types for Strings</a>. // This type is declared in WinNT.h as follows:
PCWSTR=*.Unicode_String;;typedef CONST WCHAR *PCWSTR;;A pointer to a constant null-terminated string of 16-bit Unicode characters. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... >Character Sets Used By Fonts</a>. // This type is declared in WinNT.h as follows:
PDWORD=*.Long;;typedef DWORD *PDWORD;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... ">DWORD</a>. // This type is declared in WinDef.h as follows:
PDWORDLONG=*.Quad;;typedef DWORDLONG *PDWORDLONG;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... ORDLONG</a>. // This type is declared in WinNT.h as follows:
PDWORD_PTR=*.Long;;typedef DWORD_PTR *PDWORD_PTR;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... ORD_PTR</a>. // This type is declared in BaseTsd.h as follows:
PDWORD32=*.Long;;typedef DWORD32 *PDWORD32;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... DWORD32</a>. // This type is declared in BaseTsd.h as follows:
PDWORD64=*.Quad;;typedef DWORD64 *PDWORD64;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... DWORD64</a>. // This type is declared in BaseTsd.h as follows:
PFLOAT=*.Float;;typedef FLOAT *PFLOAT;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... ">FLOAT</a>. // This type is declared in WinDef.h as follows:
PHALF_PTR=*;;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... ALF_PTR</a>. // This type is declared in BaseTsd.h as follows:
PHANDLE=*.Integer;;typedef HANDLE *PHANDLE;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... >HANDLE</a>. // This type is declared in WinNT.h as follows:
PHKEY=*.Integer;;typedef HKEY *PHKEY;;A pointer to an <a href="https://msdn.microsoft.com/en-us/librar ... Y">HKEY</a>. // This type is declared in WinDef.h as follows:
PINT=*.Long;;typedef int *PINT;;A pointer to an <a href="https://msdn.microsoft.com/en-us/librar ... NT">INT</a>. // This type is declared in WinDef.h as follows:
PINT_PTR=*.Long;;typedef INT_PTR *PINT_PTR;;A pointer to an <a href="https://msdn.microsoft.com/en-us/librar ... INT_PTR</a>. // This type is declared in BaseTsd.h as follows:
PINT8=*.Ascii;;typedef INT8 *PINT8;;A pointer to an <a href="https://msdn.microsoft.com/en-us/librar ... 8">INT8</a>. // This type is declared in BaseTsd.h as follows:
PINT16=*.Unicode;;typedef INT16 *PINT16;;A pointer to an <a href="https://msdn.microsoft.com/en-us/librar ... ">INT16</a>. // This type is declared in BaseTsd.h as follows:
PINT32=*.Long;;typedef INT32 *PINT32;;A pointer to an <a href="https://msdn.microsoft.com/en-us/librar ... ">INT32</a>. // This type is declared in BaseTsd.h as follows:
PINT64=*.Quad;;typedef INT64 *PINT64;;A pointer to an <a href="https://msdn.microsoft.com/en-us/librar ... ">INT64</a>. // This type is declared in BaseTsd.h as follows:
PLCID=*.Long;;typedef PDWORD PLCID;;A pointer to an <a href="https://msdn.microsoft.com/en-us/librar ... D">LCID</a>. // This type is declared in WinNT.h as follows:
PLONG=*.Long;;typedef LONG *PLONG;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... G">LONG</a>. // This type is declared in WinNT.h as follows:
PLONGLONG=*.Quad;;typedef LONGLONG *PLONGLONG;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... ONGLONG</a>. // This type is declared in WinNT.h as follows:
PLONG_PTR=*.Long;;typedef LONG_PTR *PLONG_PTR;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... ONG_PTR</a>. // This type is declared in BaseTsd.h as follows:
PLONG32=*.Long;;typedef LONG32 *PLONG32;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... >LONG32</a>. // This type is declared in BaseTsd.h as follows:
PLONG64=*.Quad;;typedef LONG64 *PLONG64;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... >LONG64</a>. // This type is declared in BaseTsd.h as follows:
POINTER_32=i;;;A 32-bit pointer. On a 32-bit system, this is a native pointer. On a 64-bit system, this is a truncated 64-bit pointer. // This type is declared in BaseTsd.h as follows:
POINTER_64=i;;;A 64-bit pointer. On a 64-bit system, this is a native pointer. On a 32-bit system, this is a sign-extended 32-bit pointer. // Note that it is not safe to assume the state of the high pointer bit.
POINTER_SIGNED=i;;#define POINTER_SIGNED __sptr;A signed pointer. // This type is declared in BaseTsd.h as follows:
POINTER_UNSIGNED=i;;#define POINTER_UNSIGNED __uptr;An unsigned pointer. // This type is declared in BaseTsd.h as follows:
PSHORT=*.Unicode;;typedef SHORT *PSHORT;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... ">SHORT</a>. // This type is declared in WinNT.h as follows:
PSIZE_T=*.Long;;typedef SIZE_T *PSIZE_T;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... >SIZE_T</a>. // This type is declared in BaseTsd.h as follows:
PSSIZE_T=*.Long;;typedef SSIZE_T *PSSIZE_T;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... SSIZE_T</a>. // This type is declared in BaseTsd.h as follows:
PSTR=*.Ascii_String;;typedef CHAR *PSTR;;A pointer to a null-terminated string of 8-bit Windows (ANSI) characters. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... >Character Sets Used By Fonts</a>. // This type is declared in WinNT.h as follows:
PTBYTE=*.c;;typedef TBYTE *PTBYTE;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... ">TBYTE</a>. // This type is declared in WinNT.h as follows:
PTCHAR=*.c;;typedef TCHAR *PTCHAR;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... ">TCHAR</a>. // This type is declared in WinNT.h as follows:
PTSTR=*.Ascii_String | *.Unicode_String;;;A <a href="https://msdn.microsoft.com/en-us/librar ... ">PWSTR</a> if <strong>UNICODE</strong> is defined, a <a href="https://msdn.microsoft.com/en-us/librar ... R">PSTR</a> otherwise. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... x">Windows Data Types for Strings</a>. // This type is declared in WinNT.h as follows:
PUCHAR=*.Ascii;;typedef UCHAR *PUCHAR;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... ">UCHAR</a>. // This type is declared in WinDef.h as follows:
PUHALF_PTR=*;;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... ALF_PTR</a>. // This type is declared in BaseTsd.h as follows:
PUINT=*.Long;;typedef UINT *PUINT;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... T">UINT</a>. // This type is declared in WinDef.h as follows:
PUINT_PTR=*.Long;;typedef UINT_PTR *PUINT_PTR;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... INT_PTR</a>. // This type is declared in BaseTsd.h as follows:
PUINT8=*.Ascii;;typedef UINT8 *PUINT8;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... ">UINT8</a>. // This type is declared in BaseTsd.h as follows:
PUINT16=*.Unicode;;typedef UINT16 *PUINT16;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... >UINT16</a>. // This type is declared in BaseTsd.h as follows:
PUINT32=*.Long;;typedef UINT32 *PUINT32;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... >UINT32</a>. // This type is declared in BaseTsd.h as follows:
PUINT64=*.Quad;;typedef UINT64 *PUINT64;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... >UINT64</a>. // This type is declared in BaseTsd.h as follows:
PULONG=*.Long;;typedef ULONG *PULONG;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... ">ULONG</a>. // This type is declared in WinDef.h as follows:
PULONGLONG=*.Quad;;typedef ULONGLONG *PULONGLONG;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... ONGLONG</a>. // This type is declared in WinDef.h as follows:
PULONG_PTR=*.Long;;typedef ULONG_PTR *PULONG_PTR;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... ONG_PTR</a>. // This type is declared in BaseTsd.h as follows:
PULONG32=*.Long;;typedef ULONG32 *PULONG32;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... ULONG32</a>. // This type is declared in BaseTsd.h as follows:
PULONG64=*.Quad;;typedef ULONG64 *PULONG64;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... ULONG64</a>. // This type is declared in BaseTsd.h as follows:
PUSHORT=*.Unicode;;typedef USHORT *PUSHORT;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... >USHORT</a>. // This type is declared in WinDef.h as follows:
PVOID=*;;typedef void *PVOID;;A pointer to any type. // This type is declared in WinNT.h as follows:
PWCHAR=*.Unicode;;typedef WCHAR *PWCHAR;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... ">WCHAR</a>. // This type is declared in WinNT.h as follows:
PWORD=*.Unicode;;typedef WORD *PWORD;;A pointer to a <a href="https://msdn.microsoft.com/en-us/librar ... D">WORD</a>. // This type is declared in WinDef.h as follows:
PWSTR=*.Unicode_String;;typedef WCHAR *PWSTR;;A pointer to a null-terminated string of 16-bit Unicode characters. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... >Character Sets Used By Fonts</a>. // This type is declared in WinNT.h as follows:
QWORD=q;;typedef unsigned __int64 QWORD;;A 64-bit unsigned integer. // This type is declared as follows:
SC_HANDLE=i;;typedef HANDLE SC_HANDLE;;A handle to a service control manager database. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... .aspx">SCM Handles</a>. // This type is declared in WinSvc.h as follows:
SC_LOCK=i;;typedef LPVOID SC_LOCK;;A lock to a service control manager database. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... .aspx">SCM Handles</a>. // This type is declared in WinSvc.h as follows:
SERVICE_STATUS_HANDLE=i;;typedef HANDLE SERVICE_STATUS_HANDLE;;A handle to a service status value. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... .aspx">SCM Handles</a>. // This type is declared in WinSvc.h as follows:
SHORT=u;;typedef short SHORT;;A 16-bit integer. The range is –32768 through 32767 decimal. // This type is declared in WinNT.h as follows:
SIZE_T=*.Long;;typedef ULONG_PTR SIZE_T;;The maximum number of bytes to which a pointer can point. Use for a count that must span the full range of a pointer. // This type is declared in BaseTsd.h as follows:
SSIZE_T=*.Long;;typedef LONG_PTR SSIZE_T;;A signed version of <a href="https://msdn.microsoft.com/en-us/librar ... >SIZE_T</a>. // This type is declared in BaseTsd.h as follows:
TBYTE=c;;;A <a href="https://msdn.microsoft.com/en-us/librar ... ">WCHAR</a> if <strong>UNICODE</strong> is defined, a <a href="https://msdn.microsoft.com/en-us/librar ... R">CHAR</a> otherwise. // This type is declared in WinNT.h as follows:
TCHAR=c;;;A <a href="https://msdn.microsoft.com/en-us/librar ... ">WCHAR</a> if <strong>UNICODE</strong> is defined, a <a href="https://msdn.microsoft.com/en-us/librar ... R">CHAR</a> otherwise. // This type is declared in WinNT.h as follows:
UCHAR=a;;typedef unsigned char UCHAR;;An unsigned <a href="https://msdn.microsoft.com/en-us/librar ... R">CHAR</a>. // This type is declared in WinDef.h as follows:
UHALF_PTR=*;;;An unsigned <a href="https://msdn.microsoft.com/en-us/librar ... ALF_PTR</a>. Use within a structure that contains a pointer and two small fields. // This type is declared in BaseTsd.h as follows:
UINT=l;;typedef unsigned int UINT;;An unsigned <a href="https://msdn.microsoft.com/en-us/librar ... NT">INT</a>. The range is 0 through 4294967295 decimal. // This type is declared in WinDef.h as follows:
UINT_PTR=*.Long;;;An unsigned <a href="https://msdn.microsoft.com/en-us/librar ... INT_PTR</a>. // This type is declared in BaseTsd.h as follows:
UINT8=a;;typedef unsigned char UINT8;;An unsigned <a href="https://msdn.microsoft.com/en-us/librar ... 8">INT8</a>. // This type is declared in BaseTsd.h as follows:
UINT16=u;;typedef unsigned short UINT16;;An unsigned <a href="https://msdn.microsoft.com/en-us/librar ... ">INT16</a>. // This type is declared in BaseTsd.h as follows:
UINT32=l;;typedef unsigned int UINT32;;An unsigned <a href="https://msdn.microsoft.com/en-us/librar ... ">INT32</a>. The range is 0 through 4294967295 decimal. // This type is declared in BaseTsd.h as follows:
UINT64=q;;typedef usigned __int 64 UINT64;;An unsigned <a href="https://msdn.microsoft.com/en-us/librar ... ">INT64</a>. The range is 0 through 18446744073709551615 decimal. // This type is declared in BaseTsd.h as follows:
ULONG=l;;typedef unsigned long ULONG;;An unsigned <a href="https://msdn.microsoft.com/en-us/librar ... G">LONG</a>. The range is 0 through 4294967295 decimal. // This type is declared in WinDef.h as follows:
ULONGLONG=q;;;A 64-bit unsigned integer. The range is 0 through 18446744073709551615 decimal. // This type is declared in WinNT.h as follows:
ULONG_PTR=*.Long;;;An unsigned <a href="https://msdn.microsoft.com/en-us/librar ... ONG_PTR</a>. // This type is declared in BaseTsd.h as follows:
ULONG32=l;;typedef unsigned int ULONG32;;An unsigned <a href="https://msdn.microsoft.com/en-us/librar ... >LONG32</a>. The range is 0 through 4294967295 decimal. // This type is declared in BaseTsd.h as follows:
ULONG64=q;;typedef unsigned __int64 ULONG64;;An unsigned <a href="https://msdn.microsoft.com/en-us/librar ... >LONG64</a>. The range is 0 through 18446744073709551615 decimal. // This type is declared in BaseTsd.h as follows:
UNICODE_STRING=*.Unicode_String;;;A Unicode string. // This type is declared in Winternl.h as follows:
USHORT=u;;typedef unsigned short USHORT;;An unsigned <a href="https://msdn.microsoft.com/en-us/librar ... ">SHORT</a>. The range is 0 through 65535 decimal. // This type is declared in WinDef.h as follows:
USN=q;;typedef LONGLONG USN;;An update sequence number (USN). // This type is declared in WinNT.h as follows:
VOID=*;;#define VOID void;Any type. // This type is declared in WinNT.h as follows:
WCHAR=u;;typedef wchar_t WCHAR;;A 16-bit Unicode character. For more information, see <a href="https://msdn.microsoft.com/en-us/librar ... >Character Sets Used By Fonts</a>. // This type is declared in WinNT.h as follows:
WINAPI=stdcall;;#define WINAPI __stdcall;The calling convention for system functions. // This type is declared in WinDef.h as follows:
WORD=u;;typedef unsigned short WORD;;A 16-bit unsigned integer. The range is 0 through 65535 decimal. // This type is declared in WinDef.h as follows:
WPARAM=*.Long;;typedef UINT_PTR WPARAM;;A message parameter. // This type is declared in WinDef.h as follows:
a +
.....i Love Pb :)
Avatar de l’utilisateur
celtic88
Messages : 309
Inscription : sam. 12/sept./2015 14:31
Localisation : Alger

Re: C++ data type vers Pb

Message par celtic88 »

mise à jour :D
.....i Love Pb :)
Avatar de l’utilisateur
Ar-S
Messages : 9472
Inscription : dim. 09/oct./2005 16:51
Contact :

Re: C++ data type vers Pb

Message par Ar-S »

Merci :)
J'ai ajouté ça aprés createwindow() histoire de ne pas chercher le path du fichier txt
Il fut bien sûr appeler son fichier texte : datatype.txt

Code : Tout sélectionner

If FileSize(GetCurrentDirectory()+"datatype.txt") < 1
  
  DatatypeTXT.s = OpenFileRequester("Fichier datatype", GetCurrentDirectory()+"datatype.txt" , "Texte (*.txt)|*.txt", 0)
  If DatatypeTXT.s <> ""
    ValType.s = FileRead_String(DatatypeTXT.s)
  Else
    ValType.s = "Windows Data Types To PB.txt"
  EndIf
  
Else
  ValType.s = FileRead_String(GetCurrentDirectory()+"datatype.txt"  )
EndIf
~~~~Règles du forum ~~~~
⋅.˳˳.⋅ॱ˙˙ॱ⋅.˳Ar-S ˳.⋅ॱ˙˙ॱ⋅.˳˳.⋅
W11x64 PB 6.x
Section HORS SUJET : ICI
LDV MULTIMEDIA : Dépannage informatique & mes Logiciels PB
UPLOAD D'IMAGES : Uploader des images de vos logiciels
Répondre