發表文章

目前顯示的是 7月, 2009的文章

Change windows class name

You will not be able to change window class "on the fly" (at the runtime). At least I am not aware how to do it. If you need different class name for FindWindow, you will have to change your dialog window class, you will have to do it before dialog is created; furthermore you will have to change resource for that dialog by editing it manually. First, open resource file as text (it is regular ASCI scrypt) and add line: STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_APPWINDOW CAPTION "Dialog" FONT 8, "MS Sans Serif" CLASS "NewDialogClass" <- this is line, use any name you want. You must register this class without changing dialog’s procedure. The best way to do it is in InitInstance of the app before DoModal is created. Add following code (#32770 is the system class for all dialogs): WNDCLASS wc; ::GetClassInfo(AfxGetInstanceHandle(), "#32770", &wc); // Change the name of the class. wc.lpszClass

Qt's kinetic-scrolling

http://labs.trolltech.com/blogs/2008/11/15/flick-list-or-kinetic-scrolling/ 想找一個更好的方法來做動力學卷動 ,找到這篇. 看了一下,不愧是Qt的作者,寫的真好!