Here is my First PureBasic Program - Window, Menu and Gadget

Everything else that doesn't fall into one of the other PB categories.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6175
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: Here is my First PureBasic Program - Window, Menu and Gadget

Post by blueznl »

Dunno, Fred, but I see nothing wrong with using the same enumeration set for different items, as long as you mark them clearly.

I typically do things like this:

Code: Select all

Enumeration
  ;
  ; windows
  ;
  #w_main_nr
  ;
  ; toolbars
  ;
  #tb_main_nr
  ;
  ; gadgets
  ;
  #g_ok
  ;
EndEnumeration
In fact, I *like* it if windows and gadgets have DIFFERENT numbers...

Then again, I'm not the worlds best programmer (but at least I document my stuff :-))
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Here is my First PureBasic Program - Window, Menu and Gadget

Post by ts-soft »

blueznl wrote:Dunno, Fred, but I see nothing wrong with using the same enumeration set for different items, as long as you mark them clearly.
The intern Objectlist for Gadget for example, reserves memory of 32 Byte (in 32-Bit) for any used or noneused
ID from 0 to ...

Code: Select all

Structure PB_GadgetStructure
  Gadget.i
  *VT.PB_GadgetVT
  UserData.i
  OldCallback.i
  Data.i[4]
EndStructure

Debug SizeOf(PB_GadgetStructure)
Separate Numbering is better in this case.
User avatar
Blue Steel
Enthusiast
Enthusiast
Posts: 132
Joined: Wed Aug 31, 2005 4:49 pm
Contact:

Re: Here is my First PureBasic Program - Window, Menu and Gadget

Post by Blue Steel »

while i was editing the code I even tried using the tool type window .. yeah yeah.. i know its not the same size..

however I thought because the measurements of a propper window were on the working area inside noe the external that the Tool type of window would be the same.. but i found that it was shorter (internaly) in both length and height .. is the tool window using external as opposed to internal sizing ???
Currently using PureBasic 4.51(x86)

Image http://www.codingmonkeys.com
Covers many languages including PureBasic
Mohawk70
Enthusiast
Enthusiast
Posts: 404
Joined: Thu May 11, 2006 1:04 am
Location: Florida, USA

Re: Here is my First PureBasic Program - Window, Menu and Gadget

Post by Mohawk70 »

@BlueSteel
I remember you from the forums of a few of those OTHER languages. Welcome - good to see you active here !
HP Z800 Workstation
CPU : Dual Xeon 5690 3.46GHz
RAM : 192GB RAM
GPU : NVIDIA QUADRO P5000 16GB
Post Reply