Click here to Skip to main content
15,891,184 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: problem extending datetimepicker Pin
N a v a n e e t h28-Sep-09 2:31
N a v a n e e t h28-Sep-09 2:31 
GeneralRe: problem extending datetimepicker Pin
carlo.andreoli28-Sep-09 3:12
carlo.andreoli28-Sep-09 3:12 
GeneralRe: problem extending datetimepicker Pin
N a v a n e e t h28-Sep-09 4:04
N a v a n e e t h28-Sep-09 4:04 
GeneralRe: problem extending datetimepicker Pin
carlo.andreoli28-Sep-09 20:37
carlo.andreoli28-Sep-09 20:37 
QuestionCommunicating with main GUI thread from worker thread Pin
LetsMond15-Sep-09 1:25
LetsMond15-Sep-09 1:25 
AnswerRe: Communicating with main GUI thread from worker thread Pin
N a v a n e e t h15-Sep-09 2:17
N a v a n e e t h15-Sep-09 2:17 
GeneralRe: Communicating with main GUI thread from worker thread Pin
LetsMond15-Sep-09 3:53
LetsMond15-Sep-09 3:53 
GeneralRe: Communicating with main GUI thread from worker thread Pin
N a v a n e e t h15-Sep-09 16:13
N a v a n e e t h15-Sep-09 16:13 
Good to hear that it helped.

If you are interested, another possible method to do cross thread communication is to use SynchronizationContext[^] class. This will do the marshaling and provide a neat way for cross-thread communication.

Here is a sample code.
C++
SynchronizationContext^ context = SynchronizationContext::Current;
Thread^ t = gcnew Thread(gcnew ParameterizedThreadStart(this, &YourForm::Execute));
t->Start(context);

void Execute(Object^ obj)
{
    SynchronizationContext^ context = dynamic_cast<SynchronizationContext^>(obj);
    context->Post(gcnew SendOrPostCallback(this, &YourForm::UpdateUI), "Sample text");
}

void UpdateUI(Object^ obj)
{
   // your UI update code
}
Smile | :)


AnswerRe: Communicating with main GUI thread from worker thread Pin
N a v a n e e t h15-Sep-09 2:25
N a v a n e e t h15-Sep-09 2:25 
AnswerRe: Communicating with main GUI thread from worker thread Pin
dybs15-Sep-09 18:32
dybs15-Sep-09 18:32 
GeneralRe: Communicating with main GUI thread from worker thread Pin
Luc Pattyn15-Sep-09 18:46
sitebuilderLuc Pattyn15-Sep-09 18:46 
GeneralRe: Communicating with main GUI thread from worker thread Pin
dybs15-Sep-09 18:54
dybs15-Sep-09 18:54 
GeneralRe: Communicating with main GUI thread from worker thread Pin
LetsMond23-Sep-09 3:49
LetsMond23-Sep-09 3:49 
GeneralRe: Communicating with main GUI thread from worker thread Pin
Luc Pattyn23-Sep-09 4:01
sitebuilderLuc Pattyn23-Sep-09 4:01 
GeneralRe: Communicating with main GUI thread from worker thread Pin
LetsMond23-Sep-09 4:13
LetsMond23-Sep-09 4:13 
GeneralRe: Communicating with main GUI thread from worker thread Pin
Luc Pattyn23-Sep-09 6:47
sitebuilderLuc Pattyn23-Sep-09 6:47 
GeneralRe: Communicating with main GUI thread from worker thread Pin
LetsMond23-Sep-09 7:20
LetsMond23-Sep-09 7:20 
GeneralRe: Communicating with main GUI thread from worker thread Pin
Luc Pattyn23-Sep-09 6:51
sitebuilderLuc Pattyn23-Sep-09 6:51 
QuestionBitmap-Stride a multiple of 4? [modified] Pin
cherrymotion11-Sep-09 2:29
cherrymotion11-Sep-09 2:29 
AnswerRe: Bitmap-Stride a multiple of 4? Pin
Mark Salsbery11-Sep-09 6:10
Mark Salsbery11-Sep-09 6:10 
QuestionCalling managed function from unmanaged function Pin
santoshkaif8-Sep-09 9:59
santoshkaif8-Sep-09 9:59 
AnswerRe: Calling managed function from unmanaged function Pin
N a v a n e e t h8-Sep-09 16:31
N a v a n e e t h8-Sep-09 16:31 
AnswerRe: Calling managed function from unmanaged function [modified] Pin
santoshkaif8-Sep-09 17:52
santoshkaif8-Sep-09 17:52 
GeneralRe: Calling managed function from unmanaged function Pin
N a v a n e e t h9-Sep-09 5:49
N a v a n e e t h9-Sep-09 5:49 
QuestionRe: Calling managed function from unmanaged function [modified] Pin
santoshkaif9-Sep-09 8:18
santoshkaif9-Sep-09 8:18 

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.