|
I made it in this way :
I derive my own Frame from CMDIChildWnd.
At the construction of this Frame i create the Initial-View with the function "CreateView"
So you don't want to use the Templates?
I also don't use the templates, but i have many troubles. Because if you don't
use the standard-MFC-Way you need to manage yourself all functionalities
( for example that the focus rests on the control if you switch to another application, ... )
So, i'm not really the best to explain you these things.
But if i can help you, i will do my best
|
|
|
|
|
Thanks
For your help
But is there any article that can help
Prithaa
|
|
|
|
|
I started with this arcticle.
My Frame-Class is based (nearby the same) on this example.
http://www.codeproject.com/docview/nodoc_views.asp
I hope it helps you.
|
|
|
|
|
Thanks,
I went through the article. it was good.
Thanks once again
Prithaa
|
|
|
|
|
Hai..
I am developing VC++ application to write data to a pen drive.
Can any one help me how to proceed for it...
I want to move data of any type or complete folders into the pendrive without the help of driver..
Sample code may be more helpful..
Thanks in advance
Regards
vijay
|
|
|
|
|
when pen drive is connected to your system it is recongnized as a regular drive. So i think you can use standard api(for example CopyFile etc ) for writing data.
If u can Dream... U can do it
|
|
|
|
|
Thanks...
But there is no driver in my PC..
That too data should be sent through USB port...
I hope u got me..
Regards
vijay
|
|
|
|
|
Are you working in embedded domain ?
Without any driver (USB ) i think it is not possible, u need to check the usb standards and write a simple driver..
If u can Dream... U can do it
|
|
|
|
|
Hi
i run into this code.. :
void CVidTestDlg::OnCapture()
{
CString Filter;
CString Filename;
CRect Rect;
Filter = "Bitmap Files (*.bmp)|*.bmp|AVI Files (*.avi)|*.avi||";
CFileDialog FileDlg(FALSE, "BMP", NULL,
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
Filter,
this);
if (FileDlg.DoModal() == IDOK)
{
RedrawWindow();
Filename = FileDlg.GetPathName();
Capture(m_VFWImageProc, Filename);
m_VideoDisplay.GetWindowRect(Rect);
ScreenToClient(Rect);
m_VFWImageProc.EnablePreviewVideo(*this, Rect.TopLeft().x,Rect.TopLeft().y);
}
}
BOOL Capture(CVFWImageProcessor &ImageProc, LPCTSTR Filename)
{
ULONG Length = 0;
CFile File;
BOOL Ret = FALSE;
CHAR Ext[_MAX_EXT];
_splitpath(Filename,NULL,NULL,NULL,Ext);
if (stricmp(Ext,".avi") == 0)
{
Ret = ImageProc.CaptureAVI(Filename,4.0,10,10);
}
else if (stricmp(Ext,".bmp") == 0)
{
BITMAPINFO *Bitmap = NULL;
BITMAPFILEHEADER bfh;
ImageProc.CaptureDIB(&Bitmap,0,&Length);
if (Bitmap)
{
File.Open(Filename,CFile::modeCreate |
CFile::modeWrite |
CFile::shareDenyNone |
CFile::typeBinary);
bfh.bfType = 0x4d42; // 0x42 = "B" 0x4d = "M"
bfh.bfSize = (DWORD) Length + sizeof(BITMAPFILEHEADER);
bfh.bfOffBits = (DWORD) sizeof(BITMAPFILEHEADER) +
sizeof(BITMAPINFOHEADER) +
Bitmap->bmiHeader.biClrUsed * sizeof (RGBQUAD);
bfh.bfReserved1 = 0;
bfh.bfReserved2 = 0;
File.Write(&bfh,sizeof(bfh));
File.Write(Bitmap,Length);
File.Close();
Ret = TRUE;
delete Bitmap;
}
this is the code that is resposible for capturing a image from usb webcam and saving to hard driver
Function : CaptureDIB
Arguments : Bitmap (output) - Pointer to bitmap to receive image.
If *Bitmap = NULL, then allocation will
be performed automatically.
BitmapLength (input) - Size of Bitmap if *Bitmap is not NULL.
RetBitmapLength (output) - Actual size of image.
Return : TRUE Success, FALSE Failed.
Description: Captures a DIB image from video capture device.
As you see he uses some structs BITMAPINFO BITMAPFILEHEADER wihich togheter is the bitmap file. and writes it down to file.
now my problem...
i must make a dll wich exports symbols and a function within it , lets call it Capture that will return a bitmap (whole bitmap including header)
but i dont know how to copy the both struct within a buffer or something and return it.
can someone help. does someone get me..
sorry for bad explanation . i`m not champion at c++
|
|
|
|
|
Can I download a file (like DirectX SDK) in chunks using CInternetSession/CHttpFile ? I built a program that downloads a whole file using CInternetSession/CHttpFile, but I can't do that whith huge files in just one session in dial-up connection. When I use CHttpFile::Seek(), the method returns immediately, but the subsequent CHttpFile::Read() takes as much time as reading from the beggining of the file. If not, is there another way to do it programmatically ?
|
|
|
|
|
if (GetAsyncKeyState(VK_XBUTTON1){
getasynckey doesn't disable the VK_
lets say, if i want xbutton1 to do something, it does, but will work simultaneously with the real mouse4 function, wich is backing pages in internet explorer
what could i do? thanks
|
|
|
|
|
tulio ribeiro wrote: if (GetAsyncKeyState(VK_XBUTTON1){
getasynckey doesn't disable the VK_
It is not supposed to be.
Can you explain, what you want to achieve.
|
|
|
|
|
i want to, like, anulate the key, not just get the state, and don't know how i should do
|
|
|
|
|
Can you explain a little clearer ? I really, cant understand, what you are trying to say.
|
|
|
|
|
the mouse4 works together with the mouse1
like, mouse4 will be hold, but i dont want that windows detect the mouse4 being hold, i just want mouse1 clicks, you know? thanks
|
|
|
|
|
Can you elobarate , what this mouse1 and mouse4 are ?
|
|
|
|
|
mouse1 = Left Click
mouse4 = xbutton1
|
|
|
|
|
Hi,
I need to know how to detect monitor resolution changes in my MFC application,
is there a WM_MONITORRESOLUTIONCHANGE message or similar that I can use to
check for this.
Many thanks.
|
|
|
|
|
Is WM_DISPLAYCHANGE helpfuls
|
|
|
|
|
Just what I was looking for, Thanks.
|
|
|
|
|
how to change the background color and text itemname in tabControl of mfc
|
|
|
|
|
|
i need some basic tutorials for TabControls in MFC. i need to know its creation and inserting items to the tab. anyone can help me
|
|
|
|
|
Here[^] we go.
Let us not listen to those who think we ought to be angry with our enemies, and who believe this to be great and manly. Nothing is so praiseworthy, nothing so clearly shows a great and noble soul, as clemency and readiness to forgive.
- Marcus Tullius Cicero
|
|
|
|
|
hi all,
I have got a problem with gluUnproject function. it works fine when there is no rotation. When i am giving rotation to my objects , it is giving me wrong coordinates( actually if i did rotation in X->Y->Z , it give me Z->Y->X).
i am using glReadPixels to read depth bits.
Anyone have any ideaaa???
Thanks in advance
Krishnan
If u can Dream... U can do it
|
|
|
|