In the CPrintingDialog class there is a variable _afxWinState.bUserAbort that notifies the underlying print loop that the user has clicked the 'cancel' button.

.

In the VC6 MFC Source code I can see how _afxWinState is defined and used but I cannot find where it is initialized.

.

How does one make _afxWinState... useable?

.

I have sucessfully replaced _afxWinState.bUserAbort with my own global variable bUserAbort that is defined : extern "C" BOOL bUserAbort. It seems to work fine. Why does one need to use the _afx.. stuff?