Receive message with GetMessage of type struct and assign it to a variable

0

I have already sent the message to the desired thread through PostThreadMessage and in the lparam parameter I pass the memory address of the structure I want to send:

PostThreadMessage( p->idHilo, WM_USER, 10 , (LPARAM)&estructura);

At the time of receiving I do this:

struct estructura *e;

while(GetMessage( &mensaje, NULL, WM_USER, WM_USER+2)){
    e  =  &mensaje.lParam;
    printf("%c\n",e->miCaracter);
}
    
asked by Alber 21.05.2017 в 00:47
source

0 answers