Last change
on this file since 2 was 2, checked in by root, 23 years ago |
Initial revision
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
804 bytes
|
Rev | Line | |
---|
[2] | 1 | #define INCL_WIN
|
---|
| 2 |
|
---|
| 3 | #include <os2.h>
|
---|
| 4 | #include <stdlib.h>
|
---|
| 5 | #include <stdio.h>
|
---|
| 6 | #include <string.h>
|
---|
| 7 | #include <stdarg.h>
|
---|
| 8 | #include "fm3dll.h"
|
---|
| 9 | #include "fm3str.h"
|
---|
| 10 |
|
---|
| 11 | #pragma alloc_text(FMINPUT,saymsg)
|
---|
| 12 |
|
---|
| 13 |
|
---|
| 14 | APIRET saymsg (APIRET type,HWND hwnd,CHAR *title,CHAR *string,...) {
|
---|
| 15 |
|
---|
| 16 | CHAR *buffer;
|
---|
| 17 | va_list ap;
|
---|
| 18 | APIRET ret;
|
---|
| 19 |
|
---|
| 20 | buffer = malloc(4096);
|
---|
| 21 | if(!buffer) {
|
---|
| 22 | WinMessageBox(HWND_DESKTOP,
|
---|
| 23 | HWND_DESKTOP,
|
---|
| 24 | GetPString(IDS_OUTOFMEMORY),
|
---|
| 25 | title,
|
---|
| 26 | 0,
|
---|
| 27 | MB_ENTER);
|
---|
| 28 | return -1;
|
---|
| 29 | }
|
---|
| 30 | va_start(ap,string);
|
---|
| 31 | vsprintf(buffer,string,ap);
|
---|
| 32 | va_end(ap);
|
---|
| 33 | if(!hwnd)
|
---|
| 34 | hwnd = HWND_DESKTOP;
|
---|
| 35 | ret = WinMessageBox(HWND_DESKTOP,hwnd,buffer,title,
|
---|
| 36 | 0,type | MB_MOVEABLE);
|
---|
| 37 | free(buffer);
|
---|
| 38 | return ret;
|
---|
| 39 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.