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 SkipVought 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: *

  • Users: TGM
  • Order by date
  1. TGM

    Foreign Key to External Database

    Thanks, Angel ... I'll keep the code and try it. Thierry
  2. TGM

    Foreign Key to External Database

    Hello Angel Yes, please ... Well, I don't know if I will be able to implement this kind of solution since I need to 'share' several tables... So another solution is to simply put everything in the same database. Thanks in advance for your code Thierry
  3. TGM

    Foreign Key to External Database

    Hi I use one SQL database (caleed Db1) with a table called 'UnitData'.This table have a field called 'UnitId' I would like to use the table 'UnitData' in a second database (called Db2) to enforce relationship inside this second db. I create the following script to build a table that would use...
  4. TGM

    Constraint on Column

    Hello Thanks for your reply. In fact, I use the import feature of the database (right-click on the db name to get it) because I'm also interested of getting the data (all those tables are heavily populated ..) Thierry
  5. TGM

    Constraint on Column

    Hi I import sevral tables from a SQL Db to another SQL DB. During this immport, I loose all the constraints !!!! Two questions: - Is it possible to import tables with the CONSTRAINT ? - If not, how could I use ALTER Table to Add COnstraint to the required column. I looked at the doc but I...
  6. TGM

    Colour push buttons ?

    HI Afaik, if a CButton is declared OwnderDrawn, you have to redrawn it entirely yourself: the background, the border, the text, ... Thierry
  7. TGM

    Access Violation error??

    Hi Suppose a int variable and a pointer to it: int nData = 2; int* pnData = &nData; Change the value as: *pnData = 10; Suppose you pass a pointer to a int in a function as: void TestFunction( int* pnData) To set up a variable in this function, use *pnData = 5; HTH Thierry
  8. TGM

    Changing appearance of DIalog BOx

    Hi Suppose you add a small bitmap to your app resources You need to override OnEraseBkgnd Here is the code to tile a bmp in a dialog box: BOOL CAboutDlg::OnEraseBkgnd(CDC* pDC) { CDC dc; CBitmap bmbkg; // Get Client Size CRect rc; GetClientRect( &rc)...
  9. TGM

    Retrieve integer value from an edit box

    Hi Use GetDlgItemInt() function Thierry
  10. TGM

    Add/Remove components of VC6++

    Hi I guess you need to update the directories for the executables in the menu 'Tools | Options' and then the tab 'Directories' and the Combo 'Executable ..." HTH Thierry
  11. TGM

    Insert data into CListCtrl columns

    Hi Well, it drives me mad, as it looks like the code I used hundred of times but I finally found a way to do it ... while not really understanding and now it's working and wky it was not working Simply redefined your mask for the subitem as item.mask = LVIF_TEXT | LVIF_IMAGE; and do not...
  12. TGM

    List box single and multiple selection

    Hi Look at the following link. It is showed one way to do what you want to do http://www.codeproject.com/combobox/RecreateListBox.asp HTH Thierry
  13. TGM

    is there argv, argc in Visual C++?

    Hi I suppose you are using MFC ... First, derive a class from CCommandLineInfo Then override the function ParseParam. Here is an example thazt check for DEBUG parameter and also store the last command line parameter in the variable m_strFile void CFooCommandLineInfo::ParseParam( const char*...
  14. TGM

    What database should I use

    Hi If cost is not a problem, I would suggest you to use Microsoft SQL and ADO. It's fast, stable and quite easy to program with. Furthermore, it's THE database standard for industrial and professonal use. Ok, there are some others at least as good, but, AFAIK, more expensive. I'm using a SQL...
  15. TGM

    Enable CheckBoxes when CListBox is iniated

    Hi I guess you are using CCheckListBox... So, what about using the function SetCheck in OnInitDialog ? MTC Thierry
  16. TGM

    Pass information from a dialog box to CDocument

    Hi There are several ways to do this... Perhaps the easier is to put an other button 'Import'. Clicking on this button would start the Db import. Then the 'Ok' button would be used to close the dialog box ... An other possiblity is to put the import code into the handler of the Ok button. A...
  17. TGM

    Insert CheckBoxes into CListBox

    Hi - Add a ListBox to your dialog box - Modify its properties: in the 'Style' tab, select 'Owner Draw' as fixed and check 'Has Strings' - Use class wizard to build a variable for the Listbox. Say you call it m_List - Modify the m_List declaration like this: CCheckListBox m_List; - Add some...
  18. TGM

    Need Help

    Hi In the override of OnDraw, add this code: void CFooView::OnDraw(CDC* pDC) { CTestcolorDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); CRect rcInvalid; // Redraw Only Invalidated Area pDC->GetClipBox( rcInvalid); // Paint Background CBrush brush...
  19. TGM

    Combo box & list box

    Hi I guess you don't want user to edit text in the combobox. To get this, right-click on combobox, select 'Properties', select the tab 'Style' and the Combo (-:)) 'Type' and select 'Drop List' HTH Thierry
  20. TGM

    Public Variables

    Hi declare in your application implementation file (FooApp.cpp) the global variable as this (as an example): int m_nGlobalVar; In the interface files that needs to reach the variable, add the following line, outise any class definition: extern int m_globalVar; BTW, avoid as much as you can...

Part and Inventory Search

Back
Top