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...
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...
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...
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.
The function shown below sets the orientation of the paper for a printer. Call this function before CView::OnFilePrint() and CView::OnFilePrintPreview() calls.
"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...
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.
Could...
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...
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...
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
3. Call...
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...