Passing Parameters in Win32 with C?
I am trying to convert a C89 console program I wrote into a Win32 app. I'm new to Win32 and still learing the basics. Here's where I'm stuck, conceptually:
My console program manages my data structures locally in main(). It passes structure pointers (and other relevant local variables) to various functions as it goes through its calculation algorithm. My program makes no use of global variables.
Win32 operates through WinMain(), using the "message loop," which interacts with a WinProc(). If I were to maintain the same structures locally in WinMain(), I don't see how I could provide the underlying GUI functions access to my program data, save declaring them global.
I'm guessing that simply declaring everything global isn't good programming practice in Win32 any more than it would be in console programming. This makes me think I'm missing something big.
Note: I have a Petzold book on order, and I'm absolutely a WinAPI newbie. Any direction would be appreciated!