It is currently Mon Nov 20, 2017 1:17 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 36 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: WinAPI Library (1.138)
PostPosted: Sat Aug 08, 2015 10:11 pm 
Offline
Moderator
Moderator
User avatar

Joined: Thu Dec 31, 2009 11:05 pm
Posts: 377
Location: Berlin and Ibiza
Good evening :)

I'm introducing you my WinAPI Library.
My library contains 1052 sample code for WinAPI.

Screenshot (old german screenshot :D ):
Image

My program is available in following languages:
  • German
  • English
  • Spanish
  • French

You can select language at first program start or you can change later in menu "Language".
All text in English, French and Spanish was translated by "Google Translate".
It may be possible that some texts are grammatically incorrect. Comments and strings in the PB files was not translated.

Have fun :)

Online: http://www.rsbasic.de/winapi-library
Offline: http://www.rsbasic.de/downloads/winapi_library.zip

_________________
ImageImageImageImage


Top
 Profile  
Reply with quote  
 Post subject: Re: WinAPI Library (1.052)
PostPosted: Sat Aug 08, 2015 10:54 pm 
Offline
Addict
Addict

Joined: Sun Sep 07, 2008 12:45 pm
Posts: 3704
Location: Germany
Hi and welcome!

that's a great introduction :!:

But...
I personally avoid API like hell, to be crossplatform :D
The main reason why I'd choosen PB.

Bernd


Top
 Profile  
Reply with quote  
 Post subject: Re: WinAPI Library (1.052)
PostPosted: Sat Aug 08, 2015 11:42 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue May 28, 2013 10:51 pm
Posts: 499
Location: Europe
Absolutely fantastic!

Will you be going through the code for verification after users submission?

_________________
"If you lie to the compiler, it will get its revenge."
Henry Spencer
https://www.pci-z.com/


Top
 Profile  
Reply with quote  
 Post subject: Re: WinAPI Library (1.052)
PostPosted: Sun Aug 09, 2015 11:18 am 
Offline
Addict
Addict
User avatar

Joined: Tue Aug 11, 2009 1:56 pm
Posts: 860
Location: Essen (Germany)
w°0°w ~ how cool is that ~ Image

Thanks so much Image
... and for the great coming fun to 'adjust' a translation to ones privat language ;)

greets ~ Vera

_________________
Two growing code-collections: WinApi-Lib by RSBasic ~ LinuxAPI-Lib by Omi

Missing a download-file on the forums? ~ check out this backup page.


Top
 Profile  
Reply with quote  
 Post subject: Re: WinAPI Library (1.052)
PostPosted: Sun Aug 09, 2015 12:24 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Oct 21, 2013 5:21 pm
Posts: 139
Location: France (Al's Nudie bar!)
Many thanks ! :)

_________________
http://majikeyric.free.fr


Top
 Profile  
Reply with quote  
 Post subject: Re: WinAPI Library (1.052)
PostPosted: Sun Aug 09, 2015 5:21 pm 
Offline
User
User

Joined: Wed May 13, 2009 8:38 am
Posts: 80
Location: Arizona, USA
Well Done. Thank You for sharing. :D


Top
 Profile  
Reply with quote  
 Post subject: Re: WinAPI Library (1.052)
PostPosted: Sun Aug 09, 2015 10:39 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Jul 08, 2013 8:43 pm
Posts: 221
Very good, Thanks a lot!

_________________
If translation=Error: reply="Sorry, Im Spanish": Endif


Top
 Profile  
Reply with quote  
 Post subject: Re: WinAPI Library (1.052)
PostPosted: Mon Aug 10, 2015 12:28 am 
Offline
Enthusiast
Enthusiast

Joined: Sat Jul 03, 2004 9:04 am
Posts: 201
Location: Sydney Australia
Yep ! Very good. Thanx .....


Top
 Profile  
Reply with quote  
 Post subject: Re: WinAPI Library (1.052)
PostPosted: Mon Aug 10, 2015 7:15 pm 
Offline
User
User
User avatar

Joined: Thu Jul 27, 2006 1:24 pm
Posts: 55
Awesome :shock: !


Top
 Profile  
Reply with quote  
 Post subject: Re: WinAPI Library (1.052)
PostPosted: Tue Aug 11, 2015 6:31 am 
Offline
User
User

