Requested API Structure and constants

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
jacdelad
Addict
Addict
Posts: 1992
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: Requested API Structure and constants

Post by jacdelad »

Mentioned from spikey in this thread: viewtopic.php?p=600709#p600709

Code: Select all

Enumeration 0
  #NOTIFY_FOR_THIS_SESSION
  #NOTIFY_FOR_ALL_SESSIONS
EndEnumeration

Enumeration 1
  #WTS_CONSOLE_CONNECT
  #WTS_CONSOLE_DISCONNECT
  #WTS_REMOTE_CONNECT
  #WTS_REMOTE_DISCONNECT
  #WTS_SESSION_LOGON
  #WTS_SESSION_LOGOFF
  #WTS_SESSION_LOCK
  #WTS_SESSION_UNLOCK
  #WTS_SESSION_REMOTE_CONTROL
  #WTS_SESSION_CREATE
  #WTS_SESSION_TERMINATE
EndEnumeration
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Denis
Enthusiast
Enthusiast
Posts: 778
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Re: Requested API Structure and constants

Post by Denis »

Fred, could you please update these Structures (see the code i've posted about 2,5 years ago).
Thanks.

Structure HDITEM
viewtopic.php?p=560929&hilit=HDITEM#p560929

Structure LVGROUP
viewtopic.php?p=560929&hilit=HDITEM#p560929
A+
Denis
Rinzwind
Enthusiast
Enthusiast
Posts: 679
Joined: Wed Mar 11, 2009 4:06 pm
Location: NL

Re: Requested API Structure and constants

Post by Rinzwind »

Guess it is about time for a big structured overhaul? Almost everything everything introduced in the win32 lib since era Windows 7+ is missing?

Is there a way/place where I can see the existing API structures/constants and function import declarations as point of reference for additions? Ie declaration of function FindWindow_, structure PROCESS_INFORMATION, constant #HWND_DESKTOP . If not... about time to add part the to github?
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Requested API Structure and constants

Post by Fred »

All is already in GitHub, under Documentation/Import/ and Residents/ . Feel free to contribute by creating Pull Request if you need it.
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Requested API Structure and constants

Post by Little John »

[Windows] Please update the NOTIFYICONDATA structure to its current version.
User avatar
jacdelad
Addict
Addict
Posts: 1992
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: Requested API Structure and constants

Post by jacdelad »

COMBOBOXINFO

Code: Select all

Structure COMBOBOXINFO
  cbSize.l
  rcItem.RECT
  rcButton.RECT
  stateButton.l
  hwndCombo.i
  hwndItem.i
  hwndList.i
EndStructure
and
#CB_GETCOMBOBOXVALUE = $164
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
Caronte3D
Addict
Addict
Posts: 1355
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: Requested API Structure and constants

Post by Caronte3D »

#PW_RENDERFULLCONTENT = $00000002
User avatar
Caronte3D
Addict
Addict
Posts: 1355
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: Requested API Structure and constants

Post by Caronte3D »

#PB_MessageRequester_Question = 32
User avatar
jacdelad
Addict
Addict
Posts: 1992
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: Requested API Structure and constants

Post by jacdelad »

Caronte3D wrote: Tue Mar 19, 2024 2:18 pm #PB_MessageRequester_Question = 32
Just a sidenote: Microsoft itself writes we shouldn't use this one, as the purpose isn't always clear (whatever...) and it may be unsupported in the future.
https://learn.microsoft.com/en-us/windo ... messagebox at "MB_ICONQUESTION".

Also, I don't know whether this is supported on other OSes ot the value for them may differ. So, including "MB_ICONQUESTION=$20" would maybe be a safer option.
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
Caronte3D
Addict
Addict
Posts: 1355
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: Requested API Structure and constants

Post by Caronte3D »

Thanks, jacdelad for the explanation :wink:
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Re: Requested API Structure and constants

Post by Psychophanta »

I have detected
#PB_Event_MiddleClick_WentDown=519
#PB_Event_MiddleClick_WentUp=520
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
mk-soft
Always Here
Always Here
Posts: 6204
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Requested API Structure and constants

Post by mk-soft »

Psychophanta wrote: Thu May 16, 2024 7:15 pm I have detected
#PB_Event_MiddleClick_WentDown=519
#PB_Event_MiddleClick_WentUp=520
Allready exists ...
See Tool Structure Viewer

Code: Select all

Debug #WM_MBUTTONDOWN
Debug #WM_MBUTTONUP
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
skywalk
Addict
Addict
Posts: 4211
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Requested API Structure and constants

Post by skywalk »

#CFM_BACKCOLOR = $4000000 ; 67,108,864

Code: Select all

Procedure Editor_BackColor(Gadget, Color.l)
  format.CHARFORMAT2
  format\cbSize = SizeOf(CHARFORMAT2)
  format\dwMask = $4000000  ; = #CFM_BACKCOLOR
  format\crBackColor = Color
  SendMessage_(GadgetID(Gadget), #EM_SETCHARFORMAT, #SCF_SELECTION, @format)
EndProcedure
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
Zapman
Enthusiast
Enthusiast
Posts: 205
Joined: Tue Jan 07, 2020 7:27 pm

Re: Requested API Structure and constants

Post by Zapman »

MENUITEMINFO --> The existing structure is uncomplete.
Here is the right one:

Code: Select all

Structure MENUITEMINFO Align #PB_Structure_AlignC
  ; Great thanks to idle from english PureBasic forum,
  ; for the right form of this structure.
  cbSize.l
  fMask.l
  fType.l
  fState.l
  wID.l
  hSubMenu.i
  hbmpChecked.i
  hbmpUnchecked.i
  dwItemData.i
  *dwTypeData
  cch.l
  hbmpItem.i ; This field is missing in the PureBasic actual (6.20) description of MENUITEMINFO.
EndStructure
And also:

Code: Select all

Structure MENUINFO Align #PB_Structure_AlignC
  cbSize.l           ; Size of the structure (in bytes).
  fMask.l            ; Mask specifying which members are being set or retrieved.
  dwStyle.l          ; Style of the menu.
  cyMax.l            ; Maximum height of the menu, in pixels.
  hbrBack.i          ; Handle to the brush used to paint the menu background.
  dwContextHelpID.l  ; Context help ID for the menu.
  dwMenuData.i       ; Custom data associated with the menu.
EndStructure
;
Structure MENUBARINFO Align #PB_Structure_AlignC
  cbSize.l
  rcBar.RECT
  hMenu.i
  hwndMenu.i
  fBarFocused.b
  fFocused.b
  fUnused.b
  Padding_1.b
EndStructure
Last edited by Zapman on Wed Feb 19, 2025 5:51 pm, edited 2 times in total.
Denis
Enthusiast
Enthusiast
Posts: 778
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Re: Requested API Structure and constants

Post by Denis »

St Zapman,

already asked here to Fred in 30 april 2023 but nothing change

MENUITEMINFO
A+
Denis
Post Reply