strngs are not printing properly 
Author Message
 strngs are not printing properly

Hi All
I am using eVC 3.0 and Pocket PC 2002 emulator.

 MessageBox (NULL,NULL,(const unsigned short *)"Do You
want to continue",MB_YESNO);

The above function do not print the string on MessageBox
as expected, but prints some junk (character sized square
boxes)...

what should I do inorder to print the string properly..

Thanks and Regards
Prasanna Kumar



Sun, 01 May 2005 17:42:28 GMT  
 strngs are not printing properly

Quote:
>  MessageBox (NULL,NULL,(const unsigned short *)"Do You
> want to continue",MB_YESNO);

> The above function do not print the string on MessageBox
> as expected, but prints some junk (character sized square
> boxes)...

Try this:
MessageBox (NULL,NULL,L"Do You want to continue",MB_YESNO);
or
MessageBox (NULL,NULL,TEXT("Do You want to continue",MB_YESNO));

JS



Sun, 01 May 2005 20:07:21 GMT  
 strngs are not printing properly

Quote:
>  MessageBox (NULL,NULL,(const unsigned short *)"Do You
> want to continue",MB_YESNO);

you should use UNICODE string insteed of hard (and bad) casting !!

ie : _T("Do You want to continue") or TEXT("Do You want to continue")

but i think you use baddly MessageBox better :

MessageBox(NULL, _T("Do you want to continue"), _T("Application"),
MB_OK | MB_iCONQUESTION) ;

Arnaud.



Mon, 02 May 2005 00:14:51 GMT  
 strngs are not printing properly
Dear Jacek and Arnaud,

  Many many Thanks....

regards
Prasanna Kumar

Quote:
>-----Original Message-----
>Hi All
>I am using eVC 3.0 and Pocket PC 2002 emulator.

> MessageBox (NULL,NULL,(const unsigned short *)"Do You
>want to continue",MB_YESNO);

>The above function do not print the string on MessageBox
>as expected, but prints some junk (character sized square
>boxes)...

>what should I do inorder to print the string properly..

>Thanks and Regards
>Prasanna Kumar
>.



Mon, 02 May 2005 12:29:36 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. CFile not working properly, can't figure out why (last message not sent properly)

2. CStrings, LPCTSTRs and C strngs

3. Tab key to tab between controls does not work properly

4. MC could not handle virtual function properly

5. Internal Error: GDI+ is not properly initialized

6. Scroll bars not working properly

7. AtlReportError not working in ATL 7.0 (Injected code doesn't handle ErrorInfo properly)

8. Dialog Boxes not appearing properly

9. Functions of Program do not execute properly

10. Links not working properly in the Object Browser

11. mouse_event for mouse move is not working properly.

12. Controls do not position properly at run time.

 

 
Powered by phpBB® Forum Software