Type: Posts; User: amarcode
Search took 0.01 seconds.
January 5th, 2005, 10:11 AM
You can pass NULL parameter to the CRecordset Open function. In this case the default SQL statement is used, but you have to specify this statement in derived from CRecordset class function...
January 4th, 2005, 09:47 PM
It's not true. The CRecordset class doesn't do it for you. You have to specify the select statement in the recordset open function.
January 4th, 2005, 09:41 PM
Use the Class Wizard to generate your recordset files. In your files the macros in *.cpp (AFX_FIELD_INIT, AFX_FIELD_MAP AFX_FIELD) and *.h (AFX_FIELD, AFX_VIRTUAL) are missed. I have attached sample...
January 4th, 2005, 09:13 PM
Also specify the lpszSockAddress (third parameter in Create function) as a pointer to a string containing the network address of the connected socket.
January 4th, 2005, 09:05 PM
Call the AfxInitSocket() function only once in your CWinApp::InitInstance.
January 4th, 2005, 09:01 PM
Your recordset files are not complete. Use Class Wizard to generate these files (View->ClassWizard->Add Class->New).
January 4th, 2005, 08:35 PM
Could you post the CMyProjectClass files?
January 4th, 2005, 08:27 PM
This code should help you to find the problem with the exception.
rs.Open(CRecordset::snapshot,_T("Select proj_num, contact_name from...
January 4th, 2005, 06:51 PM
You have to derive your recordset from the CRecordset class and bind all columns you need to the variables prior to call the recordsetís Open member function. Use the ClassWizard to create a...
December 31st, 2004, 03:59 PM
I forgot to say that SetOrientation() function should be declared in your application class derrived from CWinApp. HGLOBAL m_hDevMode is protected member of the CWinApp class.
December 31st, 2004, 12:51 PM
The function shown below sets the orientation of the paper for a printer. Call this function before CView::OnFilePrint() and CView::OnFilePrintPreview() calls.
BOOL SetOrientation(BOOL bLandFl)...
November 11th, 2004, 10:34 AM
The PeekMessage, DispatchMessage and TranslateMessage functions use MSG type not UINT as parameters. Try this :
while ( PeekMessage (&msg, NULL, 0, 0, PM_REMOVE) )
November 10th, 2004, 09:27 PM
FILETIME ft1, ft2;
COleDateTimeSpan otspan = ot2-ot1;
November 10th, 2004, 09:02 PM
"The WM_INITDIALOG message is the first message the dialog box procedure receives. If the dialog box procedure returns TRUE, the Windows sets the input focus to the first child window control in the...
November 10th, 2004, 12:30 PM
The attached is a working example. Try to set the editbox as a first control on the dialog (Layout->Tab Order).
November 10th, 2004, 12:16 PM
Is this code working well now?
November 10th, 2004, 11:59 AM
It works well for me.
You don't need to pass the ID of editbox as a parameter. You know the value, so you can set the second parameter to this value in GetDlgItem instead of using lParam.
November 10th, 2004, 11:32 AM
The WS_TABSTOP has nothing to do with your problem. Sorry for my previous message.
You can call the DialogBoxParam with dwInitParam parameter set to the ID of your editbox and call SetFocus on init...
November 10th, 2004, 10:23 AM
Use WS_TABSTOP flag with your editbox control.
November 9th, 2004, 10:20 AM
I usually use ATL COM AppWizard to create a service application and call PostThreadMessge(dwThreadID,WM_QUIT,0,0) to stop the service from inside the service program.
The dwThreadID parameter is a...
November 9th, 2004, 07:25 AM
If you want to display the main menu as a popup menu follow these steps:
1. Create a temporary popup menu (menuPopup)
2. Append all popup submenus from the main menu to this menu
November 9th, 2004, 04:55 AM
Q: How to know when text is pasted from clipboard to 'CEdit' control?
A: In the destination application derive all edit controls from 'CEdit' and override 'OnChar()' and 'OnContextMenu()':
November 6th, 2004, 12:30 PM
You call WaitCommEvent with lpOverlapped = NULL. It is a blocking call and it means the thread function waits for an event to occur (EV_RXCHAR in your example). If there are no input bytes the...
November 6th, 2004, 11:25 AM
I know it. I only wanted to point that the code shuld be placed in the dialog box class.
November 6th, 2004, 11:02 AM
If you use the MS Access database (MDB) you can parse the ODBC connect string for "...;DBQ=\YourDatabasePath\YourDatabaseFile.mdb;..." substring.
CString s =...
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.