(1)GetActiveView() returns NULL when called for an MDI main frame window (CMDIFrameWnd). (2)If there is no current view, returns NULL. libo
Intertherain
Posts
-
Is it true that if GetActiveView() returns NULL then Our Application Does not Support Doc/view. -
unexpected end of file while looking for precompiled header directivedelete Debug directory, and delete .clw, .opt, .NCB files. then compile again. libo
-
Sending email in VC++ 6.0http://www.codeproject.com/internet/csmtpconn.asp\[^\] The method that the above site provides may be useful to send e_mail on the old smtp protocol servers. This kind of servers dont need the user name and password when they are connected to send e_mail. But now most of the e_mail servers update e-mail system for security and against rubbish e-mails.They ask users to provide user names and passwords to be connected. to send mail,you should follow: 1、use socket to connect to the smtp server . 2、send "ehlo the smtp server \r\n" to the smtp server . you will receive the "250" from the smtp server,which stands for ok. 3、send "auth login \r\n" .then will receive the "334" from the smtp server. 4、send "your user name\r\n" which is encoded by the base64 arithmetic. you will receive the "334" . 5、send "your password"which encoded by the base64 arithmetic. you will receive the "235" that stands for ok. 6、so much to write.then follow the above site to continue. libo
-
.net and MFC ?miscrosoft will release Visual C++.net 2005 in the late of this year. I find that C++/CLI of .net 2005 has more different from MFC than .net 2003 does. it have more syntax than standard C++. AS a MFC programmer, I dont have enough time to study Visual C++.net 2003, say nothing of .net 2005. Will MFC be out of date? I dont believe. miscrosoft always releases a new edition of the C++ in nearly two years. How can we keep up with the trend as a programmer of the c++. libo
-
Interaction between dialog boxesthere are two methods (1)use CWnd::SendMessage( UINT message, WPARAM wParam = 0, LPARAM lParam = 0 ); (2)you can add a variable in the CMainFrm. pass the File name of the first Dialog to the variable.then the second Dialog access it. libo
-
Doubt about which message handler to useIn my opinion ,I don't put code in CMyView::OnInitialUpdate()". It may be better to use a menu named "Link DataBase", the user click the menu ,then the application link to the DB accesss. If access failed ,you can give the user an Error MessageBox . Thus you can put the DB access code in CMyView::On****( ). libo
-
Dialogs from MFC resourcesYou do not need to re-create dialogue. You just need open your new project . then open the “ResourceView" ---> "Dialog", then use main menu "File" "open" ,choose your old project's resource file(*.rc), and open it. Finally copy-paste between the two resource file.(I usually drag the old dialog into the new project). I am sorry for my poor English not to express myself clearly. libo China
-
how can i make frame in the center of the screeni want to make the frame of the application in the center of the screen ,when the application is started. how can i do it? thank you! libo