Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Captrick458

    GetSafeOwner

    If I run GetSafeOwner(NULL,NULL) in a dialog, it returns a value. If from that dialog, I call a DLL with someclass.myfunction(this,dialog), and in that DLL I call where pParent is the value of "this" pParent->GetSafeOwner(NULL,NULL); it returns a totally different value. I can fix it by...
  2. Captrick458

    Managing Z-Order with menu process

    I am designing a large application where I would like to have multiple processes called by the same menu program. For simplicity, I think I want to use a different executable for each program. My problem is that I want the windows of the called processes to always be on top of the menu, and...
  3. Captrick458

    KillFocus and ComboBox

    I created a combo box, and then modified the declaration to a class derived from ComboBox that I intend to use to get the State portion of an address. (The derived class has only two extra functions, OnGetFocus to populate the box, and OnKillFocus to do some post processing.) I then imported...
  4. Captrick458

    Telephone Number or Date In Edit Box

    Thanks stupidog. I found COXEdit from DUNDEE Software. It seems to work pretty well, are there any opinions out there of DUNDEE, or any other masked edit developer. Rick
  5. Captrick458

    Telephone Number or Date In Edit Box

    Is there an easy, built-in way to place separators in Edit Boxs for items such as dates and telephone numbers. In other words, I would like for the edit to open with something like " - - ", and when the person enters data, each "-" stays in place, and the data flow around it. Thanks in...
  6. Captrick458

    TabControl ENTER Key Makes Contents disappear

    I found a solution; however, I have no idea why it works. With the dialogs attached to the second and third tab, placing the following function in the Message Map works just fine. virtual void OnOK(){}; Put in the dialog attached to the first tab, I had to declare the function in the message...
  7. Captrick458

    TabControl ENTER Key Makes Contents disappear

    I have a TabControl that is working, for the most part, but whenever I press the ENTER key, the contents of the particular tab disappear. If I select another tab, then come back they re-appear. I have tried WantReturn, and have tried virtual void OnOK(){}; Neither seems to work...
  8. Captrick458

    How to run MFC Samples

    I have downloaded a sample from MS. The directions state: To build and run the CMNCTRL2 sample Open the solution cmnctrl2.sln. On the Build menu, click Build. On the Debug menu, click Start Without Debugging. If I open cmnctrl2.sln as a file, then Build is disabled, and it won't open as a...
  9. Captrick458

    Multiple Processes vs Multiple Dialogs

    We are in the process of building a large application where the user may have several dialogs, etc. open at one time. We don't want a modal dialog (ie. Yes, No, Cancel) to suspend operations on other dialogs, just the parent dialog. It seems that we can substitute a non-modal dialog, and test...
  10. Captrick458

    printf doesn't return the correct number of bytes ?

    I think that an appropriate thing to do here is simply change your fprintf(f,"%.2f",2000.0) function to sprintf(ss,"%.2f",2000.0), and then examine the contents of ss. Alternately, you could substitute a real file for NUL, and examine its contents. If you do, be sure to close the file, and...
  11. Captrick458

    Can't populate column 2 of list control

    You are absolutely correct. I can't explain starting at '1' other than a brain dump. I also can't believe that I looked at this code for hours and couldn't see the problem. Oh well, a second, or in this case, third set of eyes. Anyway, thanks a lot. Rick
  12. Captrick458

    Can't populate column 2 of list control

    This was part of a large class, and included some SQL queries, so, for testing purposes, I simply created a dialog app, and placed this code in the OnOK() function, and commented out the exit code. LVCOLUMN lvc; LVITEM lvi; int ii,blar; int count; char itembuff[51],itembuff1[51]...
  13. Captrick458

    Can't populate column 2 of list control

    /Per Thanks, worked like a charm. I am wondering why using the LVITEM structure wouldn't work. I had set mask to LVIF_TEXT and also ORed it with LVIF_IMAGE. Set the iItem to the line number, and iSubItem to 1. Also, pszText was set to an appropriate character array. I know that I have this...
  14. Captrick458

    Can't populate column 2 of list control

    I have a list control that I have set up a column 2 with a header. Everything works just fine except that the data for column 2 doesn't populate. No errors, just not there. Any Ideas???? iSubItem is set to 1. Thanks, Rick
  15. Captrick458

    DLLs and Static Variables

    I am from the Unix Environment so have absolutely no experience with Windows and DLLs. I read somewhere that static variable behave improperly in DLLs because of the shared nature of the DLL. Yet, accroding to Microsoft, each time a process attaches to a DLL, the DLL creates a separate data...
  16. Captrick458

    printf doesn't return the correct number of bytes ?

    The following code works appropriately. I am not certain what is happening with you. #include "stdafx.h" int main(int argc, char* argv[]) { FILE *inf; int ii; inf=fopen("NUL","wt"); if(inf){ ii=fprintf(inf,"%d",4); fclose(inf); }else ii=999; printf("%d\n",ii); return 0; } Rick
  17. Captrick458

    printf doesn't return the correct number of bytes ?

    ionutdinulescu What return are you getting? When I execute that code, 1 is returned, as expected. If you are getting a (-1), then perhaps f has not been opened in a correct mode. Rick
  18. Captrick458

    DLL vs Static Library

    xwb: Thanks for your reply. I am constrained by the fact that we have well over a million lines of 'C' code that is all contained in static libraries on the SCO Unix OS. I have no problem with the idea of using DLLs, but, as yet, I have only figured out how to do this by creating classes...
  19. Captrick458

    Pointer arithmetic and scope

    mbozza: I can't find anything wrong with // variable with file scope DWORD* somePtr = (DWORD*) 0x00123ABC; void someFunction(void) { somePtr++; //crashes program } as a matter of fact it compiles and works just fine on my system. On the other hand: DWORD* temp = (DWORD*)0x00123ABC...
  20. Captrick458

    DLL vs Static Library

    Perfnurt: Thanks for taking the time to answer. There seem to be two considerations driving this train: 1. It seems to be the "Windows" thing to do, and 2. It should ultimately save some space. The folks who use our application are heavily regulated by the US Govt, and depending on what types...

Part and Inventory Search

Back
Top