Click here to Skip to main content
15,892,965 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Cstatic Button Pin
vasu_sri18-Oct-10 18:46
vasu_sri18-Oct-10 18:46 
Questionmessagebox not showing? Pin
AmbiguousName17-Oct-10 6:06
AmbiguousName17-Oct-10 6:06 
AnswerRe: messagebox not showing? Pin
Richard MacCutchan17-Oct-10 7:29
mveRichard MacCutchan17-Oct-10 7:29 
AnswerRe: messagebox not showing? Pin
Iain Clarke, Warrior Programmer17-Oct-10 10:09
Iain Clarke, Warrior Programmer17-Oct-10 10:09 
AnswerRe: messagebox not showing? Pin
Moak17-Oct-10 10:29
Moak17-Oct-10 10:29 
AnswerRe: messagebox not showing? Pin
«_Superman_»17-Oct-10 19:48
professional«_Superman_»17-Oct-10 19:48 
QuestionReusing C++ code for use with .NET (WPF) Pin
Arivanna16-Oct-10 10:08
Arivanna16-Oct-10 10:08 
AnswerRe: Reusing C++ code for use with .NET (WPF) Pin
Paul Michalik17-Oct-10 0:09
Paul Michalik17-Oct-10 0:09 
Huch, this is a huge topic and could take hours if not days to discuss... I try to comment some of the points you've made.

If I host WPF content (created in C#\.NET) in a Win32 window so that I can reuse the C++ code, I encounter many loader lock issues.

First, decide which way around you are going to interoperate. You have tried to embedd WPF content in Win32 windows. Then you (or the WPF itself) probably tried to embedd other (or probably the same) native Win32 content in the same WPF control which can lead to loader locks, since a safe recursive binding of this kind is hard to ensure. I recommend fixing the direction of interoperability once and for all times: The best choice is to let a WPF application be the master - then you can safely embedd Win32 native content including Direct3D, WinForms or whatever. Usage of Win32 or WinForms content in the WPF is well documented and supported on MSDN and in other WPF related sources since this is the intended way to do it.

On the other hand I could also create a C++ DLL and load this in my WPF application, however creating a C++\CLI interface for the existing code also appears to be challenging and time consuming.

But this is the only clean way to do it. It is also the intended way to do it, therefore it is quite well documented and has been subject to many articles and whole chapters of various WPF related books. I recommend reading on that a bit, it is not hard and can be automated to some extent.

Cheers,

Paul
GeneralRe: Reusing C++ code for use with .NET (WPF) Pin
Arivanna17-Oct-10 9:12
Arivanna17-Oct-10 9:12 
GeneralRe: Reusing C++ code for use with .NET (WPF) Pin
Paul Michalik18-Oct-10 7:28
Paul Michalik18-Oct-10 7:28 
GeneralRe: Reusing C++ code for use with .NET (WPF) Pin
Iain Clarke, Warrior Programmer17-Oct-10 10:06
Iain Clarke, Warrior Programmer17-Oct-10 10:06 
QuestionStrange Windows Timer Behavior Pin
softwaremonkey16-Oct-10 5:47
softwaremonkey16-Oct-10 5:47 
AnswerRe: Strange Windows Timer Behavior Pin
Cedric Moonen16-Oct-10 6:05
Cedric Moonen16-Oct-10 6:05 
GeneralRe: Strange Windows Timer Behavior Pin
softwaremonkey16-Oct-10 6:52
softwaremonkey16-Oct-10 6:52 
GeneralRe: Strange Windows Timer Behavior Pin
SAMZC16-Oct-10 23:55
SAMZC16-Oct-10 23:55 
QuestionQuestion on how to traverse this array Pin
Keith Vitali16-Oct-10 5:08
Keith Vitali16-Oct-10 5:08 
AnswerRe: Question on how to traverse this array Pin
Graham Shanks16-Oct-10 7:57
Graham Shanks16-Oct-10 7:57 
GeneralRe: Question on how to traverse this array Pin
Keith Vitali16-Oct-10 8:57
Keith Vitali16-Oct-10 8:57 
GeneralRe: Question on how to traverse this array Pin
Keith Vitali16-Oct-10 10:39
Keith Vitali16-Oct-10 10:39 
GeneralRe: Question on how to traverse this array Pin
Graham Shanks16-Oct-10 10:43
Graham Shanks16-Oct-10 10:43 
GeneralRe: Question on how to traverse this array Pin
Keith Vitali16-Oct-10 11:29
Keith Vitali16-Oct-10 11:29 
AnswerRe: Question on how to traverse this array Pin
Aescleal16-Oct-10 22:31
Aescleal16-Oct-10 22:31 
Questionhow can I learn?? Pin
AmbiguousName16-Oct-10 1:32
AmbiguousName16-Oct-10 1:32 
AnswerRe: how can I learn?? Pin
Niklas L16-Oct-10 3:01
Niklas L16-Oct-10 3:01 
GeneralRe: how can I learn?? Pin
AmbiguousName16-Oct-10 10:37
AmbiguousName16-Oct-10 10:37 

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.