|
Well, I believe in the "when in Rome..." concept when dealing with cross-platform development. In Windows, a URL link, when dragged-and-dropped, has the format of CFSTR_SHELLURL , so that is what you use. When you wanna play in our sandbox, you follow our rules!
As such, I would be of the opinion that those issues are (serious) bugs in those apps.
If dragging from Firefox into IE actually WORKS correctly, you can figure out which format IE is accepting, and expose it yourself. I have to have enough faith in other developers that Firefox allows you do drag a link from one instance of itself to another, so there is at least one format it accepts...!
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
I'm baffled at the results I got since I, too, generally trust programmers to get basic things like this right (and yes, Firefox allows drags to another instance of itself). The only format the two browsers seem to share is UniformResourceLocator but it doesn't seem to be working.
This is the point at which I give up, I think. Annoying, since I use Firefox most of the time. Sigh...
Thanks for your help.
Lets be honest, isn't it amazing how many truly stupid people you meet during the course of the day. Carry around a pad and pencil, you'll have twenty or thirty names by the end of the day - George Carlin
Awasu 2.1.1 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Are you sure you are exposing that format correctly? Also, it might look for another format as a "signature" that it is something it wants to accept.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
James R. Twine wrote:
Are you sure you are exposing that format correctly?
What do you mean by "correctly"? The fact that the URL I am exposing is not being accepted by IDataObject Viewer makes me suspicious that I'm doing something wrong but having said that, it doesn't want to take URL's dragged from IE either
The code I'm using was included in my original post.
Lets be honest, isn't it amazing how many truly stupid people you meet during the course of the day. Carry around a pad and pencil, you'll have twenty or thirty names by the end of the day - George Carlin
Awasu 2.1.1 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
I think I see the problem. Change DROPEFFECT_LINK to DROPEFFECT_COPY .
The DROPEFFECT_LINK style has nothing to do with hyperlinks, it has to do with COM/OLE Linking. Also, remove the DROPEFFECT_SCROLL style, I believe that it is not supposed to be specified directly by the drag-source, just received by the drag-target.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Ah. I had been playing around with those switches to see what they did Just specifying DROPEFFECT_COPY caused Firefox to *accept* the dragged URL but not actually open the URL However, it appears to be looking for a CF_TEXT/UNICODETEXT format instead.
So for the record, drag out CFSTR_SHELLURL and one of CF_TEXT or CF_UNICODETEXT and it seems to work with both IE and Firefox. Opera appears to be a lost cause
Thanks so much for your help
Lets be honest, isn't it amazing how many truly stupid people you meet during the course of the day. Carry around a pad and pencil, you'll have twenty or thirty names by the end of the day - George Carlin
Awasu 2.1.1 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Does anyone know of a good reference for this task?
I'm finally able to pull my development head out of the sand and look at the VS 2005 (beta 2), and I was blown away by the added complexity of doing something as simple as putting a few fields on a form (what ever happened to dialogs???) and then display a message. (AfxMessageBox? What's that??????)
|
|
|
|
|
Brad Bruce wrote:
AfxMessageBox? What's that??????
System::MessageBox::Show()
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Yeah, it took 10 minutes to find that one.
I'm leading a team of developers and hope to find a concise set of migration notes. (What's been replaced with what, new though processes etc.)
From what I've seen, the migration won't be easy. If VC++ is so different between version, no wonder C# is getting so much attention....
|
|
|
|
|
I am no expert so I may be talking out of turn but AfxMessageBox is a MFC function while anything with System::... is a .NET managed extension. Maybe if you turned off managed extensions (/clr if I am correct) things will work better for you.
If VC2005 does not include support for MFC I will definitely not be upgrading from VC6.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
The express edition does NOT come with MFC.
I'm waiting for the download to finish for the regular version of VS 2005 (b2) to download.
|
|
|
|
|
upgrade to standard version or team system.
http://blog.joycode.com/jiangsheng
http://blog.csdn.net/jiangsheng
Command what is yours
Conquer what is not
---Kane
|
|
|
|
|
We work previously with Visual C++ 6.0 and the dialog box wizard to create basic control works fine. We bought Visual C++ .net Standard and now the dialog box wizard does not work.
Is it the limitation between the standard and the professional version or is there an update to fix that?
Thanks a lot
Benoit
|
|
|
|
|
There is no class wizard in the .net series of visual studio, all is done in the property window (AFAIK )
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
When I right click on a dialog ressource (edit control for example) I have a menu to "add a variable". This menu opens a wizard to generate codes for this control ("Welcome to the Add Member Variable Wizard ").
Benoit
|
|
|
|
|
I have downloaded and used:-
<big>simples.c - Simple TCP/UDP server using Winsock 1.1</big> Now I have built and run a Client and Server Win32 Console application using this sample using my data structure. But problem with using the same code in a worker thread of a MFC application.
The following line causes problems:-
char *interface= NULL;
It generates the following errors:-
c:\ExampleDlg.cpp(214): error C2332: 'struct' : missing tag name
c:\ExampleDlg.cpp(214): error C2011: '__unnamed' : 'enum' type redefinition
c:\ExampleDlg.cpp(214): warning C4518: '__unnamed ' : storage-class or type specifier(s) unexpected here; ignored
c:\ExampleDlg.cpp(214): error C2059: syntax error : '='
Whats the solution to this problem please anyone?
|
|
|
|
|
May be the download stuff itself got some bugs in !!!
May I know what you trying to do?
|
|
|
|
|
Just want to receive a packet of data from another application on another PC. So I will be the Server.
The Microsoft sample works fine (as a console application), but its when you try and use the code in an MFC application get these errors.
|
|
|
|
|
I use NDK from the link below,
http://www.codeproject.com/internet/ndk.asp?df=100&forumid=1156&exp=0&select=756975
it's just nice;P
|
|
|
|
|
Try looking at CAsyncSocket or CSocket. Also it would be better to make your thread a UI thread so that it can receive events on the socket. Also if you do it that way it is better to create the socket in each thread.
Take a look at Joseph Newcomer's website about threads and sockets.
[^]
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
Hi! I wanna implement a simple web client using winsock. It can connect to any kind of HTTP servers (such as Apahce on Linux, IIS,....etc).
I also hope I can limit the bandwidth for each connection. I check the document (MSDN) that WSAConnect() provide the parameter (LPQOS lpSQOS) which can specify some properties of QoS including Bandwidth limitation. I write my code as follows:
QOS clientQos;
FLOWSPEC flowspec_guaranteed = {13000,
1260,
13000,
QOS_NOT_SPECIFIED,
QOS_NOT_SPECIFIED,
SERVICETYPE_GUARANTEED,
340,
340};
void InitQos()
{
clientQos.SendingFlowspec = flowspec_guaranteed;
clientQos.ReceivingFlowspec = flowspec_guaranteed;
clientQos.ProviderSpecific.buf = NULL;
clientQos.ProviderSpecific.len = 0;
}
main()
{
SOCKET s;
........
WSADATA WSAData;
err = WSAStartup(MAKEWORD(2,2), &WSAData);
s =Socket(AF_INET, SOCK_STREAM, proto);
.............
WSASetLastError(0);
returnval = WSAConnect(s, (SOCKADDR *)&sin, sizeof(sin), NULL, NULL, &clientQos, NULL);
if (returnval == SOCKET_ERROR)
{
j=WSAGetLastError();
closesocket(s);
}
while(....)
{
Send(s,.....);
}
while(....)
{
Recv(s,.....);
}
closesocket(s);
}
However, My program still send and receive data as soon as possible with the server (Apache Server) and I didn't get any error at all. It seems there is no bandwidth limit at all. Is there something I miss? Or It actually doesn't work at all and I go in the wrong way? Thanks a lot!
|
|
|
|
|
QOS is designed to ensure a min amount of bandwidth for a channel, not a max.
What is the effect you are trying to achieve ?
...cmk
Save the whales - collect the whole set
|
|
|
|
|
I have a data type from class CLine which is derived from a
CObject.
since this line will not compile:
extern "C" __declspec(dllexport)void LineSerialize(CArchive& ar, CLine* pLine)
I changed it to:
extern "C" __declspec(dllexport)void LineSerialize(CArchive& ar, CObject* pLine)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CLine* lLine;
lLine = (CLine*)(CObject*)pLine;
lLine->Serialize(ar);
}
but it does not look so elegant to me. is this OK?
Thanks a lot,
Odie
|
|
|
|
|
it looks ok.
You dont need to cast to CObject though
This line
lLine = (CLine*)(CObject*)pLine;
could be
lLine = (CLine*)pLine;
Off the top of my head I think Serialize is a virtual method of CObject so you dont need to cast at all. You could just have
extern "C" __declspec(dllexport)void LineSerialize(CArchive& ar, CObject* pLine)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
pLine->Serialize(ar);
}
|
|
|
|
|
Thanks for the quick
reply!
it did it!
|
|
|
|