15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


How Add Passwd Setting In ScreenSaver App Using MFC?

pchen.bbs@conger.neu.edu.cn
Wednesday, October 23, 1996

Environment: VC++ 4.0/Win95

 I programed a screen saver with MFC.It is like the sample  of VC 4.0.
But ,when it runs,the passwd setting in Display ScreenSaver Dialog doesn't
take effect.That is to say,if I press the passwd button,there is nothing  to happen.
My program is programed as follows:

 CWinAppp have a screen window which derivered from Cwnd.
 The Cwnd is set  TOP_MOST and as large as the screen.
 In CwinApp::InitStance(),I first judge the command line argument.
 if argv[1]==_T("p"), then I create screen window as a child window for previdw.

  if argv[1]=_T('s"), then I create the normal screen  window.

 In the CSaverWnd::OnSyscommand(),if ((nID==SC_SCREENSAVE) || (nID==SC_CLOSE) then return;

 else call CWnd::onSysCommdand();

 The CSaverWnd also deal with other message,such as: WM_SETCURSOR, WM_NCACTIVATE,
WM_ACTIVATE,WM_ACTIVATEAPP,WM_MOUSEMOVE,WM_L/RBUTTONDOWN,WM_KEYDOWN,WM_SYSKEYDOWN.

my screen saver run right except there is no password protection.


I debuger it,and found if the password setting button is pressed,the argv[1]
became _T("a").How I can deal with it?

What anything else  I  dont do in CSaverWnd ?


 Help me!
Thanks a lot!



Christian Studer -- cstuder@access.ch
Tuesday, October 29, 1996

Hi,

Check out Lucian Wischik's page on screen savers,
http://classic.physiol.cam.ac.uk/scr/. It's all there.

Greetings,
Christian

> From: pchen.bbs@conger.neu.edu.cn
> To: mfc-l@netcom.com
> Subject: How Add Passwd Setting In ScreenSaver App Using MFC?
> Date: Mittwoch, 23. Oktober 1996 08:45
> 
> Environment: VC++ 4.0/Win95
> 
>  I programed a screen saver with MFC.It is like the sample  of VC 4.0.
> But ,when it runs,the passwd setting in Display ScreenSaver Dialog
doesn't
> take effect.That is to say,if I press the passwd button,there is nothing 
to >happen.





| Вернуться в корень Архива |