Currently viewing: GipsySoft » Front Page» Articles

GSMessageBox - Absolute position

The code

GSMSGBOX msg = { 0 };
	msg.cbSize = sizeof( msg );
	msg.uFlags = GS_MSGBOX_SET_POS; = 100; = 100;
 	(void)GSMessageBox( NULL
			, _T("Set the absolute position of the message box")
			, _T("Caption")
			, &msg );


All we do is declare an appropriate structure, set some values and then call the API.

  • If the point given is outside the visible display area, or part of the resulting message box would be then the position is altered to ensure the entire dialog is displayed.