Click here to Skip to main content
15,881,867 members
Home / Discussions / C#
   

C#

 
GeneralEnvironment variable Pin
cfl12-Jan-04 22:03
cfl12-Jan-04 22:03 
GeneralRe: Environment variable Pin
mylitziname12-Jan-04 23:33
mylitziname12-Jan-04 23:33 
GeneralRe: Environment variable Pin
Heath Stewart13-Jan-04 5:15
protectorHeath Stewart13-Jan-04 5:15 
GeneralRe: Environment variable Pin
cfl13-Jan-04 15:42
cfl13-Jan-04 15:42 
General.NET version dependent compilation Pin
brain2cpu12-Jan-04 21:09
professionalbrain2cpu12-Jan-04 21:09 
GeneralRe: .NET version dependent compilation Pin
Heath Stewart13-Jan-04 5:12
protectorHeath Stewart13-Jan-04 5:12 
QuestionDragDrop to a native window? Pin
TuringTest112-Jan-04 19:20
TuringTest112-Jan-04 19:20 
AnswerRe: DragDrop to a native window? Pin
Heath Stewart13-Jan-04 5:07
protectorHeath Stewart13-Jan-04 5:07 
Drag and drop is not trivial to implement. .NET exposes this in a rather easy-to-use method that encapsulates all the native functions, interfaces, structs, and enums/constants. As you can see, though, not every control in .NET supports drag and drop, either. There is a lot that has to be done in order to do this for native windows. There is more documentation in the Platform SDK at http://msdn.microsoft.com/library/en-us/dnanchor/html/anch_WinShell.asp[^]. Specific interfaces and functions to look at are IDropSource, IDropTarget, IDataOject, and DoDragDrop. These are all from the Platform SDK, not the .NET Framework SDK (I only mentioned because a couple of these have similarly named equivalents in both). Those four interfaces and functions - along with the documentation about them - should be enough to get you started.

On a side note, so long as the clipboard formats are supported by both the drag source and the drop target - regardless whether either one is managed or native - and the data is formatted correctly you can drag and drop between windows.

Finally, if you are looking to add drag-n-drop support to your native Windows, first read about the Windows Shell and drag-n-drop interfaces from the link I gave you and continue in the Visual C++ or ATL/WTL/STL forum.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: DragDrop to a native window? Pin
TuringTest113-Jan-04 5:55
TuringTest113-Jan-04 5:55 
Generalasking for system tray application Pin
azusakt12-Jan-04 16:25
azusakt12-Jan-04 16:25 
GeneralRe: asking for system tray application Pin
Jeff Mackie12-Jan-04 17:16
sussJeff Mackie12-Jan-04 17:16 
GeneralRe: asking for system tray application Pin
azusakt12-Jan-04 17:51
azusakt12-Jan-04 17:51 
GeneralRe: asking for system tray application Pin
Heath Stewart13-Jan-04 4:53
protectorHeath Stewart13-Jan-04 4:53 
Questionreturning when inside a lock - is it safe? Pin
Brandon Haase12-Jan-04 15:29
Brandon Haase12-Jan-04 15:29 
AnswerRe: returning when inside a lock - is it safe? Pin
Heath Stewart13-Jan-04 4:46
protectorHeath Stewart13-Jan-04 4:46 
GeneralRe: returning when inside a lock - is it safe? Pin
Brandon Haase13-Jan-04 16:13
Brandon Haase13-Jan-04 16:13 
AnswerRe: returning when inside a lock - is it safe? Pin
scadaguy13-Jan-04 5:23
scadaguy13-Jan-04 5:23 
GeneralRe: returning when inside a lock - is it safe? Pin
Brandon Haase13-Jan-04 16:28
Brandon Haase13-Jan-04 16:28 
Generalremoting access Pin
haih12-Jan-04 15:23
haih12-Jan-04 15:23 
GeneralRe: remoting access Pin
Heath Stewart13-Jan-04 4:31
protectorHeath Stewart13-Jan-04 4:31 
GeneralHelp with MonthCalendar class Pin
KingTermite12-Jan-04 15:18
KingTermite12-Jan-04 15:18 
GeneralRe: Help with MonthCalendar class Pin
Heath Stewart13-Jan-04 3:41
protectorHeath Stewart13-Jan-04 3:41 
GeneralRe: Help with MonthCalendar class Pin
KingTermite13-Jan-04 4:27
KingTermite13-Jan-04 4:27 
GeneralRe: Help with MonthCalendar class Pin
Heath Stewart13-Jan-04 4:37
protectorHeath Stewart13-Jan-04 4:37 
GeneralRe: Help with MonthCalendar class Pin
KingTermite13-Jan-04 5:43
KingTermite13-Jan-04 5:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.