Prakash, Thank you very much for your suggestions. Sorry it took so long to get back to you but I had to do some quick reading of timers and the OnIdle event. I think one of these will work for me and I appreciate your help. I'm willing to change the design of my application, I just didn't understand the need to until your reply. Thanks again! Dave
Dave Sweetser
Posts
-
Dialog windows -- where does the application code go -
Dialog windows -- where does the application code goI'm the person who started the string below called "where's main() ???". Ravi was helping me but either has given up on me or gone to bed ;-) So, here's my question: If I create a dialog window and want to run graphics in it continuously, where do I put my code that does the graphics? I'm not using messages, the application is free-running. I would guess I'm not the first person to ever wonder "Gee, I wonder where my application goes?" but none of my 4 books tell me and no one else has been able to tell me. Having just finished my C++ class, this is my first and foremost question -- where does the code go now that I'm no longer running console-only apps? I've spent all day trying to figure this out, including numerous and fruitless web searches. I presume the place where the application code goes is well-defined and well-known, can someone tell me? Thanks. Dave
-
where's main() ???Ravi, Thanks for the further tip. I used AppWizard to create a dialog application. So, now, I have the same question: Where does my application code go? You mention that the displaying of graphics will occur within a "custom control". I don't know that this is -- I think what I'm looking for is a function (method) that gets called to run my code. My goal (for now) is to draw a circle in the dialog window. I want to do this is my main code section, *not* in the initialization InitInstance() method. Can you let me know where I would put this circle code? I presume that my application code goes in a well-defined and well-known location in the dialog window code, I'm just trying to find out what this location is. Can you let me know? Thanks again, sorry for not "getting it" quicker.
-
where's main() ???Ravi, I have 4 books on Visual C++ 6.0 and/or MFC programming but not the ones you mention, which I'll pursue getting. I used AppWizard to create my program and looked at InitInstance() and it seems to be only for initialization. The comment in the code says "Standard initialization". So, I still don't know where my application code goes. As noted above, I'll pursue getting the books but is it possible, in the meantime, to let me know where my "regular application code" goes -- not the initialization code but the code that will run after initialization? My "regular application code" will display graphics on an ongoing and continuous basis, I just don't know where to put it. Can you let me know? Thanks.
-
where's main() ???Ravi, Thanks for your input. Sounds like I should use AppWizard. So I will. But I still don't know where my application code goes. What are the "application instances"? What is the Windows startup stub? Can you help me with the names of the classes that I should be looking at? Are there some methods where I would insert my application code? Thanks again. Dave Dave
-
where's main() ???Having just finished up a C++ programming class, I'm making the move to MFC and Windows programming. I expected to find something (at least roughly) equivalent to the main() routine found in console apps. After looking through numerous books, I still don't know where my application code goes. I know how to do initialization (e.g. the OnDraw function) but I don't know where I would put some code to make GDI calls. I don't want to respond to messages (at least yet), I just want to make some GDI calls in my main program. Does someone know where the equivalent of main() is for MFC programs? Thanks. BTW, I'm not using AppWizard. Dave