getting Win32 Messagebox to work
    Mark Moorhen 
    Mark at Moorhen.com
       
    Fri Oct 26 13:13:07 UTC 2018
    
    
  
On Friday, 26 October 2018 at 13:04:21 UTC, Adam D. Ruppe wrote:
> On Friday, 26 October 2018 at 12:56:21 UTC, rikki cattermole 
> wrote:
>> MessageBoxA(null, cast(const(char)*)content.ptr, 
>> cast(const(char)*)"Window title".ptr, 0);
>
> Get rid of those casts, they are unnecessary.
I got to this:
	string content = "Some random content.";
	const(char)* content2 =  content.ptr;
         MessageBox(NULL, content2 , "Window title", 0);
But how would you do this without casts?
    
    
More information about the Digitalmars-d-learn
mailing list