Thread View: comp.os.os2.programmer
2 messages
2 total messages
Started by Jay Field
Tue, 30 Oct 1990 22:32
Minimize a dialog box, get an icon?
Author: Jay Field
Date: Tue, 30 Oct 1990 22:32
Date: Tue, 30 Oct 1990 22:32
24 lines
1431 bytes
1431 bytes
Does anyone know how to associate an icon with a dialog box? The dialog box was created with the DLGBOX editor and I included a MINIMIZE button. I have tried all combinations of FS_ICON and FCF_ICON and POINTER statements, but I still can't get the icon associated with the minimized dialog box. Any ideas would be greatly appreciated. I am running IBM 1.2 EE on a PS/2, using MS C 6.0 and the MS toolkit. (I am able to associate an icon with the Frame Window created with WinCreateStdWindow. After that is created, a dialog box appears in response to a pull-down menu choice. When that dialog box is minimized, the name from the dialog box title and some 'garbage' appear at the bottom of the client window created with WinCreateStdWindow. What I want is to get my icon for the dialog box to appear instead of the garbage (default icon?) that appears now.) Many thanks in advance, Jay Field Research Libraries Group (415) 691-2215
Re: Minimize a dialog box, get an icon?
Author: lsalomo
Date: Wed, 31 Oct 1990 17:38
Date: Wed, 31 Oct 1990 17:38
49 lines
2293 bytes
2293 bytes
From article <1990Oct30.223224.27196@morrow.stanford.edu>, by BR.JWF@forsythe.stanford.edu (Jay Field):
> Does anyone know how to associate an icon with a dialog box?
> The dialog box was created with the DLGBOX editor and I included
> a MINIMIZE button. I have tried all combinations of FS_ICON
> and FCF_ICON and POINTER statements, but I still can't get
> the icon associated with the minimized dialog box. Any ideas
> would be greatly appreciated.
Note that this has been fought over and over again by OS/2 users. This was
answered by saying that a dialog box is NOT a frame and should NOT have support
for such items as a sizing border, an icon, etc. If you want this, you have to
do it manually:
MRESULT EXPENTRY myDlgProc(HWND hwnd,USHORT msg,MPARAM mp1,MPARAM mp2)
{
switch (msg) {
case WM_INITDLG:
{
HPOINTER hIcon;
/******************************
Note that we don't have to check for NULL,
because WinDefDlgProc processing for WM_SETICON
will take care of it.
******************************/
hIcon=WinLoadPointer(...);
WinSendMsg(hwnd,WM_SETICON,MPFROMP(hIcon),0L);
}
break;
:
default:
return WinDefDlgProc(hwnd,msg,mp1,mp2);
} /* endswitch */
return (MRESULT)FALSE;
}
I haven't tried doing this in a while (I have since gotten on the CUA kick in
a BIG way) so I'm not POSITIVE that the above code will work, but I think it
is correct (or extremely close to being correct).
Cheers,
Q - the "Q"uestor for knowledge (, a degree, etc.)
lsalomo@hubcap.clemson.edu
ibmman@clemson.clemson.edu
=============================================================================
"Gee Wally, I think there's something wrong with the Beaver."
=============================================================================
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads