-
April 14th, 2013, 05:37 PM
#16
Re: Odd Dialog creation... when deleting unused line of code
You've stepped through all the dialog creation code, constructors, Create call, OnInitDialog, etc. to see why it's getting placed where it's getting placed I assume?
-
April 14th, 2013, 05:52 PM
#17
Re: Odd Dialog creation... when deleting unused line of code
Thanks for getting back to me so fast...
Yes, we can step through all the code without a problem. When we run it in the IDE, it works fine. When we compile it and run the EXE, it moves the dialog to the corner.
What I think I need to do.... I need to create a log file that will run in the EXE and "write" out at certain places the value of ???? to watch for when it changes. I am thinking with that, I can narrow down the section of code that may have the issue(s) for now. Problem is, because we don't specifically address the dialogs creation location... I am not 100% sure where it gets the default positioning info from that it uses.
Right track, wrong track????? At this point and way too much time going after this problem... I am at a loss. I need to make some other fixes to the program but don't want to lose my "repeatable" error.
Thanks again...
-
April 14th, 2013, 06:03 PM
#18
Re: Odd Dialog creation... when deleting unused line of code
So, I have to ask again, any more suggestions/recommendations?
Unless you give us the code to debug, everything that has been stated to you is what anyone here would have done already.
It's simple -- a dialog is placed at an X,Y position on the screen. There is only one way to do that, regardless of the layers of MFC or code. The dialog template that is being read by the Windows OS to position the dialog is either incorrect or corrupted. There is no other way for a dialog to show up on the screen in a certain position (if you claim you had no control over the dialog).
Even had another experienced C++ programmer look at the code
And these experienced C++ programmers cannot solve a problem that is easily duplicated at startup?
Regards,
Paul McKenzie
-
April 14th, 2013, 06:06 PM
#19
Re: Odd Dialog creation... when deleting unused line of code
Originally Posted by pbrama
Problem is, because we don't specifically address the dialogs creation location... I am not 100% sure where it gets the default positioning info from that it uses.
How is this dialog created? If it is created via resource ID, then look at the .rc file. That is where the position of the dialog is established.
Regards,
Paul McKenzie
-
April 14th, 2013, 07:42 PM
#20
Re: Odd Dialog creation... when deleting unused line of code
Originally Posted by pbrama
Thanks for getting back to me so fast...
Yes, we can step through all the code without a problem. When we run it in the IDE, it works fine. When we compile it and run the EXE, it moves the dialog to the corner.
What I think I need to do.... I need to create a log file that will run in the EXE and "write" out at certain places the value of ???? to watch for when it changes. I am thinking with that, I can narrow down the section of code that may have the issue(s) for now. Problem is, because we don't specifically address the dialogs creation location... I am not 100% sure where it gets the default positioning info from that it uses.
Right track, wrong track????? At this point and way too much time going after this problem... I am at a loss. I need to make some other fixes to the program but don't want to lose my "repeatable" error.
Thanks again...
You could try building a release version with debug info in it and debugging and see if you can reproduce the problem. You could always add CenterWindow in OnInitDialog, but you could potentially hide another problem by doing that.
-
April 15th, 2013, 04:21 PM
#21
Re: Odd Dialog creation... when deleting unused line of code
Have you tried rearranging the variables (shuffle the variables around m_bFlag)? With a bit of luck it might produce something that's easier to detect like a access violation. It's been a long time since I used VC6 but I guess that it's capable to attach to the exe when (if) it has crashed?
If your budget doesn't allow for Boundschecker or somthing similar it might allow for pc-lint (http://www.gimpel.com/html/index.htm). I've used it in many projects and it's quite good in finding suspicious areas of the code.
-
April 15th, 2013, 04:51 PM
#22
Re: Odd Dialog creation... when deleting unused line of code
Originally Posted by pbrama
...When we run it in the IDE, it works fine. When we compile it and run the EXE, it moves the dialog to the corner.
When you run it "in the IDE", you are still running the compiled and linked executable.
Are you saying that the same exe file that runs OK from IDE behaves differently when simply double-clicked from Explorer?
Or are you talking about the differences between Debug and Release configurations?
Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
Convenience and productivity tools for Microsoft Visual Studio:
FeinWindows - replacement windows manager for Visual Studio, and more...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|