|
First question:
Just copy the "afxcmn.h" - File to your project dir.
Second:
You can use vfw32 (VideoForWindows) to play an Avi file. It's very simple...
|
|
|
|
|
Dear AnTri,
Thanks for your kind reply. I have copied the file into my project dir but still experience the same problem. I have inspected the afxcmn.h which does define the CProgressCtrl class. I wonder if the problem is due to my project is selected as Win32 DLL.
Is there any sample program to call vfw32 to play AVI file?
What is the calling statement from a VB program that passes an array of fixed length string to C which will return string values through the array?
Thanks for your kind help.
wavewave
|
|
|
|
|
Hello WaveWave,
you can define your fixed string in vb(a) like
dim fixString as string(80)
Progressbar:
I think CProgressCtrl is an MFC-Class. You can't use MFC-clases in Win32-DLL project!
Avi:
please post your e-mail adress so I can mail you an example of an gnu-avi player, which you can use in your dll.
|
|
|
|
|
Hello WaveWave,
you can define your fixed string in vb(a) like
dim fixString as string(80)
Progressbar:
I think CProgressCtrl is an MFC-Class. You can't use MFC-clases in Win32-DLL project!
Avi:
please post your e-mail adress so I can mail you an example of an gnu-avi player, which you can use in your dll.
You habe to compile your dll using the stdcall-convention. The best way is to implement an .def file... (See MSDN)
|
|
|
|
|
Dear Antri,
Thanks for your prompt reply. My email is coolcool883@hotmail.com.
Is there any alternative if I have to provide progress information to user?
For parameter passing, if I have to pass an array of 10 elements each of which is a fixed length 80 byte string. How should I define in my VB and how can I update the array element in my C program?
Thanks for your kind help.
Regards,
wavewave
|
|
|
|
|
'to define the Usertype Array:
Public Type MyArray
String1 As String * 81 ' : array[1..81] of char; // 80 byte string
String2 As String * 11 ' : array[1..11] of char; // 10 byte string
end type
dim MyRecord as MyArray
'to define the dll-function in vba:
Declare Function MyCppDLL Lib "CppTest.dll" Alias "FirstFunctionName" (MyRecord As MyArray) As Byte
'in c++ define the same record with struct.... and you can access the strings (char String[n]) stored in the UserRecord (struct)
|
|
|
|
|
Thanks for your advice.
How can I define an array of 25 strings each of 255 bytes, i.e.
String[01] of 255 bytes
String[02] of 255 bytes
String[03] of 255 bytes
:
:
String[25] of 255 bytes
Thank you.
wavewave
|
|
|
|
|
How to use this API to get the info of remote machines? Here is my sample code.. I am getting a memory error . Can anyone suggest me where i went wrong. Is there any other way to pass the first argument(machine name) to the API?
////////////////////
//getting details of machines
wchar_t *tmp4=(wchar_t *)malloc(sizeof( wchar_t ));
strcat(mbstr2,tempname[snum]);
mbstr2[strlen(mbstr2)]='\0';
size_t x=strlen(mbstr2);
mbstowcs(tmp4,mbstr2,x);
WKSTA_INFO_101 *level=NULL;
LPTSTR tmp7=(LPTSTR)tmp4;
NET_API_STATUS nwData=NetWkstaGetInfo(tmp7,101,(LPBYTE*)&level);
if(nwData==NERR_Success)
{
int iLen3=wcslen ((unsigned short *)level->wki101_computername);
for(int j=0;j<ilen3;j++)
{
="" name[j]="*(level-">wki101_computername);
level->wki101_computername++;
level->wki101_computername++;
}
name[j]='\0';
AfxMessageBox(name);
//////////////////
Kindly help.
Regards,
Vini
|
|
|
|
|
I don't understand all that string manipulation at the beginning.
The first param is either NULL to use the local computer, or a Unicode string holding the name of the computer to get info for, for example L"\\Servername"
--Mike--
THERE IS NO THERE IS NO BUT THERE IS
MAGIC PIXIE DUST BUSINESS GENIE CODE PROJECT
BUY MY SOFTWARE!! (please?) RightClick-Encrypt | 1ClickPicGrabber
My IntarWeb Homepgae!!!11
|
|
|
|
|
Michael Dunn wrote:
don't understand all that string manipulation at the beginning.
The first param is either NULL to use the local computer, or a Unicode string holding the name of the computer to get info for, for example L"\\Servername"
I want to give the first argument at run time(not a NULL value),means give the selected machine name from a list box or edit box. The initial string manipulations were used to convert the value in a CString variable to the type of the first parameter . is it not required? Kidly help..
Vini
|
|
|
|
|
Use the T2CW macro to do that
#include <atlconv.h>
{
USES_CONVERSION;
NetWkstaGetInfo ( T2CW(LPCTSTR(sComputerName)), ... );
}
--Mike--
THERE IS NO THERE IS NO BUT THERE IS
MAGIC PIXIE DUST BUSINESS GENIE CODE PROJECT
Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
Hi, I am writing an application that has plugins (DLLs). Each DLL has a child window that resides in the application's main dialog window. Some of the plugins need to use web services, however, when I attempt to use the CHtmlView in the child window of the DLL, I crash and burn every time. If I move the same code to the master program, it works.
I tried modifying the DLL to have it's own dialog window, and still both CHtmlView and even the ActiveX MS WebBrowser control do not work. They crash on initialization of the child dialog (dialog never even gets created). This leads me to believe it isn't the child dialog that is the problem, it is DLL + HtmlView = boom....
Has anyone had any success with this type of thing?
Thanks in advance!!
By the time you read this you will have already read it.
|
|
|
|
|
Hey all,
Figured it out. In case you ever run into this problem, the solution is to not only call AfxEnableControlContainer() from your DLL's InitInstance(), but you must also first call CoInitialize(NULL) as well.
|
|
|
|
|
I would like to create a Photoshop plugin to read/write a custom image file format. Does anyone know how to do this or any resources available on the topic?
|
|
|
|
|
Actually, I figured it out. There is an "Adobe Photoshop SDK" on the Adobe Photoshop CD (Version 6.0 and earlier -- apparently they started charging for it in Version 7.0).
Regards, Larry
|
|
|
|
|
How can I get rid of the black line drawn at the bottom of a tab control? None of the options on the property pages seem to do it without adding other lines in places i don't want, and i don't see any member functions that would do it. I want a control that has the dialog face color on its bottom edge (like a typical property page tab set), not black.
-c
When history comes, it always takes you by surprise.
|
|
|
|
|
derive the control !
onncpaint
framerect(clientrect,getsyscolorbursh(COLOR_3DFACE));
that`s it ! no more border !
I am the mighty keeper of the book on knowledge . Contact me to get your copy .
|
|
|
|
|
if you meant this:
void CMyTab::OnNcPaint()
{
CDC *pDC = GetDC();
CRect cr;
GetClientRect(cr);
FrameRect(pDC->m_hDC, cr, ::GetSysColorBrush(COLOR_3DFACE));
ReleaseDC(pDC);
}
then, no. that's not it. the border is still there.
-c
Image tools: ThumbNailer, Bobber, TIFFAssembler
|
|
|
|
|
I'm looking for a way to change the IP address of my computer through an application and testing to make sure there is no network conflict, ect. Can anyone point me to a good resource to figure this out? Thanks
|
|
|
|
|
Are you asking how to change it programatically, or are you just wanting to change the ip?
You can use ipconfig from the command line to change network settings pretty quickly, but I am not sure if that is what you are asking for.
Could you clarify what you want to do please?
- Dana
|
|
|
|
|
How do I check for leaked GDI objects?
|
|
|
|
|
They don't leak in W2000/XP. In W 95/98/ME, you'll find you suddenly can't draw any thing, nor can the system. MSDN mag ran a tool that showed the number of resources used and allowed you to browse them, a couple of years ago I think.
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
Anonymous wrote:
OK. I read a c++ book. Or...a bit of it anyway. I'm sick of that evil looking console window.
I think you are a good candidate for Visual Basic. - Nemanja Trifunovic
|
|
|
|
|
They leak every where, but WinNT/Win2000,WinXP system are use 32bit vales for addressing up to 2^32 GDI objects while 9x system uses just 16bit values, thus can hold only 2^16, which is much fewer. However that does not mean you can use the whole 4 billion GDI objects in WinNT systems, still the system put an upper limit but I do not know it exaclty, but I did encounter resource leak in WinXP before.
check this MSDN article
http://msdn.microsoft.com/msdnmag/issues/01/03/leaks/default.aspx
Anyway, to detect resource leaks in Win2000/WinXP just open the task manger and go to the processes tab, then from from the "View" menu choose "Select Columns..." the check "GDI Objects". After that look up your process from the system processes and monitor its GDI Object, if they constantly increase then you have a leak, if it increase then stop increasing then it could just be initial allocations.
|
|
|
|
|
Here my special problem:
I have a class CBauteil (derived from CObject) and an CObArray.
CBauteil has although Array with an CObject Class (CBauteilschicht).
exp.
class CDoc : public CDocument
{
public:
CObArray m_oaBauteil;
...}
_________________________________________________
class CBauteil : public CObject
{
public:
CObArray m_oaBauteilSchicht;
...}
_________________________________________________
//Acces to first (filled) array
CBauteil *pBauteil = (CBauteil*) pDoc->m_oaBauteil[0];
//Pointer to second ObArray (m_oaBauteilschicht)
pBauteil->m_oaBauteilschicht
//Now I add a new entry to the first Array
CBauteil *pNeuBauteil = new CBauteil();
pDoc->m_oaBauteil.Add(pNeuBauteil );
//and now I want to copy the first Entry of the "SubArray"
pNewBauteil->m_oaBauteilSchicht.Copy(pBauteil->m_oaBauteilschicht);
The Problem:
When I change a value in the original Array m_oaBauteilSchicht[0] the value in m_oaBauteilSchicht[1] changes although. How can I get a real copy so that I can change the values seperately?
|
|
|
|
|
AnTri wrote:
can I get a real copy so that I can change the values seperately?
allocate a new CBauteil object. copy the data from your 'source' object. add the new object to the second array.
-c
When history comes, it always takes you by surprise.
|
|
|
|