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 Wanet Telecoms Ltd 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( )

    ...Here's what I have to first set the header then try and read the header: HDITEM HeaderItem; CListCtrl& ListCtrl = GetListCtrl(); CHeaderCtrl* pHdrCtrl = ListCtrl.GetHeaderCtrl(); // get header strings HeaderItem.mask = HDI_TEXT | HDI_FORMAT ; HeaderItem.fmt = HDF_CENTER | HDF_STRING...
  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

    ...output only using ios::out and deletes it's contents when opened. If I wanted to append I would use ios::app. ofstream TextFile; char *cSaveFilePath = "Debug.xls"; TextFile.open(cSaveFilePath, ios::out); if(TextFile.fail()){ // check for file open errors CString...
  8. BrotherC

    Problems in reading a file

    ...CRicksTreeCtrl::CRicksTreeCtrl(): pRootNode(NULL), iDisplayIndex(0) { } CRicksTreeCtrl::~CRicksTreeCtrl() { } /***************************************************************************** GetFileData() *****************************************************************************/...
  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?

    ...to. This address can be retrieve by calling GetAddress() as show below. ///////////////////////////// // // Using CBindAddress // CBindAddress* pBindAddress = new CBindAddress; pBindAddress->DoModal(); CString local = pBindAddress->GetAddress(); delete pBindAddress...
  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