New topic: Windows API, where do I declare it in RS
<http://forums.realsoftware.com/viewtopic.php?t=45653> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message TomazVDaSilva Post subject: Windows API, where do I declare it in RSPosted: Sat Oct 20, 2012 2:46 pm Joined: Thu Dec 29, 2011 6:46 pm Posts: 186 Location: Edmonton, AB, Canada I have a application in VBA and I want recreate it in RealBasic. I have all my API declarations inside of a module. Can I do the same thing with RB and create a separate module with all the declarations ? Declare Function AlphaBlend Lib "MSIMG32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal w As Long, ByVal h As Long, _ ByVal hdcS As Long, ByVal xS As Long, ByVal yS As Long, ByVal wS As Long, ByVal hS As Long, ByVal BLENDFUNCTION As Long) As Long Declare Function BitBlt Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal w As Long, ByVal h As Long, ByVal hdcS As Long, ByVal xS As Long, ByVal yS As Long, ByVal dwRop As Long) As Long Declare Function CreateBitmap Lib "gdi32" (ByVal w As Long, ByVal h As Long, ByVal nPlanes As Long, ByVal nBitCount As Long, lpBits As Any) As Long Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long Declare Function CreateCompatibleBitmap Lib "gdi32" (ByVal hdc As Long, ByVal w As Long, ByVal h As Long) As Long Declare Function CreateCompatibleDC Lib "gdi32" (ByVal hdc As Long) As Long Declare Function CreateFont Lib "gdi32.dll" Alias "CreateFontA" (ByVal nHeight As Long, ByVal nWidth As Long, ByVal nEscapement As Long, _ ByVal nOrientation As Long, ByVal fnWeight As Long, ByVal fdwItalic As Long, _ ByVal fwUnderline As Long, ByVal fdwStrinkeOut As Long, ByVal CharSet As Long, _ ByVal OutputPrecision As Long, ByVal ClipPrecision As Long, ByVal Quality As Long, _ ByVal fdwPitchAndFamily As Long, ByVal lpszFace As String) As Long Declare Function CreatePen Lib "gdi32" (ByVal fnPenStyle As Long, ByVal w As Long, ByVal crColor As Long) As Long Declare Function DeleteDC Lib "gdi32" (ByVal hdc As Long) As Long Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long Declare Function Ellipse Lib "gdi32" (ByVal hdc As Long, ByVal x1 As Long, ByVal y1 As Long, ByVal x2 As Long, ByVal y2 As Long) As Long Declare Function GetActiveWindow Lib "user32" () As Long Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Long Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long Declare Function GetStockObject Lib "gdi32" (ByVal fnObject As Long) As Long Declare Function GetTickCount Lib "kernel32" () As Long Declare Function PatBlt Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal w As Long, ByVal h As Long, ByVal dwRop As Long) As Long Declare Function Rectangle Lib "gdi32" (ByVal hdc As Long, ByVal nLeftRect As Long, ByVal nTopRect As Long, ByVal nRightRect As Long, ByVal nBottomRect As Long) As Long Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hdc As Long) As Long Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long Declare Function SetBkColor Lib "gdi32" (ByVal hdc As Long, ByVal crColor As Long) As Long Declare Function SetBkMode Lib "gdi32" (ByVal hdc As Long, ByVal iBkMode As Long) As Long Declare Function SetTextColor Lib "gdi32.dll" (ByVal hdc As Long, ByVal crColor As Long) As Long Declare Function TextOut Lib "gdi32.dll" Alias "TextOutA" (ByVal hdc As Long, ByVal nXStart As Long, ByVal nYStart As Long, ByVal lpString As String, ByVal cbString As Long) As Long Declare Sub Sleep Lib "kernel32" (ByVal ms As Long) Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, _ ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long _________________ Regards, TomazVDaSilva Clean Code: Robert C. Martin It is not the language that makes programs appear simple. It is the programmer that make the language appear simple! Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
