• Content count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About bschwagg

  • Rank
  1. Hi all- I'm in need of some advice. I have this project (sloppily) written in C code. I've found there are variables #define'ed in headers that have the same name as other global variables in other files. It's really a global variable mess... The compiler seems to compile away without giving any hint of something being wrong. As I clean the code up I keep running into this problem. (Or I could be wrong about the compiler giving any indication, but the code is so big it's tough to tell) I'm sure this could be dangerous at some point because the code is so long the problem might hide out for a while, then crash unexpectedly. Is there a tool in unix/irix that will find multiply defined variables? Is there a tool that would help analyze or clean up some of my mess? I'm using the 'cc' compiler in Irix 5.3 Thanks -Brad
  2. DLL Calling An App

    From what I know, you would write code or script in the app that calls on the DLL. I've never written a max plug-in, but I remember seeing scripts you could write. In MS Office, for instance, you would write visual basic macros which call on your DLL. The visual basic would create the menus and interactions, while the DLL does the real dirty work (in C/C++ or whatever language).
  3. CDialog & DLL

    I found a solution! "If you have two or more MFC modal dialogs which have the same parent window, then the moment you dismiss any one of those modal dialogs, all the other modal dialogs will lose their modality because now the parent window has been re-enabled." The workaround is overrideing the ON_OK and OK_CANCEL messages, now I just have to figure out how to do this.
  4. Here's a question that's been absolutely haunting me for a week now, which I'm sure a bunch of guru people have already solved somewhere... I have an Excel Add-In (it's a DLL) that pops up modal CDialog boxes. When I ShowWindow(WS_HIDE) one dialog box and open another, excel gets minimized. I want excel to always be the top window with the dialogs on top of it. How could I set up the CDialog's so they're created under the same window/frame as excel? Right now the styles are set to "pop-up" and I've created the parent CWnd as NULL. I've tried using a overlapped, invisible frame with the dialogs as parents. I've tried using AfxGetMainFrame(). I've tried to set WS_VISIBLE and repaint the window, but it leaves portions of the old dialog as artifacts. Nothing works. Anyone have other ideas?
  5. I've also tried to modify the WS_VISIBLE property in the window but this just messes up all the window behavior. Any ideas?
  6. Hi- I'm trying to use CDialog's to have users register when they use my company's software. The program is an excel add-in, inside a DLL. When the software first tries to access the DLL, the dialogboxes are displayed. However, there is a problem; when one dialogbox gets closed and another is opened, the focus jumps to the next active window then comes back. It produces a nasty flashing effect or sometimes puts the program in the background. I've been working on this two days straight with no luck! Example Let's say I was going to ask for the license key.. void RegDialog::OnEnterkey() { this->ShowWindow(SW_HIDE); AFX_MANAGE_STATE(AfxGetStaticModuleState()); KeyDialog keyDialog(GetParent(), ptr_User); keyDialog.DoModal(); if(VerifyKey()){ EndDialog(1); return; } this->ShowWindow(SW_SHOW); } //------------------------------------------- This code would flash on ShowWindow(SW_HIDE) I've tried using GotoDlgCtrl(...) to change where which window is active, but it didn't work. I've tried making an invisible main CDialog and creating all the others off of that, no luck there either. For now I'm making all my dialogs using the handle, AfxGetMainWnd() so that hopefully it would put control back to the main window. nothing works : ( Has anyone seen anything similar to this or have any ideas?? Anything would be appreciated! Brad