Hello! I want to ask a question about parameter.
Things start from IVF windows application, I want to define a Windows Message to communicate between process. So I use the function RegisterWindowMessage and add a piece of code to handle the message in the MainWndProc. However, according to MFC tradition, I add a case branch in the MainWndProc, but the case value must be a const. So I define the message to be global parameter in the ***global.f90, but i cannot do that. here is the statement in the ***global.f90
integer(UINT), parameter, public :: wm_Message = RegisterWindowMessage("083DDE42-5A00-4DAA-9C84-FAC23F8427D2")
obviously, it cannot be compiled. Because
1. fortran parameter cannot use the return value of a function as the value. But C++ could
2. module statement can not contain invoke function code.
How can i define a global parameter which value is defined by a function?