Joined: Mon Feb 21, 2011 12:15 pm
Posts: 25
Awesome contribution, RSBasic. This is will be really handy. Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: WinAPI Library (1.052)
PostPosted: Tue Aug 11, 2015 7:18 am 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5686
Location: Wales, UK
Just browsing this lib has opened my eyes to many things I was not aware of 8)

...... one of which was this:
Remove frame of ButtonImageGadget
Code:
ButtonImageGadget(1, 50, 50, 60, 60, ImageID(1), #BS_OWNERDRAW)


That works perfectly, but it leaves a white border around the button. How to make that border the same colour as the Window or Container back colour?

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: WinAPI Library (1.052)
PostPosted: Tue Aug 11, 2015 10:19 am 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3142
Location: Berlin, Germany
Many thanks for sharing!

I think in 3 code examples, SetWindowLong_() should be replaced with SetWindowLongPtr_()
(see PureBasic Team Blog - Porting your programs to PureBasic 64 bit).

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Top
 Profile  
Reply with quote  
 Post subject: Re: WinAPI Library (1.052)
PostPosted: Tue Aug 11, 2015 2:58 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed Aug 24, 2005 12:11 pm
Posts: 118
Location: Italia
Thank you for this great tool!!!!!

_________________
Registered User of Purebasic PB4.61 - Artic Report - Purevision


Top
 Profile  
Reply with quote  
 Post subject: Re: WinAPI Library (1.052)
PostPosted: Sat Aug 15, 2015 12:42 pm 
Offline
Moderator
Moderator
User avatar

Joined: Thu Dec 31, 2009 11:05 pm
Posts: 377
Location: Berlin and Ibiza
@all
Many many thanks for your feedback. :)

bbanelli wrote:
Will you be going through the code for verification after users submission?

I'm sorry, I don't understand you. What do you mean?

IdeasVacuum wrote:
That works perfectly, but it leaves a white border around the button. How to make that border the same colour as the Window or Container back colour?

You're right. Code to change the background color:
Code:
EnableExplicit

Global ButtonImageBC

CreateImage(1, 50, 50, 24, RGB(100, 200, 255))

Procedure WindowCallback(hWnd, uMsg, wParam, lParam)
  Select uMsg
    Case #WM_CTLCOLORBTN
      If lparam = GadgetID(1)
        ProcedureReturn ButtonImageBC
      EndIf
  EndSelect
 
  ProcedureReturn #PB_ProcessPureBasicEvents
EndProcedure

If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  ButtonImageGadget(1, 50, 50, 60, 60, ImageID(1), #BS_OWNERDRAW)
 
  SetWindowColor(0, RGB(100, 255, 100))
  ButtonImageBC = CreateSolidBrush_(RGB(100, 255, 100))
  ;ButtonImageBC = CreateSolidBrush_(GetSysColor_(#COLOR_BTNFACE))
 
  SetWindowCallback(@WindowCallback())
 
  Repeat
    Select WaitWindowEvent()
      Case #PB_Event_CloseWindow
        DeleteObject_(ButtonImageBC)
        End
    EndSelect
  ForEver
EndIf


Little John wrote:
I think in 3 code examples, SetWindowLong_() should be replaced with SetWindowLongPtr_().

Thank you. I'll replace it.

@le_magn
Profile information wrote:
Location: Italia

Do you need an Italian translation?

_________________
ImageImageImageImage


Top
 Profile  
Reply with quote  
 Post subject: Re: WinAPI Library (1.052)
PostPosted: Sun Aug 16, 2015 8:01 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Aug 11, 2009 1:56 pm
Posts: 860
Location: Essen (Germany)
RSBasic wrote:
bbanelli wrote:
Will you be going through the code for verification after users submission?
I'm sorry, I don't understand you. What do you mean?

If I may, I think this is meant:

If a user submits his code online [WinApiCode online einreichen], will you check the code to verify [bestätigen] if it is valid and correct [prüfen, ob der Code in Ordnung ist]?

Btw: I found a word which couldn't be translated into any other language: "Seitenweise" [by the pageful].
As it'll stay an automated translation in the future, it might be better to find a different expression like "Pro Seite nach oben scrollen" <-might become-> "Scroll up per page".

greets ~ Vera

_________________
Two growing code-collections: WinApi-Lib by RSBasic ~ LinuxAPI-Lib by Omi

Missing a download-file on the forums? ~ check out this backup page.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 36 posts ]  Go to page 1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye