|
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!
|
|
|
|
|
BTW, if I change my select SQL to say something like :
select cast(rawFIX as varchar(4000)) as "rawFIX"
the Open(...) does not raise an exception ....
|
|
|
|
|
MSDN says:The STN_CLICKED notification message is sent when the user clicks a static control that has the SS_NOTIFY style.
Now I add a static control in a dialog box,and I set SS_NOTIFY style.I want to ask whether the STN_CLICKED message is sent or not when I click the static control.I define a function——OnClicked(),which is used to handle with the STN_CLICKED message.But the function is not transfered when I clicked the static control.Why? I need your help.
|
|
|
|
|
How are you trying to catch that notification message? Notifications like BTN_CLICKED and STN_CLICKED are not sent as "normal" Window messages, but contained in the parameters for the WM_COMMAND message.
You should be looking for WM_COMMAND messages, and checking its parameters for the notification you are interested in. Of course, if you are using MFC, just use ClassWizard.
One small note. The STATIC control was not really designed to receive input, so make sure you are not doing something with it that it was not really designed for. (For example, creating a hyperlink control.) If you need imput, use an input control.
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!)
|
|
|
|
|
Hello Friends,
Can anybody suggest me some web sites for Unix tutorials. Programming C and C++ in unix operating systems.
Thanks in advance
Neelesh K J Jain.
|
|
|
|