Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2005-07

MSG variable type, Windows GUI

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Urbansound

Hi,

I encountered an FPC Win32, tutorial that uses the a declaration of variable "msg", declared as a MSG type, shown below.

Dev-Pas IDE, FPC 2.00 gives an "error in type definition" and I find no doc references to MSG, variable type. Was this an earlier convention in FPC and if so, how was it replaced?

Thanks,

Mike

[clip]
program Win32_Source03;
uses  windows;
const
  AppName = 'Win32/ FPC - Source 03';
VAR
  active : BOOLEAN;
  msg : MSG;
  hWindow,msg : hwnd;
[end clip]
Luiz Américo
to Urbansound
Urbansound wrote 9 lines
Hi, I encountered an FPC Win32, tutorial that uses the a declaration of variable "msg", declared as a MSG type, shown below. Dev-Pas IDE, FPC 2.00 gives an "error in type definition" and I find no doc references to MSG, variable type. Was this an earlier convention in FPC and if so, how was it replaced?

Previous version of fpc allowed this construct while newer not use Message:msg instead of msg:msg and rename msg in the line below of that.

Show quoted text 14 lines
[clip] program Win32_Source03; uses windows; const AppName = 'Win32/ FPC - Source 03'; VAR active : BOOLEAN; msg : MSG; hWindow,msg : hwnd; [end clip]
  active : BOOLEAN;
  message : MSG;
  hWindow,msg1 : hwnd;

this should work

Luiz

Urbansound
Luiz wrote 7 lines
active : BOOLEAN; message : MSG; hWindow,msg1 : hwnd; this should work Luiz

Thumbs up Luiz, thank you.
The second usage with msg1 was a typo on my part.
Understandable that this was changed in the compiler. ;)

  active : BOOLEAN;
  mssg : MSG;
  hWindow : hwnd;

Mike