|
An class declaration eritten below. i can't understand how it is written, i.e. which is base class & which is derived class & WHICH ARE THE MEMBER FUNCTIONSplz help me to make it clear???
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
-- modified at 1:41 Thursday 6th July, 2006
|
|
|
|
|
CAboutDlg derived from CDialog
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
this is not a class declaration.
the code is defining the default constructor of the CAboutDlg class (a constructor always has the same name as its class). a constructor can have an initialization list, which is the case here ; you can spot it with the : syntax after he function parameters list.
this initialization list tell the constructor the call the constructor of the CAboutDlg class' base class and passes it the CAboutDlg::IDD parameter.
what is missing in your sample is the brackets. i think the code would be at least :
class CAboutDlg : public CDialog {
public:
CAboutDlg CAboutDlg(void);
};
CAboutDlg::CAboutDlg()
: CDialog(CAboutDlg::IDD) {
}
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
Hi all,
I have some doubt regarding the spin button control.
In Spin button control, how can i know which button (up/dowm arrow button) is clicked?
Thanx in advance.
|
|
|
|
|
void CTest::OnDeltaposSpin(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
// TODO: Add your control notification handler code here
if(pNMUpDown->iDelta <0)
MessageBox("up button");
else if(pNMUpDown->iDelta>0)
MessageBox("down button");
*pResult = 0;
}
Regards,
Ram
|
|
|
|
|
Thanx for ur reply
|
|
|
|
|
You can use the scroll messages for this.
OnVScroll or OnHScroll.
- NS -
|
|
|
|
|
hello friends,,
I have established serial communication with RABBIT3000 (an 8 bit microcontroller).
The packet from the microcontroller is sent to the PC only on the PC demanding it. The demand is sent through one of the variables in the packet sent from PC.
When the PC receives packet from the microcontroller, it receives the correct packet for the first time. During my second request and further,
the Pc keeps receiving the same packet that it received first.
The packet from the microcontroller is updated on some conditions so that its different values in the packet memebers each time it is sent to teh PC on demand.
but when I try sending a different packet (microcontroller updates the packet structure members) to the PC, it still receives only the same packet that it received first and not the updated one.
I receive the packet using Readfile and store the values in a circular buffer.
On the microcontrollers end, the changed values is what is sent in the packet. I have debugged on the microcontroller end and it is fine.
Why is the PC receiving the same packet ?
What could be the possibility? any suggestions?
Thanks in advance.
-- modified at 1:49 Thursday 6th July, 2006
|
|
|
|
|
Hi ALL,
Every thing is Ok, But with this Code i am only able to see the Form View Embeded in the Dialog. Could you please provide me the solution for showing in different Window.
Here is the Code.
//========================================================================
void CMydlgDlg::OnButton1()
{
CFrameWnd *pMainFrame = (CFrameWnd*)RUNTIME_CLASS(kiranfrm)->CreateObject();
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(IDI_ICON1,
RUNTIME_CLASS(kirandoc),
RUNTIME_CLASS(kiranfrm),
RUNTIME_CLASS(kiran));
CCreateContext sContext;
sContext.m_pCurrentDoc = (CDocument*) RUNTIME_CLASS(kirandoc)->CreateObject();
sContext.m_pCurrentFrame = NULL;
sContext.m_pLastView = NULL;
sContext.m_pNewDocTemplate = pDocTemplate;
sContext.m_pNewViewClass = RUNTIME_CLASS(kiran);
CString strClass= AfxRegisterWndClass(CS_VREDRAW|CS_HREDRAW, ::LoadCursor(NULL, IDC_ARROW), (HBRUSH)::GetStockObject(WHITE_BRUSH), ::LoadIcon(NULL, IDI_APPLICATION));
pMainFrame ->Create(strClass, _T(""), WS_CHILD, CRect(0,0,1,1), this, NULL, 0, &sContext);
pMainFrame ->MoveWindow(200,100,300,300);
pMainFrame ->ShowWindow(SW_SHOW);
}
//========================================================================
Please help me out.
uday
|
|
|
|
|
|
hi white sky,
There is no problem in the code but i am able to see the CFormView Embeded inside the Dialog. Because in the Button Event i am creating the CFormView and Showing it.
My intention is to Show as another Window for the CFormView. Presently it is showing inside the Dialog window it self. It is not able to show as a separate Window for CFormView when i click the Button in the CDialog.
please help me out.
uday.
|
|
|
|
|
What the window?
whitesky
|
|
|
|
|
hi whitesky,
when i am clicking the Button Control in Dialog, i am trying to populate the Form View but that Form View is Showing inside the Dialog Window Itself. Now i want to show that Form View as Separate Window/Frame as the Dialog Window.
here is the Code.
//========================================================================
void CMydlgDlg::OnButton1()
{
CFrameWnd *pMainFrame = (CFrameWnd*)RUNTIME_CLASS(kiranfrm)->CreateObject();
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(IDI_ICON1,
RUNTIME_CLASS(kirandoc),
RUNTIME_CLASS(kiranfrm),
RUNTIME_CLASS(kiran));
CCreateContext sContext;
sContext.m_pCurrentDoc = (CDocument*) RUNTIME_CLASS(kirandoc)->CreateObject();
sContext.m_pCurrentFrame = NULL;
sContext.m_pLastView = NULL;
sContext.m_pNewDocTemplate = pDocTemplate;
sContext.m_pNewViewClass = RUNTIME_CLASS(kiran);
CString strClass= AfxRegisterWndClass(CS_VREDRAW|CS_HREDRAW, ::LoadCursor(NULL, IDC_ARROW), (HBRUSH)::GetStockObject(WHITE_BRUSH), ::LoadIcon(NULL, IDI_APPLICATION));
pMainFrame ->Create(strClass, _T(""), WS_CHILD, CRect(0,0,1,1), this, NULL, 0, &sContext);
pMainFrame ->MoveWindow(200,100,300,300);
pMainFrame ->ShowWindow(SW_SHOW);
}
//========================================================================
Please help me out.
Uday.
|
|
|
|
|
hi whitesky,
have you got my problem. please help me out it is very urgent.
uday.
|
|
|
|
|
I think you asked this question and I answered to you did you saw my answer and its not good for you
whitesky
|
|
|
|
|
hi whitesky,
i dint get your solution. I want to Show the CFormView as a Window/Frame from the Dialog. By defalult CDialog is my Project StartUp and then from Insert Resouce Menu i have inserted the CFormView.
now please give me our advice to how to solve this solution.
uday.
|
|
|
|
|
I need moving object is picture type on Dialog from position to position. So, how to do?
thanks!
-- modified at 23:55 Wednesday 5th July, 2006
|
|
|
|
|
Use MoveWindow/SetWindowPos in some timer function or a thread
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
_AnShUmAn_ wrote: Use MoveWindow/SetWindowPos
Sorry to bug you! this would be trouble some when working with image!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
trinh_van wrote: is picture type
if it picture! use BitBlt api!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
See BitBlt or StretchBlt
whitesky
|
|
|
|
|
in vs 6 how do you remove a .h or .cpp file if you added it by mistake?
i know you can exclude it from the build but how do you remove it all together?
|
|
|
|
|
Jus delete from the Fileview.
Regards,
Ram
|
|
|
|
|
thanks dude i hate adding the wrong file lol
|
|
|
|
|
Hi all,
In my design, i should display the individual character which are keyed in by the user into the combobox. lets say user need to key in the word "HELLO" in the combobox. if the user press "H", one message box should show the letter "H". the same way for all other letters. So,
How do i get the individual character which has been keyed in using the keyboard?
Thanks in Advance.
Regards,
Ram
|
|
|
|