I'm posting this here assuming that macro expansion is common to PBWin & PBCC. Any problems - sue me.
Just out of curiosity I tried this macro which fails because parameter substitution does not occur:
I'm expecting it to expand mjump(IDC_BN1,WM_COMMAND) to:
instead this happens:
Clearly I'm missing something!
Just out of curiosity I tried this macro which fails because parameter substitution does not occur:
Code:
'------------------------------------------------------------------ ' Are macros expanded before or after .inc files are included? #IF NOT %DEF(%WM_COMMAND) %WM_COMMAND=&H111 #ENDIF MACRO mjump(a,b)=IF (lControlId=%a) AND (lmsg=%b) THEN GOSUB a_b '------------------------------------------------------------------
Code:
IF (lControlId=%IDC_BN1) AND (lmsg=%WM_COMMAND) THEN GOSUB IDC_BN1_WM_COMMAND
Code:
Error 460 in C:\chris\mcodegen\event_code_dispatcher.bas(92:009): Undefined equate Line 92: mjump(IDOK,WMCOMMAND) Macro Expansion(16): IF (LCONTROLID=%A) AND (LMSG=%B) THEN GOSUB A_B ============================== Compile failed at 23:37:22 on 15/01/2008
Comment