| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Making a PM Window |
On Wednesday October 11 1995 at 00:48, Craig Reynolds wrote to All:
CR> Well thats the code, the exact errors emx spits out are:
CR> pointer type .\ccc00110: Undefined symbol _wm_init referenced from
CR> text segment .\ccc00110: Undefined symbol _wm_create referenced from
CR> text segment .\ccc00110: Undefined symbol _wm_open referenced from
CR> text segment
Considering that those functions don't exist in the OS/2 API, it's not suprising...
You will need to get a copy of the OS/2 toolkit to create any usful PM program.
Try this:
=== Hellopm.c ====
#define INCL_WIN
#define INCL_GPI
#include
#define resIcon 2
MRESULT EXPENTRY ClientProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
HAB hab;
HWND hwndFrame;
HWND hwndClient;
char szTitle[64];
MRESULT EXPENTRY ClientProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
{
HPS hps;
BOOL Handled = FALSE;
MRESULT retcode = 0;
switch (msg)
{
case WM_PAINT:
hps = WinBeginPaint(hwnd, 0, 0);
WinEndPaint(hps);
retcode = 0;
Handled = TRUE;
break;
case WM_ERASEBACKGROUND:
retcode = TRUE;
Handled = TRUE;
break;
default:
Handled = FALSE;
break;
}
if (Handled == FALSE)
{
retcode = WinDefWindowProc(hwnd, msg, mp1, mp2);
}
return(retcode);
}
int main ()
{
HMQ hmq;
QMSG qmsg;
ULONG frameflags = FCF_TITLEBAR | FCF_SYSMENU | FCF_HIDEBUTTON |
FCF_MAXBUTTON | FCF_MINBUTTON | FCF_TASKLIST | FCF_SHELLPOSITION |
FCF_SIZEBORDER | FCF_ICON;
// yes, folks, you can have hide, minimize AND maximize on your title bar.
char szClientClass[] = "CLIENT";
hab = WinInitialize(0); // get anchor block
hmq = WinCreateMsgQueue(hab, 0); // create a message queue
WinLoadString(hab, 0, 1, sizeof(szTitle), szTitle); // load title string
from resources
WinRegisterClass(hab, szClientClass, (PFNWP)ClientProc, 0, 0); // register
the windowproc for the client window
hwndFrame = WinCreateStdWindow(HWND_DESKTOP, WS_VISIBLE, &frameflags,
szClientClass, szTitle, 0, 0, resIcon, &hwndClient); // create the
window
while(WinGetMsg(hab, &qmsg, 0, 0, 0)) // message queue loop. Don't
do any processing here!
{
WinDispatchMsg(hab, &qmsg);
}
WinDestroyWindow(hwndFrame); // clear up
WinDestroyMsgQueue(hmq);
WinTerminate(hab);
return(0);
}
=== end ===
=== hellopm.rc ===
#include
ICON 2 D:\Icons\clamp3.ico
STRINGTABLE LOADONCALL
BEGIN
1 "PMTEST"
END
=== end ===
--- GoldED/2 2.42.G0615
* Origin: MANANA NETWORK: PEEPLES FOR HAYZEAUS...AFTER SIESTA. (1:250/820)SEEN-BY: 270/101 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407 SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809 @PATH: 250/820 501 99 3615/50 396/1 270/101 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.