one small step for two big apps
Philip Beck -- splinta@cix.compulink.co.uk
Saturday, January 18, 1997
Enviroment: Visual C++ 4.0, Win95
My app is a fixed size window completely covered by a single bitmap with
exactly the same dimensions - no border should be visible. I have two
different versions of it. One based on the doc/view architecture and the
other based on an app wizard generated dialog app.
Both versions are held back by different single problems. The doc/view
app has a border around it that I can't get rid of. I've tried all
combinations of
cs.dwExStyle&=~WS_EX_WINDOWEDGE;
cs.dwExStyle&=~WS_EX_CLIENTEDGE; etc...
but either mfc or 95 is forcing it on me.
My dialog app has no border problem but needs idle processing. All I want
is for a certain function to get called in the main CMyDlg at idle time.
I have had to use a timer so far but the results have been terrible due
to the fact that a seperate sequencer is recording at the same time.
Can anyone throw light on either problem.
Phil.
C. Zhang -- cz17309@goodnet.com
Sunday, January 19, 1997
[Mini-digest: 5 responses]
Check out the message WM_ENTERIDLE which is sent when the dialog box is
idle.
Philip Beck wrote:
>
> Enviroment: Visual C++ 4.0, Win95
>
> My app is a fixed size window completely covered by a single bitmap with
> exactly the same dimensions - no border should be visible. I have two
> different versions of it. One based on the doc/view architecture and the
> other based on an app wizard generated dialog app.
>
> Both versions are held back by different single problems. The doc/view
> app has a border around it that I can't get rid of. I've tried all
> combinations of
>
> cs.dwExStyle&=~WS_EX_WINDOWEDGE;
> cs.dwExStyle&=~WS_EX_CLIENTEDGE; etc...
> but either mfc or 95 is forcing it on me.
>
> My dialog app has no border problem but needs idle processing. All I want
> is for a certain function to get called in the main CMyDlg at idle time.
> I have had to use a timer so far but the results have been terrible due
> to the fact that a seperate sequencer is recording at the same time.
>
> Can anyone throw light on either problem.
>
> Phil.
-----From: "Dmitry A. Dulepov"
[Mailer: "Groupware E-Mail". Version 1.02.055]
> [From: Philip Beck
>
>My app is a fixed size window completely covered by a single bitmap with
>exactly the same dimensions - no border should be visible. I have two
>different versions of it. One based on the doc/view architecture and the
>other based on an app wizard generated dialog app.
>
>Both versions are held back by different single problems. The doc/view
>app has a border around it that I can't get rid of. I've tried all
>combinations of
>
> cs.dwExStyle&=~WS_EX_WINDOWEDGE;
> cs.dwExStyle&=~WS_EX_CLIENTEDGE; etc...
>but either mfc or 95 is forcing it on me.
>
These styles are set when you have some of border styles (i.e. WS_BORDER, WS_THICKFRAME, ...). They set WS_EX_xxxEDGE styles.
Dmitry A. Dulepov
Samsung Electronics Co., Ltd.
Russian Research Center
Phone: +7 (095) 213-9207
Fax: +7 (095) 213-9196
E-mail: dima@src.samsung.ru
====================================
-----From: "Underwood,Roger M."
To remove the border, you must remove the WS_EX_CLIENTEDGE extended
style from both the frame window and the view, as the following code
demonstrates:
// In CMyFrameWnd.cpp
BOOL CMyFrameWnd::PreCreateWindow(CREATESTRUCT& cs)
{
// Call base class
if (!CFrameWnd::PreCreateWindow(cs))
return FALSE;
// Remove the WS_EX_CLIENTEDGE style so toolbars and status bars
// will blend into the window border
cs.dwExStyle &= ~WS_EX_CLIENTEDGE;
// Return a successful pre-creation status
return TRUE;
}
// In CMyFormView.cpp
BOOL CMyFormView::PreCreateWindow(CREATESTRUCT& cs)
{
// Call base class
if (!CFormView::PreCreateWindow(cs))
return FALSE;
// Remove the WS_EX_CLIENTEDGE style so toolbars and status bars
// will blend into the window border
cs.dwExStyle &= ~WS_EX_CLIENTEDGE;
return TRUE;
}
>----------
>From: splinta@cix.compulink.co.uk[SMTP:splinta@cix.compulink.co.uk]
>Sent: Friday, January 17, 1997 9:16 PM
>To: mfc-l@netcom.com
>Cc: splinta@cix.compulink.co.uk
>Subject: one small step for two big apps
>
>Enviroment: Visual C++ 4.0, Win95
>
>My app is a fixed size window completely covered by a single bitmap with
>exactly the same dimensions - no border should be visible. I have two
>different versions of it. One based on the doc/view architecture and the
>other based on an app wizard generated dialog app.
>
>Both versions are held back by different single problems. The doc/view
>app has a border around it that I can't get rid of. I've tried all
>combinations of
>
> cs.dwExStyle&=~WS_EX_WINDOWEDGE;
> cs.dwExStyle&=~WS_EX_CLIENTEDGE; etc...
>but either mfc or 95 is forcing it on me.
>
>My dialog app has no border problem but needs idle processing. All I want
>is for a certain function to get called in the main CMyDlg at idle time.
>I have had to use a timer so far but the results have been terrible due
>to the fact that a seperate sequencer is recording at the same time.
>
>Can anyone throw light on either problem.
>
>Phil.
>
>
>
>
-----From: Joao Marcos Melo Mendes
Hello, :)
On Sat, 18 Jan 1997, Philip Beck wrote:
> Enviroment: Visual C++ 4.0, Win95
> My app is a fixed size window completely covered by a single bitmap with
> exactly the same dimensions - no border should be visible. I have two
> different versions of it. One based on the doc/view architecture and the
> other based on an app wizard generated dialog app.
> Both versions are held back by different single problems. The doc/view
> app has a border around it that I can't get rid of. I've tried all
> combinations of
>
> cs.dwExStyle&=~WS_EX_WINDOWEDGE;
> cs.dwExStyle&=~WS_EX_CLIENTEDGE; etc...
> but either mfc or 95 is forcing it on me.
Sorry, can't help you here, but...
> My dialog app has no border problem but needs idle processing. All I want
> is for a certain function to get called in the main CMyDlg at idle time.
> I have had to use a timer so far but the results have been terrible due
> to the fact that a seperate sequencer is recording at the same time.
> Can anyone throw light on either problem.
Yes, quite. Use your CDialog-derived object's OnEnterIdle.
Joao Mendes
MegaMedia, S.A.
"We're fools to make war on our brothers in arms." - Mark Knopfler
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2
mQBNAzKu3TgAAAECAL8+YSEFZ0XrlBMu9t2xDq3rhpWZoscP83VrX5MevAm3UOd6
fOtDKsJxsWugnVMexo50NfBjeWOHz5nA1b9hYx0ABRG0H0pvYW8gTWVuZGVzIDxq
bW1tQG1lZ2FtZWRpYS5wdD4=
=sspP
-----END PGP PUBLIC KEY BLOCK-----
-----From: Neil Dixon
Phil,
You could try the following.
Stick to your dialog based code but change the following.
Make your dlg member a pointer member variable instead of a local
variable.
In InitInstance do this instead of DoModal .....
// SNIP
dlg = new CMyDialog;
int nResponse = dlg->Create( IDD_MYDIALOG_DIALOG, 0 ); // create
MODELESS rather than Modal()
m_pMainWnd = dlg;
return TRUE; // carry on executing the application
// SNIP
If your dialog has an OnOK() or OnCancel() or some other way to exit the
dialog the add the following line
// SNIP
PostQuitMessage(0);
// SNIP
In ExitInstance of your App call
dlg->DestoyWindow();
in your Dialog add the following
void CMyDialog::PostNcDestroy()
{
delete this;
// DO NOT PUT ANY CODE HERE ( C++s hate this !)
}
Your Applications OnIdle func will now be called and you can post
messages to the Dialog of call public member functions if you wish.
I tested this with a AppWizard generated app add it works OK. I can post
the full source if requested ( 30K bytes )
Hope this is of some help
Neil Dixon
--
neildixon@enterprise.net
NADixon@rce.ricardo.com
>----------
>From: splinta@cix.compulink.co.uk[SMTP:splinta@cix.compulink.co.uk]
>Sent: Saturday, January 18, 1997 3:16 AM
>To: mfc-l@netcom.com
>Cc: splinta@cix.compulink.co.uk
>Subject: one small step for two big apps
>
>Enviroment: Visual C++ 4.0, Win95
>
>My app is a fixed size window completely covered by a single bitmap with
>exactly the same dimensions - no border should be visible. I have two
>different versions of it. One based on the doc/view architecture and the
>other based on an app wizard generated dialog app.
>
>Both versions are held back by different single problems. The doc/view
>app has a border around it that I can't get rid of. I've tried all
>combinations of
>
> cs.dwExStyle&=~WS_EX_WINDOWEDGE;
> cs.dwExStyle&=~WS_EX_CLIENTEDGE; etc...
>but either mfc or 95 is forcing it on me.
>
>My dialog app has no border problem but needs idle processing. All I want
>is for a certain function to get called in the main CMyDlg at idle time.
>I have had to use a timer so far but the results have been terrible due
>to the fact that a seperate sequencer is recording at the same time.
>
>Can anyone throw light on either problem.
>
>Phil.
>
>
>
>
Joao Marcos Melo Mendes -- jmmm@megamedia.pt
Tuesday, January 21, 1997
Hello, :)
On Sat, 18 Jan 1997, Philip Beck wrote:
Environment: Visual C++ 4.0, Win95
> My app is a fixed size window completely covered by a single bitmap with
> exactly the same dimensions - no border should be visible. I have two
> different versions of it. One based on the doc/view architecture and the
> other based on an app wizard generated dialog app.
> Both versions are held back by different single problems. The doc/view
> app has a border around it that I can't get rid of. I've tried all
> combinations of
>
> cs.dwExStyle&=~WS_EX_WINDOWEDGE;
> cs.dwExStyle&=~WS_EX_CLIENTEDGE; etc...
> but either mfc or 95 is forcing it on me.
Sorry, can't help you here, but...
> My dialog app has no border problem but needs idle processing. All I want
> is for a certain function to get called in the main CMyDlg at idle time.
> I have had to use a timer so far but the results have been terrible due
> to the fact that a seperate sequencer is recording at the same time.
> Can anyone throw light on either problem.
Yes, quite. Use your CDialog-derived object's OnEnterIdle.
Joao Mendes
MegaMedia, S.A.
"We're fools to make war on our brothers in arms." - Mark Knopfler
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2
mQBNAzKu3TgAAAECAL8+YSEFZ0XrlBMu9t2xDq3rhpWZoscP83VrX5MevAm3UOd6
fOtDKsJxsWugnVMexo50NfBjeWOHz5nA1b9hYx0ABRG0H0pvYW8gTWVuZGVzIDxq
bW1tQG1lZ2FtZWRpYS5wdD4=
=sspP
-----END PGP PUBLIC KEY BLOCK-----
pjn -- pjn@indigo.ie
Sunday, January 26, 1997
On Sat, 18 Jan 97 03:16 GMT0, you wrote:
>Enviroment: Visual C++ 4.0, Win95
>
>My app is a fixed size window completely covered by a single bitmap with=
=20
>exactly the same dimensions - no border should be visible. I have two=20
>different versions of it. One based on the doc/view architecture and the=
=20
>other based on an app wizard generated dialog app.=20
>
>Both versions are held back by different single problems. The doc/view=20
>app has a border around it that I can't get rid of. I've tried all=20
>combinations of=20
>
> cs.dwExStyle&=3D~WS_EX_WINDOWEDGE;
> cs.dwExStyle&=3D~WS_EX_CLIENTEDGE; etc...
>but either mfc or 95 is forcing it on me.=20
>
>My dialog app has no border problem but needs idle processing. All I =
want=20
>is for a certain function to get called in the main CMyDlg at idle time.=
=20
>I have had to use a timer so far but the results have been terrible due=20
>to the fact that a seperate sequencer is recording at the same time.
>
>Can anyone throw light on either problem.
>
>Phil.
>
If you want to stick with the dialog based version handle the
WM_KICKIDLE function which will give you idle processing.
''' =20
@ @
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
ooO-(_)-Ooo=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+
| PJ Naughter |
| |
| Software Developer Email: pjn@indigo.ie |
| Softech Telecom Tel: +353-1-2958384 |
| Fax: +353-1-2956290 |
| Author of DTime - A Collection URL: http://indigo.ie/~pjn |
| of Date & Time classes for MFC Mail: Cahore, |
| And Ballygarret, |
| Notpad, the best Notepad clone Gorey |
| for Windows 95 and NT 4 Co. Wexford |
| Ireland |
| |
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+
| Вернуться в корень Архива
|