|
How can i add lex and yacc files to mfc project.
|
|
|
|
|
by importing files within your project ?
|
|
|
|
|
|
Hi,
Could someone please suggest/point me in the direction of an article, to show how I can display an animation made up of generated images sotred in a single HBITMAP in a Windows Form PictureBox?
Many thanks in advance,
Ljubica
|
|
|
|
|
hi,
I need to get the actual amount of free space available on the hard disc. I am using GetDiskFreeSpaceEX API to get the amount of free space. The problem is that the amount of free space returned is different at different times.
Can any one tell me the reason why the value is different?
Also, Is there any other API which is much more reliable than GetdiskFreeSpaceEx?
Thank u in advance ,
regards,
nisha
|
|
|
|
|
I think, it is due to OverFlow. Check once.
Using FindFirstFile and FindNextFile methods.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/findfirstfile.asp
The above link may help u.
Chetan.
Helping others satisfies you...
|
|
|
|
|
Must be something wrong with your code, i never had any problem with it
can you paste the exact code
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
I have to store a DateTime in the registry in binary key. I think i can use the DateTime.m_dt variable which a double to store the value of the datetime. But I don't know how to convert it to binary like in Managed where we have the BitConverter.GetBytes(double). I need this urgently.
|
|
|
|
|
|
Thanks a ton Mihai!!!u posted just in time
|
|
|
|
|
I want to create a CScrollView in a dialogbased project.So i follow thsese steps :
1.createa a dialogbased project named MyDlg.
2.drag a CStatic control to this dialog,its ID is IDC_STATIC_VIEW
3.Create a new class named CMyView and its base class is CScrollView
4.Add a member function CreateView,include "MyView.h",Add a member variant
CMyView *pView;
we realize it like this:
VOID CViewInDlgDlg::CreateView()
{
CRect rect;
CWnd* pWnd=GetDlgItem(IDC_STATIC_VIEW);
pWnd->GetWindowRect(&rect);
ScreenToClient(&rect);
CCreateContext cx;
cx.m_pNewViewClass=RUNTIME_CLASS(CMyView);
cx.m_pCurrentDoc=new CDocument();
CFrameWnd* pfWnd=(CFrameWnd*)this;
CWnd* pView=pfWnd->CreateView(&cx);
pView->MoveWindow(&rect);
}
When I run this program, i found there was a ASSERT error at line 134 in viewsctrl.cpp.I correct it by overriding the function OnPrepareDC,I modified like this:
CView::OnPrepareDc(..)
Then no error ocurred.
I try to test if it can work,so i add a button in this dialog.Then I wrote this in its OnButton1 function,I wrote this:
void CMyDialog::OnButten1()
{
CDC *pDC=pView->GetDC();
pDC->TextOut(10,100,"hello");
}
Click this button it crashed.
The error happened in this line:
{ ASSERT(::IsWindow(m_hWnd)); return CDC::FromHandle(::GetDC(m_hWnd)); }
I have no idea now,someone can help me correct this error?
PS:If MyView Class is based on CView,then this error cannot be found.
As English is not my native language,i hope you can understand my meaning.
|
|
|
|
|
Hi, you can use the Doc/View Framework only in a SDI/MDI application. Sorry!
|
|
|
|
|
|
Hello, all!
Who can tell me the concept of "UNC path"? In which case should we use "UNC path" ?
I feel confused.
Best Regards,
|
|
|
|
|
|
hi
I have a clent/sever MFC application.I used MAPI(MAPI32.dll)in my client application to send a email from client program to an external email address.The problem is that it works on some systems but not on others. i.e on other systems we don't receive the emails.
i have configured outlook on all systems though....
what could be the problem?Is it with mail client or MAPI??
thanx in advance
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
-- modified at 4:16 Thursday 23rd March, 2006
|
|
|
|
|
Hello,
I have an MDI application in MFC, wherein I am opening several documents, my question is how to get all the child frame windows thru the document pointer?
I am using functions GetFirstDocTemplatePosition and GetNextDocTemplate. But thru those how can I get all the child frame windows. Please help.
Software Developer
Sanjay Khapre
|
|
|
|
|
One way could be to use the
FindWindow() function
I haven't tried it myself but if you get success doing the same please intimate me
Vision is Always important and so is your ATTITUDE.
Wishes.
Anshuman Dandekar
|
|
|
|
|
Have you tried CWnd::GetNextWindow.
MSDN description of function says
"Searches for the next (or previous) window in the window manager’s list. The window manager’s list contains entries for all top-level windows, their associated child windows, and the child windows of any child windows.
If CWnd is a top-level window, the function searches for the next (or previous) top-level window; if CWnd is a child window, the function searches for the next (or previous) child window."
Use this function on main frame window .
In document class you can get main window by using function AfxGetMainWnd
|
|
|
|
|
could someone plz tell me how to control mouse movement using VC++
does any one have the code for it or even the logic would do.
Thank You
|
|
|
|
|
see SetCursorPos[^]
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
your query doesn't seem to be related to what you tried to ask
Why do you want to set the cursor position explicitly.
however if you still want to do it you can use the SetCursorPos() function
Bankey Khandelwal
Software Engineer
|
|
|
|
|
Hello All,
I've a MFC application from which I've to call a routine from a DLL.
EARLIER, This DLL was getting used by a JAVA application.
But now there is a MFC application instead.
We dont' have to change the DLL code for this in any case.
The export routines have following declaration:
JNIEXPORT void JNICALL Java_gui_config_setManufacturer(JNIEnv *env, jobject obj);
Please let me know how this routine can be called from MFC application.
Thanks in advance!
Regards!
-- modified at 22:51 Thursday 23rd March, 2006
|
|
|
|
|
In C++ how we can associate a function with a variable. means the function should be called automatically when the value of variable changes.
|
|
|
|
|
i don't really understand. this cannot be done automatically - say, when you assign the variable, the function is called automatically.
but if the variable changes, it is because you assigned it, so why no calling the function right after this assignation ?
moreover, i'm not sure, by i have the impression that we don't have the same vocabulary.
what you call by 'variable' is a control over a dialog or a frame, which is associated with a variable ; what you need so is knowing when the control's content is modified so that the framework calls its event handler ?
is so, see the events of your control (EN_CHANGE for a CEdit control).
if i'm wrong, please reformulate your question because it is really not clear enough.
|
|
|
|