|
If he wasn't coding in windows it wouldn't say "Software Engineer" it would say "Unemployed".
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|
|
CoCreateInstance is used with COM technology, which is a particular type of DLL.
Bankey Khandelwal wrote: i want to add a dll file in MFC dialog base application and use it,
If you simply what that (and nothing to do with COM or ActiveX or else), you can simply add the header files to your project (implicitlinking) and lin to the library supplied with your dll. The second method (which is explicit linking) is to load your dll with LoadLibrary then retrieve functions pointers in it (you need to know the name of the exported functions) with GetProcAddress.
|
|
|
|
|
#ifdef _DEBUG
#import "\Test\ATL Dialog\Debug\NewATLAttach.dll" raw_interfaces_only, raw_native_types, no_namespace, named_guids
#else
#import "\Test\ATL Dialog\Release\NewATLAttach.dll" raw_interfaces_only, raw_native_types, no_namespace, named_guids
#endif
Create the object using CoCreateInstance and use the methods
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
|
|
|
|
|
Hello,
I’m trying to create an AVI File (using the API VfW) where data are already compressed. Frames are already compressed by my board grabber, and my application just receive in a shared memory the compressed buffer.
I created a BITMAPINFOHEADER struct and an AVISTREAMINFO struct to create the stream associated to my open AVI file.
m_pBitmapInfo->biSize= sizeof(BITMAPINFOHEADER); <br />
m_pBitmapInfo->biPlanes= 1; <br />
m_pBitmapInfo->biBitCount= 24; <br />
m_pBitmapInfo->biCompression= mmioFOURCC('d','i','v','x'); <br />
m_pBitmapInfo->biClrUsed= 0; <br />
m_pBitmapInfo->biClrImportant= 0; <br />
m_pBitmapInfoHeaderPos->biSizeImage= m_bufferSize;
m_pBitmapInfoHeaderPos->biWidth= SizeX;
m_pBitmapInfoHeaderPos->biHeight = SizeY; <br />
... <br />
<br />
m_pAviStreamInfo.fccType= streamtypeVIDEO; <br />
m_pAviStreamInfo.fccHandler= mmioFOURCC('d','i','v','x'); <br />
m_pAviStreamInfo.dwScale= 1; <br />
m_pAviStreamInfo.dwRate = 5; <br />
m_pAviStreamInfo.dwSuggestedBufferSize= m_pBitmapInfo->biSizeImage; <br />
RECT RectImageSize = { 0, 0,SizeX ,SizeY}; <br />
m_pAviStreamInfo.rcFrame= RectImageSize; <br />
<br />
... <br />
hr = AVIFileCreateStream(m_pAviFile, &m_psAvi, &m_pAviStreamInfo); <br />
... <br />
hr = AVIStreamSetFormat(m_psAvi, 0, m_pBitmapInfo, m_pBitmapInfo->biSize);
Then, I wrote the frame:
hr = AVIStreamWrite (m_psAvi, images, 1, m_pCurrentBuffer, m_bufferSize, AVIIF_KEYFRAME, &plSampWritten, &plBytesWritten);
At the end of the process, my file is too big and I have only a black display.
If I ask my grabber to not compress the video source I have no problem to create my AVI file using the API VfW…
I don't understand what is wrong...
Is there anybody that has an idea?
Thank your.
|
|
|
|
|
Hi dvillet,
I saw in examples MSDN how to create Avi file
that you can see for cerate Avi (I think this example is create number 9,8,7...)
|
|
|
|
|
I already saw examples MSDN how to create Avi file but nothing to help me.
Do you remember where exactly?
Thank you.
|
|
|
|
|
Dear dvillet,
I found most video examples, but I cant find this example
if i find this example I post this link to you
|
|
|
|
|
|
|
Gurus,
I have MDI MFC application .
I click a menu item and a modeless dialog CPalette is created.
void CMainFrame::OnToolsOpenpalette()
I have added a variable to CMainFrame i.e. CPalette *mypal;
Now real problem is When this dialog is displayed it gets all the focus and my main frame, view loses focus and there is some color change in the title bar of these windows. If focus gets to frame or view then dialogs loses focus and some color change occurs to dialog title. which is very irritating.
I dont want this. I want the CPalette dialog to look like a component of MainFrame. There should not be any color change (like when we click on MDI view, Frame doesnt lose any focus.)
(This palette will be having icons which will be clicked to invoke some graphic commands and should be applicable to multiple view)
How to get this result?
Thanks
Lee
|
|
|
|
|
If you want your main window to also have the activated color send a WM_ACTIVATE Notification mesage to that window.
Regards,
FarPointer
|
|
|
|
|
You have posted the same message twice ,if it was by mistake please take the pain to delete this message ,why making CP(lose space)
Regards,
FarPointer
|
|
|
|
|
hi all,
I have created a player in vc++ 6.0 which plays video files.
If i play two video files at a time,one file is crashing.
can i able play 2 video files simultaneously.how can i do that.Also please tell me "how to stream video files in vc++".
Thanks in advance
cheers
sangeet
|
|
|
|
|
Hi ramyasangeet ,
Hope I understood your question you need to play video files(avi,mpg,...)
I Played 4 video files and no problem
I use MCI to paly in 4 video files in 4 windows
plaese use functions MCI(I use vs2003)
|
|
|
|
|
hi all
i want to show the printer dialog using api.i had use this code from msdn.
PRINTDLG pd;
ZeroMemory(&pd, sizeof(pd));
pd.lStructSize = sizeof(pd);
pd.Flags = PD_USEDEVMODECOPIESANDCOLLATE | PD_RETURNDC;
pd.nMaxPage = 1;
if(PrintDlg(pd)==TRUE) this line give error that
d:\_Tasleem\BcGenerator 310306\Barcode Generator\PrinteBitmaps.cpp(61): error C2664: 'PrintDlgA' : cannot convert parameter 1 from 'PRINTDLG' to 'LPPRINTDLGA'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
i tried to use by declaring onject of LPPRINTDLGA but it had no member data i.e LPPRINTDLGA pd;
pd.mMaxPage=1;
Tasleem Arif
|
|
|
|
|
PRINTDLG pd;
ZeroMemory(&pd, sizeof(pd));
pd.lStructSize = sizeof(pd);
pd.Flags = PD_USEDEVMODECOPIESANDCOLLATE | PD_RETURNDC;
pd.nMaxPage = 1;
if(PrintDlg(&pd)==TRUE)
(I think you need to specify a reference to that variable)
|
|
|
|
|
thank u it works
Tasleem Arif
|
|
|
|
|
maybe it is some helpful to you
DOCINFO di;
PRINTDLG pd;
memset((void *)&pd, 0,sizeof(PRINTDLG));
pd.lStructSize = sizeof(PRINTDLG);
pd.hwndOwner = this->m_hWnd;
pd.Flags =PD_RETURNDC|PD_ENABLESETUPTEMPLATE;
pd.hInstance = NULL;
pd.nMaxPage=1;
pd.nMinPage=1;
pd.nCopies=1;
pd.hDevMode=lpdevmode;
pd.nFromPage=1;
pd.nToPage=1;
PrintDlg(&pd);
|
|
|
|
|
im tryin to do a collision detection project and need to us a library called MagicFM.lib but im getting a link error "collision1 fatal error LNK1181: cannot open input file 'MagicFM.lib'" i am able to run it in visual studios c++ but when i come into college thers only .net and i keep getting the link error. anyone any ideas on this
thansk rosco
|
|
|
|
|
Did you add the directory to the library directories in the project options ?
|
|
|
|
|
yeh i opened the project up that i had working and it converted it to a .net project. i checked the settings and the librarys seem to be the same.
|
|
|
|
|
rossol219 wrote: converted it to a .net project
Did you copy the library you need also ? And in the proper folder (that is, the one indicated in your project settings).
|
|
|
|
|
yeh i had these libraries already workin in diiferent projects on this computer alreday. the directories are the exact same on my home pc. ive just trie dto create a new project to see if that worked but i am now getting a lnk 1104 error for the same library
|
|
|
|
|
1) Goto 'Project' Menu ---> Select 'Properties'.
2) In the lefthand treeview of the dialog dispalyed, select 'Linker' folder.
3) Then click the 'Input' subitem.
4) In the righthand grid, click 'Aditional Dependencies' and add the full path of your library file including library name.
cheers..mil10.
|
|
|
|
|
Can you maybe explain in details which compiler you use at home and to which one you want to convert ?
I think you have a problem with your library directories. Are you 100 % sure that they are correct ? I mean copying your project to the new computer is not be sure of the correct path. Open the project properties, link tab, and check the "Additional Library Directories". Even better, remove the previous path to your library folder and write it again, to be sure it is redirected to the correct path.
|
|
|
|