|
omkamal wrote:
Is there a simple client written consuming this COM, that i can use? [Just to save my time]
Have a look at the sample code which Matt includes. I haven't actually used it apart from a quick play with the samples. The mailing list is active and Matt is quick to respond to problems. Quite amazing seeing that it is free.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
Neville,
Thanks for letting me know about this software.
Neville Franks wrote:
The mailing list is active and Matt is quick to respond to problems.
I am very impressed, as he replied me back within a moment for my questions.
Neville Franks wrote:
Quite amazing seeing that it is free
This is exactly true.
omkamal
|
|
|
|
|
HI,
I have an VC++ application[DialogBased-has OLE-Automation support] which communicates to Data Acquisition[NI Diadem] software through OLE_DISPATCH_INTERFACE and this DAQ software copies custom_data[which is a graph]into windows clipboard.
Now in my vc++ application i.e[OnDialogViewImage()]function i am unable to get the clipboard data.
following is the below code i am using:
if(::OpenClipboard(AfxGetApp()->m_pMainWnd->m_hWnd))
{
BeginWaitCursor();
UINT enumformat = EnumClipboardFormats(uFormat);
HGLOBAL hem = ::GetClipboardData(enumformat);
}
but enumformat is always NULL. Is this is the correct way to get clipboarddata() and also how do i paint the data from clipboard to my DialogImage control.
Any help is welcome!.
regards
ArunBK
|
|
|
|
|
Hi There,
I don't think that's the function you want to call. You should try calling IsClipboardFormatAvailable, with the ID of your custom clipboard format, which you should have retrieved through a previous call to RegisterClipboardFormat. Once you have verified that the indicated format exists on the clipboard through IsClipboardFormatAvailable, then, you may call GetClipboardData with the ID of the format you wish to retrieve the data in.
You don't need to call EnumClipboardFormats, unless you want to know about ALL of the formats that are on the clipboard. If you are only interested in a particular format, you should ask for it directly.
The call to EnumClipboardFormats is failing because you haven't initialized the IN/OUT parameter with a value of 0, to get the first available format. This parameter must be a valid format (to get the next format) or 0 (to get the first format).
|
|
|
|
|
How to hide the application so it does not appear in the task manager Alt+Ctrl+Del?
|
|
|
|
|
ShowWindow(SW_HIDE) will hide the application from the Application list in task mgr.. but you will still see your .exe in the processes.
|
|
|
|
|
Hi!
Very similar problem, (maybe) with an anwser can be found at:
http://www.experts-exchange.com/mfc/Q.20301000.html
Mukkie
|
|
|
|
|
How do I set up an include path directory? i.e. If I want a directory called "\mysource\include" to be automatically searched in the include path so that I can use "#include <<myheader.h>>"I thought it was in Project | Settings | Custom build but I'm missing something.
|
|
|
|
|
Project / Settings / C/C++, Category: Preprocessor
-c
ABSURDITY:
A statement or belief manifestly inconsistent with one's own opinion.
|
|
|
|
|
So, what do I need there /FI? Like /FIMyIncludeDir
|
|
|
|
|
i usually put a relative path from the project directory to the include folder (../../someotherfolder/whatever). you can use absolute paths, too (c:\someotherfolders/whatever).
the Tools/Option method that the other poster mentioned will set it for all projects. the method i mention sets it only for the current project.
-c
ABSURDITY:
A statement or belief manifestly inconsistent with one's own opinion.
|
|
|
|
|
Ok. Thanks. I see that I need a /I. I prefer using relative paths too.
|
|
|
|
|
you don't need a /I , just put the path in the "Additional Include Directories" field.
-c
ABSURDITY:
A statement or belief manifestly inconsistent with one's own opinion.
|
|
|
|
|
Thanks. I missed that "PreProcessor" category you specified.
|
|
|
|
|
Hi..
In the VS IDE : choose Tools->Options
then the Directories tab and set all includ and library directories you need..
|
|
|
|
|
|
My system doesn't find any audiocompressors. When I use ICTYPE_VIDEO, all video codex are found, but when I use ICTYPE_AUDIO, no audio codex are found at all.
I'm using the AVIFile API.
ICINFO compressorInfo;
HRESULT hr=TRUE;
int nCount=0;
while(hr)
{
hr=ICInfo(ICTYPE_AUDIO,nCount,&compressorInfo);
if(hr)
nCount++;
}
Why is that?
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
Maybe there's another proc to enumerate the audio codex?
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
I found some code in my ebook: etwork programming fro Windows, MS Press.
SOCKET s;
BOOL bBroadcast;
char *sMsg = "This is a test";
SOCKADDR_IN bcast;
s = WSASocket(AF_INET, SOCK_DGRAM, 0, NULL, 0, WSA_FLAG_OVERLAPPED);
bBroadcast = TRUE;
setsockopt(s, SOL_SOCKET, SO_BROADCAST, (char *)&bBroadcast, sizeof(BOOL));
bcast.sin_family = AF_INET;
bcast.sin_addr.s_addr = inet_addr(INADDR_BROADCAST);
bcast.sin_port = htons(5150);
sendto(s, sMsg, strlen(sMsg), 0, (SOCKADDR *)&bcast, sizeof(bcast));
Well, this is how to send... but how to receive UDB packets and then get the IP of the sender!?
I think recvfrom(...) is to be used... hm.. how to get the IP!?!?!?
Rickard Andersson@Suza Computing
ICQ#: 50302279 (Add me!)
E-mail: nikado@pc.nu
I'm from the winter country SWEDEN!
|
|
|
|
|
I too tried the same thing some time back. I did not get help from anywhere. As my project deadline was nearing, I found a 'rude' way.
I appended the IP address of the broadcaster to the broadcast message at the very end!
|
|
|
|
|
You may want to try this, I never tried it with UDP socket but think it
should work. BTW let me know if you try it and if it works!
DWORD ReadSocket(SOCKET s, LPBYTE lpBuffer, DWORD dwMaxSize,
DWORD dwTimeout , SOCKADDR_IN* pAddrIn )
{
fd_set fdRead = { 0 };
TIMEVAL stTime;
TIMEVAL *pstTime = NULL;
if ( INFINITE != dwTimeout ) {
stTime.tv_sec = 0;
stTime.tv_usec = dwTimeout*1000;
pstTime = &stTime;
}
if ( !FD_ISSET( s, &fdRead ) )
FD_SET( s, &fdRead );
DWORD dwBytesRead = 0L;
int res = select( s+1, &fdRead, NULL, NULL, pstTime );
if ( res > 0)
{
res = recvfrom( s, (LPSTR)lpBuffer, dwMaxSize, 0, pAddrIn, sizeof(SOCKADDR_IN));
dwBytesRead = (DWORD)((res > 0)?(res) : (-1));
}
return dwBytesRead;
}
"One good thing about getting older, you don't loose the ages you've been!"
|
|
|
|
|
It's in the documentation for recvfrom. The second last parameter can point to something you can get the senders IP from.
|
|
|
|
|
What are the differences?
If I use VC++ 6.0 as IDE, which one should be better for developing app?
Thanks a lots
DJ
|
|
|
|
|
All Windows applications are WIN32 application.
MFC is a class library built on top of WIN32 to greatly simplify application developement.
WTL is also a class library for WIN32 development.
IMHO, MFC is much better than using WIN32 directly.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
do we need to understand WIN32 for the purpose to use MFC?
How do you think WTL vs MFC?
last but not least, any good website can we learn MFC online?
Thanks again
DJ
|
|
|
|