Article View: cn.bbs.comp.program
Article #1089VC FAQ(1)
From: �ϵ�
Date: Sun, 19 Apr 1998 00:00
Date: Sun, 19 Apr 1998 00:00
308 lines
16830 bytes
16830 bytes
2m������:m TMN (������)
2m�� ��:m RAD
2m�� ��:m VC FAQ(1)
2m����վ:m '3m�Ͻ�ɺ�m' (Wed Apr 8 08:11:27 1998) , 5mվ���ż�m
[������ҳ] [����������] [ȫ��������]
�йر��ġ�
�����ռ��˱����й�Visual
C++��MFC��̷�����й����⣬���ݲμ������
���� ��1996.8.24
----------------------------------------------------- ----------------
������
11. VC1.5��������һ����?
12. ΪʲôVC++2.0��ʹ���ļ��Ի��������?
13. ��VC++1.5�����newһ��������?
14. ��VC1.5�У���εõ��Ӵ������������е������ꣿ
15. VC1.5 ��ε��ý��?
16. VC++1.5��Win3.1�����ܷ�ʵ��ȫ����ת?
17. �����DLL���Զ��崰��?
18. �����TOOLTIP��������?
------------------------------------------------------------------------
������: maq@SMTH ('ma:kju:), ����: Program
�� ��: Re: VC1.5��������һ����?
> ==> xbl (xbl) �ᵽ:
> > ��λ��Ϻ: CWinApp::InitInstance()�п�֪�ǵڶ�����,�������return
> FALSE;
> > ֮ǰFindWindow()����һ������? ��Ҫ������:
> > 1).����������ɷ�õ� ( ������==MainFrame ? ����,��֪MainFrame��
��?
> > 2).Title�����ĵ���, ��һ��ȷ����.
==> maq@SMTH ('ma:kju:) �ᵽ:
> > 1. �����Ƕ�̬�ģ�����Ӧ�ò��õ�������֪�Ƿ���ˣ���
> ���� �����Ƕ�̬�ģ���������? MFC ����ʹ�� AfxFrameOrView Ϊ����
ֻ�� MainFrame, �� View �ȵȲŻ��� AfxFrameOrView,
�Ҹ��� spy �����ҵ�һ�����������ڵ�Class Ϊ Afx:b:13ce:6:3be7
> ���� �������ע���Լ�������࣬�һ�û��ѧ�ᣬ�����ָ�̡�
AfxRegisterWndClass()
> > 2. ���õķ�����ֻ��Title��ǰ�벿�ֺ����Ҫ��һ�¼��ɣ����Ժ�����ĵ�
à
�
> ���� FindWindow() ������Ҫ��������ʹ��ڱ��⣨Title������֪��������
> ���� ����ֻ��ǰ�벿�ֵģ�
��EnumWindows()һ������һ�����ڲ飬������ FindWindow()
> ���� ������������һ�����⣺
> ���� �ҵ���һ����Ĵ��ں���μ�����ʹ���Ϊ��ǰ���ڣ�
> ���� ��С״̬ʱ�����ܰ�������������Ҳ��û�ж�������֪�ιʣ���
if (IsIconic(hwndMain))
ShowWindow(hwndMain, SW_RESTORE);
else
SetActiveWindow(hwndMain);
------------------------------------------------------------------------------.
������: maq@SMTH ('ma:kju:), ����: Program
�� ��: Re: ����VC++2.0��ʹ���ļ��Ի��������
==> neul@SMTH (��Ѧ) �ᵽ:
> ��VC++2.0��ʹ���˱��ļ��Ի����Ժ�,�������Ӷ�����ͨ��,
> ����ʹ��Ctrl+F5ִ��EXE�ļ�Ҳ��ȫ��,����һ����F5���Խ���
> ʹ�øöԻ���Ĵ���ʱ,Win95�ͻ��쳣��ֹ,���ʸ�λ����,Ϊʲ
> ô?
�ļ��Ի��ı���ִ�г���ĵ�ǰ·�����Ӷ�����˵���ϵͳ��
�����Ϊ�˵��ԣ�����ʹ�ļ��Ի���λ�ڵ�ǰĿ¼����������ʱ
��Ҫ�����иı�Ŀ¼��
------------------------------------------------------------------------------.
������: Cliff (KK), ����: Program
�� ��: �����VC2.0���Edit����64K����
��Ҫ�� VC2.0 ��дһ�� Editor, Ҫ���ܱ༭���� 64K ���ı�.
�ҵ� Edit ��� CEdit ��������� , ���༭���� 64K ���ı�����ʾ
������. ԭ֪���� VC1.5 �� CEdit ��ֻ�ܱ༭С�� 64K ���ı�,
��֪ VC2.0 �Ƿ�Ҳһ��?
.
====> ������: Tintori (��į��ͽ ����: Program
�Լ���CWnd����������ڴ桢���롢��ʾ�ȣ���ʵ���ۣ������ڴ�
CEdit��������Ҳû��ͷ����
===> ������: midi (�Ե�), ����: Program
VC2.0�������£���û�Թ��Ҳ����š�VC2.0��������Win95��Windows
NT �ϵĿ������ߣ���Win32�Ŀ������ߡ�Windows 95��NT��Ӧ�ó�����
�ڴ���û�жε����ƣ�Ӧ�ó����������øߴ�4G���ڴ�(����ϵͳռ��)��
����˵�����ƴ����VC1.5�����ưɡ�����VC1.5������Win16�ϣ�ÿ����
���ܳ���64K��
===> ������: Cliff (KK), ����: Program
��ȷ��ˣ�VC2.0 ���������� samples\mfc\multipad �� samples\mfc\
superpad Ҳ����ˡ������㿴����
---------------------------------------------------------------------------
������: bearcat (��è), ����: Program
�� ��: ��VC++1.5�����newһ��������
��������VC++1.5���ʱ��newһ��[512][512]�Ĵ����飬ȴ���Dz��У�
��λר�ҿ���ָ��һ�£�
====> ������: netbug (����������), ����: Program
ѡ��Larger and Hugerģʽ�Ŀ����
====> ������: bearcat@SMTH (��è), ����: Program
���ù�Largeģʽ��������ѽ��
����Hugeģʽ��ͷ�ļ�����ʱ�ͳ����ˣ�
====> ������: logitech (mousenet), ����: Program
VC++ 1.5 �Ͼ���16��, 512*512 �Ƕ��٣�
���������
�������VC++2.0, ȫ32λ�Ͳ�������������
====> ������: sorrow (������), ����: Program
�������������ʮ�ֺ�,Ҫ������˴���ڴ������ȫ�ֵ��ڴ���亯��.
ֱ����ָ�����,Ч��Ҳ�����.
====> ������: yingwu@SMTH (�����п�), ����: Program
��MFC�����?��CObArray
====> ������: walklooktalk@SMTH (���߿���˵˵), ����: Program
����GlobalAllocPtr��GlobalFreePtr��һ�Ժ������£�
DWORD dwSize ;;
hpsStr =(char huge *)GlobalAllocPtr( GMEM_MOVEABLE , dwSize ) ;
..
GlobalFreePtr( hpsStr ) ;
���ܶ�����飬����֤û�����⡣
------------------------------------------------------------------------------.
������: lisa@SMTH (��������), ����: Program
�� ��: [ת��] VC1.5 ���
��VC1.5�У���εõ��Ӵ������������е������ꣿ
====> ������: walklooktalk@SMTH (���߿���˵˵), ����: Program
�Ƚϱ��ķ�������ClientToScreenת����Ļ���,Ȼ��
ScreenToClientת�����������,��֪��û�и��ķ���.
====> ������: ming@SMTH (����), ����: Program
MapWindowPoints(hwndChild, hwndParent, (POINT FAR *)lprc, 2)
lprc ����Ӵ����ڵ����(0,0, width, height)
------------------------------------------------------------------------------.
-
������: Zhaoly@SMTH (�ͳ�̫��), ����: Program
�� ��: VC1.5 ��ε��ý��?
����VC1.52��Windows�����м���ִ��һ������WindowsӦ��
���������ҵij�������Ӧ�ó���ִ������ټ����������
ʵ�֣�
exec( ) �� spawn( )��Windows�����ݣ��������ǿ϶������ˣ�
====> ������: ming@SMTH (����), ����: Program
WinExec()
�����һ�������ǵõ��½�̵������ھ��Ȼ�������ѭ����
ֱ���˾���Ϊ��Ч��
��֪������ʲô��Ư��һЩ���ַ���
====> ������: walklooktalk@SMTH (���߿���˵˵), ����: Program
==> ming@SMTH (����) �ᵽ:
���ʣ���ô�õ���̵������ھ���أ�
====> ������: Zhaoly@SMTH (�ͳ�̫��), ����: Program
��ѽ����Ҳ�������أ�������ִ�е���PSpice for Windows.��WinExec()
��������:
int nWinRun = WinExec("wpspice test.cir", SW_SHOWNORMAL);
������εõ��½�̵������ھ���أ��ܲ��ܽ�ȡ�½�̵���Ϣ��
====> ������: ming@SMTH (����), ����: Program
�������� GetActiveWindow() �Ϳ���.
��Ȼ������win3.1 �²�����....
win95 ������������ľֲ�������,����ֻ�ܵõ����̵߳�Activate Window
��Focus Window,��������������ض���NULL.
������Dz�֪����ô��,alas...
====> ������: IcerFay@SMTH (Zero), ����: Program
�� �� �� �� �� �� �� �� �� �� �� �� д Windows �� Ϣ �� �� .
�� λ �� �� �� �� �� SPY �� Դ �� �� (�� C++ �� Delphi ֮ �� �� Sample ��
�� ).
====>������: playboy@SMTH (challenger), ����: Program
�� ��: Re: VC1.5 ��ε��ý��?
Use "FindWindow()". according to window title, get window handle.
then use Window Declassing method. that is write your own procedure
to process the message you want to capture. "CallWindowProc() is
executed before DefWindowProc()". (sorry can not type chinese now.)
====>������: vampire@SMTH (��Ѫ����), ����: Program
����Vc 4.0 ����_exec, _spawn, �Լ�WinExec��û����ģ�
------------------------------------------------------------------------------.
---
������: Zhaoly@SMTH (�ͳ�̫��), ����: Program
�� ��: VC++1.5��Win3.1�����ܷ�ʵ��ȫ����ת?
====> ������: eagles@SMTH (Ⱥӥ��), ����: Program
setjmp���ɣ���DOS��һ��
====>������: ming@SMTH (����), ����: Program
��Windows API �е� Catch() �� Throw() ���ܻ���Щ��
������Ҳ��֪����setjmp��Щʲô���
====>������: Zhaoly@SMTH (�ͳ�̫��), ����: Program
setjmp ���²���, �����ֻ��������д C ������������д C++ ����!
====>������: walklooktalk@SMTH (���߿���˵˵), ����: Program
�ҵĸо��ǣ�ֻҪ�Ǵ���Σ����Բ��ܺ����Ӧ�õ����ƣ�
�������ġ�
��ʵ����ݶΣ�Ҳ�������ȥ�ġ�
���仰˵����WINDOW�У��������κεط���ֻҪ�����⡣
------------------------------------------------------------------------------.
---
������: walklooktalk@SMTH (���߿���˵˵), ����: Program
�� ��: ��DLL���Զ��崰��
����DLL�������´��ڣ�
class CMyWin:public CWnd
{
public:
CMyWin() ;
} ;
CMyWin::CMyWin()
{
if( !CreateEx( WS_EX_TOPMOST ,
AfxRegisterWndClass( CS_SAVEBITS ) ,
"mywin" , WS_POPUP ,
0 , 0 , 100 , 100 , NULL , NULL ) )
AfxMessageBox( "CreateEx error" ) ;
}
������˭֪����ʲôԭ��˭��DLL���������ƹ�������ͽ̡�ror����
====> ������: BlueStar@SMTH (BlueStar,�س�����!), ����: Program
�Ҽǵ�AfxRegisterWndClass����Ӧ����PreCreateWindow�е���,
�ڹ��캯��������������ƺ�������,��������!
====> ������: w95@SMTH (��������), ����: Program
��C++��DLL������?�������ַ��ѻ���Щ�����ð�?
====> ������: walklooktalk@SMTH (���߿���˵˵), ����: Program
��MFC C�����ǿ�������ͳ��DLL�ġ�ֻҪ���ص�����������¸�ʽ�����ˣ�
#ifdef __cplusplus
extern "C" {
#endif
void __export FAR PASCAL fun() ;
#ifdef __cplusplus
}
#endif
��������ͨMFC����һ��Ȼ���������Ķ�����Ҳ�е��ر�ĵط�
����������ִ�г�����������CreateEx��û���κ����⣬����DLL��
�������⡣����������Ҳֻ������WIN3.1�ϣ���WIN95��ȴ������ִ�С�
------------------------------------------------------------------------------.
-
������: zhangdh@SMTH (Tree), ����: Program
�� ��: �����TOOLTIP��������
ǰ�����и�����������vc4.0��Tooltip��������,����������û����.������
����
�и�����:��Windows 95 Desktop ��������desktop scheme����Tooltipһ��,���Ը�
��
TOOLTIP������ʹ�С.�������������г����Tooltip�������.����ܲ�����ı���.
��Tooltip��Windows 95 Common Control,��Windows
95�ڲ�ʵ��,VC4.0��CTooltip�ಢ��ʵ��Tips����ʾ,����Ҫʵ�����ij�������
Tooltip��������ʾ,��һ���Ѷ�.����ǰ����ͼʵ��Tooltip�Ķ�����ʾ,�����˵�
Toolt.
��ʾʱ�����ҵĺ���,��ʧʱ�����ҵĺ���,������ʾʱȴ��GP����.��������Ϊ���
���ķ����Ǵ�ͷ�Լ�ʵ��Tooltip��.һ����������.��
��
[������ҳ] [����������] [ȫ��������]
--
m;31m�� ��Դ:���Ͻ�ɺ� bbs.njupt.edu.cn��[FROM: pc05.info.njupt]m
--
[m[1;33m�� ��Դ:���ϴ�С�ٺ���Ϣ����վ bbs.nju.edu.cn��[FROM: a507yjh.nju.edu][m
Technical Details
Message-ID:
<3OAiRM$sfE@bbs.nju.edu.cn>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB X-Google-Thread: fc86e,965a9d30ea9e64be,start X-Google-Attributes: gidfc86e,public From: mendy.bbs@bbs.nju.edu.cn (�ϵ�) Subject: VC FAQ(1) Date: 1998/04/19 Message-ID: <3OAiRM$sfE@bbs.nju.edu.cn> X-Deja-AN: 345960005 X-Filename: Programming/M.893022502.A Organization: nju_bbs Newsgroups: cn.bbs.comp.program