I would advise you to use OCX control readily available for Graphs it pretty simple to use one can draw graphs of various types with less trouble I had used Pinnacle Graph control which had come with VB6.0 package
I would advise use to use MSComm Control I have used it for to interface Energy meter with PC. It is pretty simple will save lot of your efforts. Plenty of material is available on MSComm Control
You can handle messages in PreTranslateMessage
BOOL CXXXX::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
switch (pMsg->message)
{
case WM_RBUTTONDOWN:
m_XXX.OnRClick();
return TRUE;
case WM_KEYDOWN:
do something...
The third parameter in SetTimer specifies the address of the application-supplied TimerProc callback function that processes the WM_TIMER messages. If this parameter is NULL, the WM_TIMER messages are placed in the application's message queue and handled by the CWnd object.
viz you can call...
I had earlier faced similar problems here is the way by which I resolved it.
Depending on Value of m_nErrorColor I change the Background color of My Edit box for showing Warnings and Error
and here m_ErrorEditCtrl is my Edit Ctrl for showing errors. I change the back gournd of Edit Box in...
I think strings need to be converted into numerical values
int x = atoi(szText.Mid(0,2));
int y = atoi(szText.Mid(2,2));
int z = atoi(szText.Mid(4));
incase of Unicode Strings better use mfc Macro's
int x = atoi(W2A(szText.Mid(0,2)));
int y = atoi(W2A(szText.Mid(2,2)));
int z =...
To Add to my earlier entry You can also use controls provided by differnet Vendors or use Microsofts Date Time Picker control( MSCOMCT2.OCX) it comes with VC6.It also has good look and feel. Hope this helps
Yes it is possible to force the user to enter value say day, month and Year but you will have to validate.
See COleDateTime class for 32 bit and CTime class for 16 bit these classes are very simple easy to use.
I think it is Simple Try this
Say you have class CTestDialog
CTestDialog : public CDialog
{
public:
--
--
private:
CString m_StrTestValue;
}
CChildDialog : public CDialog
{
public:
CString m_strEditValue;
private:
CEdit m_EditCtrl;
..
....
....
}
if you do not want to use DDX then use...
Oh! Sorry I forgot to Mention m_ErrorEdit and m_ErrorColor
Actually that time m_ErrorEdit is derived from CEdit class
to show Error/Warnings with appropriate color. m_ErrorColor is integer defined to hold colors.
Anyhow hope this helps in resolving your problem.
I had a similar problem here I am posting the code as how I resolved it
HBRUSH CActiveChildDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = IOrderEntryDlg::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
if (nCtlColor ==...
In VC++ 6.0 IDE click on Project -> Add to Projects -> Components and Controls and then open Registered ActiveX Controls then Insert the required control. Note your Control should be registered first you can do that by either double clicking on your .OCX file or using regsrv32. This will...
In the OnInitDialog() method of your dialog you can do intializations.<br>You can use SetCurSel(int Index) method to select any item by default. Their are several ways to do this here i will give you one example.<br><br> int index =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.