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. BrotherC

    Capture Button Down Event

    Hi, I would like to capture the event of a button being pressed down (CButton control class). Windows only sends a command message when the button is released if using OnClickButton(). If you could help out that would be great. Thanks !
  2. BrotherC

    MDI Child & controls

    Put CButton cButton; in the header file of the view you want the button in, not the MDI frame as you mentioned. Put the following code in the OnInitialUpdate()of the view you want the button in: CRect cRect(5, 5, 100, 50); cButton.Create("My Button", BS_DEFPUSHBUTTON,cRect,this...
  3. BrotherC

    Assertion failure CStringArray

    If you're in debug mode right click on the toolbars and bring up the call stack. This will help you find what line is causing the assertion.
  4. BrotherC

    Problem using CHeaderCtrl::GetItem( )

    Thanks, it worked. I don't need to set the cchTextMax to set an item in a list control but I need to set it to get an item. Doesn't make sense to me but ok. Thanks again.
  5. BrotherC

    Problem using CHeaderCtrl::GetItem( )

    I can't seem to get the text for a header in CListView. I can get the index of the item and I can set the text and center it but when I call GetItem( )with HeaderItem.mask = HDI_TEXT it fails. If someone can help me out that would be great because I'm going to go insane. Here's what I have...
  6. BrotherC

    converting text to string

    LPCSTR is 32 bit pointer to a constant character string. This should work: LPCSTR pText = textBox6->Text; WritePrivateProfileString("el33t", "textBox6", pText, "C:el33t.ini"); Or you can try typecasting: WritePrivateProfileString("el33t&quot...
  7. BrotherC

    microsoft ifstream

    Is this a file specific to your app that only your app can open? Or, are you talking about any file, excel, word, etc? A little tip, excel files fail if you try to open them in your app and they are already opened. If you used an extension .xls for your files you can eliminate flag setting...
  8. BrotherC

    Problems in reading a file

    Your root node should be initialized once. Why do you have this: //create and insert a new node with a user id and password root=inserthelp(root,i,p); Every time you add an new item you return it so root points to it. Here's some code that reads a file and adds to a tree that might help...
  9. BrotherC

    Add or Change Menu on MFC Dialog

    or, delete the old menu and change your menu ID to it's ID.
  10. BrotherC

    socket programming..

    Dal, you are listening on a UDP socket. UDP is connectionless. I'm a hardcore sockets programmer as I work for a VoIP company and create 700 virtual phones on one PC to exercise the system. I have developed an MFC dialog application that allows me to create UDP or TCP sockets, connect...
  11. BrotherC

    CRichEditView template creation error

    I'll answer my own question in case someone is intereseted. It's riched.dll
  12. BrotherC

    CRichEditView template creation error

    On some machines I have problems calling CDocTemplate::CreateNewFrame(NULL,NULL). It works fine on most machines but causes and exception two machines. Operating systems are the same. I've narrowed it down to CRichEditView being the problems because I use it in two templates that are causing...
  13. BrotherC

    How to Convert Static Text to Hyperlink

    Quick and easy way to open a link the users default browser: int pHinst = (int)ShellExecute(NULL, "open", "www.rjcsoftware.ca", // link NULL, NULL, SW_SHOWNORMAL); Cheers, Brother C
  14. BrotherC

    Beginner MFC...

    I recomment The Visual C++ 6.0 Bible. Takes you through everything from Dialog, SDI, and MDI applications. Covers menus, toolbars, status bars, etc, with examples to boot. You won't regret reading it. Brother C
  15. BrotherC

    Retrieving local IP?

    The code below will display all the ip addresses on one machine in a list box in a dgl box. If there is only one address the dlg box is not displayed (well is is but very quickly the user doesn't see it). If there is more then one ip address (more NICs) the user double clicks on the ip address...
  16. BrotherC

    Thread Programming

    Sorry about my previous reply. It was for another topic not this one. On this topic now, you should defenetly be using CWinThread and AfxBeginThread( ) to start your threads for many reasons if your using VC++. MSDN library explains these reasons and answers all the questions you've asked...
  17. BrotherC

    Thread Programming

    It sounds like this is what you're doing: Receiving data and updating the dialogs from your receive thread if any dlgs are open using a pointer to each dlg. Only problem is you terminate the app and the receive thread terminates last and still trys to update a dlg that has been destroyed but...
  18. BrotherC

    Terminating An Application - Modeless Dialogs

    It sounds like this is what you're doing: Receiving data and updating the dialogs from your receive thread if any dlgs are open using a pointer to each dlg. Only problem is you terminate the app and the receive thread terminates last and still trys to update a dlg that has been destroyed but...
  19. BrotherC

    Removing Close Icon From System Menu

    Hi, In my MDI app I would like to remove the close button from the system menu in all my view frames and just have the maximize and minimize button. Can't seem to do it. I can disable the close button using CMenu but I would like it removed. Is this possible? I noticed in the CDialog...
  20. BrotherC

    Custom Icons

    Hi, I would like to create a professional looking icon for my application. Any one know how to do this. I need a little more then the editor VC give you. Something that you could import a bmp or something into, shrink it, and create an icon. I'm sure something like this must exist. Cheers...

Part and Inventory Search

Back
Top