why not use a splash screen?
Arcrest
Posts
-
How to know if a CFormView is visible? -
How to get the HTML source from the WebBrowser ControlHi everyone. In my application, I use WebBrowser control to send HTTP request and get HTTP response. The response result is the HTML source(am i right?) which can be viewed by clicking View Source in the popup menu. The problem is that the response is not the HTML code , but application-defined data. and I find that the following code works when the response is HTML code,but fails when my application-defined data: IHTMLDocument2 * pDoc = (IHTMLDocument2 *)(m_ie.GetDocument()); BSTR str; IHTMLElement * pElement = NULL; pDoc->get_body(&pElement); pElement->get_outerText(&str); //get_innerText Because sometimes my application data is XML-like format , get_outerText(or inner) will remove the XML tags, that's not what I expect. get_outerHTML(or inner) will add some tags in my application data because there are tags in it. I just want to implement a function that just like "View Source" menu item to get the full actual HTTP response.I use WebBrowser control because it can manage session automatically. Thanks.
-
how to link an external .res file with my applicationhi,everyone. i create a static library (mystalib.lib)which contains dialog resources, and i use this library in an application, but i don't know how to use the dialogs in the library properly: i specify the mystalib.res file in the project setting->link-> object/modules, and the complier reports a warning: the mystalib.res already specifed,additional resource file ignored but the result is that mystalib.res has been linked to the final executable ,and the resource of my application is igored,so my application can't start. what's the reason for that , and how to link the mystalib.lib with my application properly? Thanks.
-
How to create a dialog like this?oh,it works! Thanks very much.
-
How to create a dialog like this?Hi,everyone how to create a dialog which is not the main window, but its parent window and owner window are all NULL, such as the conversation window in MSN Messenger.
-
Problem about Owner WindowHi, everyone. in my dialog-based application, i want to create a dialog (CMyDialog) that is not owned by the main dialog. i derive a class named CMyThread from CWinThread and create an instance of CMyDialog(modaless dialog) in the InitInstance because i want an instance of CMyDialog has its own message loop, so i create instances of CMyDialog use this function: CreateMyDialog() { AfxBeginThread(RUNTIME_CLASS(CMyThread)); } if i call CreateMyDialog before the creation of main dialog ,then the dialog will not be owned by main dialog, of course,:). but if i call CreateMyDialog after the main dialog has been created, the dialog will be an owned window. so how to create an instance of CMyDialog without an owner window after the main dialog has been created. Thanks.
-
problem about using ActiveX in DLLThanks, but i use the IE control and i think it must be registered,:) i have got the solution from a forum: HRESULT hr = OleInitialize(NULL); if (hr == S_FALSE) { OleUninitialize(); } // Call if using OLE Controls AfxEnableControlContainer(); // Register all OLE server (factories) as running. This enables the // OLE libraries to create objects from other applications. COleObjectFactory::RegisterAll(); Thanks anyway~
-
problem about using ActiveX in DLLThanks i have already called AfxEnableControlContainer() in the InitIntstance in the dll project, but still get the same problem...
-
problem about using ActiveX in DLLin my regular MFC dll project, i create a dialog resource assoicated with a class CTestDlg, and it can normally show in my client application which uses the dll. But after i added a ActiveX control(IE Control, for example), the dialog can't be displayed and if i call a method of the ActiveX control, the debug assert failed dialog will appear: ASSERT(m_pCtrlSite!=NULL) fails. so how can i use ActiveX control correctly in DLL? thanks.
-
service statusBOOL QueryServiceStatus( SC_HANDLE hService, LPSERVICE_STATUS lpServiceStatus ); get its detailed information from MSDN!
-
How to hide or show tray icon in Windows XPHi,everyone. Under WindowsXP,users can hide or show an application tray icon by customizing tray notification,but now i want to implement this in my application. i have tried some methods(such as using sysinternal's utilites - Regmon and Filemon ) to find how Windows Shell handles this,but the results disappointed me. so can anyone know to do this ? use some undocumented windows shell api? Thanks a lot!
-
Memory Management in C++the destructor will be called when an object leaves its living scope,for example function returning. You should not try to call it directly,or the comiler may complains about that because it knows when to call the destructor. You should read some C++ textbooks to gain more about C++. the second one: the return type of all COM interfaces is HRESULT,which is a 32bit integer. The first bit of it indicates whether an operation succeeded or failed: 0 for success and 1 for fail,so if the returing value is less than 0, you can know that the operation failed,otherwise success. Usually you can use the following macro which is defined in the Winerror.h: #define SUCCEEDED(Status) ((HRESULT)(Status) >= 0) #define FAILED(Status) ((HRESULT)(Status)<0) but for the IUnknown::Release,you should always get S_OK result.
-
GDI+ problem: Image and BitmapI find that Graphics::DrawImage performs better when its first parameter is an instance of Image than that of Bitmap. This makes me confused: this code fragment: Image image(L"C:\a.jpg"); Rect rect(0,0,100,100); g.DrawImage(&image,rect); and this one: Bitmap bmp(L"C:\a.jpg"); Rect rect(0,0,100,100); g.DrawImage(&bmp,rect); and the result is that the first one performs much better when i deflate the "rect" object. Can any one explain this? In my application, I read image data from an HBITMAP handle not a file,so Bitmap is preferred, but as you can see above,i need an Image object to display the image.So how can i convert a Bitmap instance to an Image instance. The type cast won't help and I have also tried Bitmap::GetThumbnailImage. And another way is to use IStream, but i am really not good at using it. Thanks.
-
Creating shortcuts in Start menuput your short cut here: C:\Documents and Settings\All Users\Start Menu but i don't know how to put one in the start menu for windowsxp-style start menu
-
How to detect the different regions of two imagesHi, everybody some one know the algorithm of detecting different regions of two images(with the same size),or give me a link where related information can be found. My application needs that,but my knowledge about digital image processing is not enough. Thanks.
-
Difference between delete and delete[]for more details, refer to Scott Meyers <>
-
HBITMAP to Jpeg data stream?Thank you,i have got it
-
Process performance monitorfor mem usage,refer to GetProcessMemoryInfo for cpu time, refer to GetProcessTimes and you can also get all information of processes by using Performance Montoring Functions: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/perfmon/base/performance\_data.asp but i don't like to use them,because this library uses much system resources, even a simplest program using this library will have at least 7 threads and 5K memory usage.
-
HBITMAP to Jpeg data stream?Thank you a little problem,it seems that IJL only deals with the 24bit Jpeg files
-
HBITMAP to Jpeg data stream?i want to get jpeg data stream from a valid HBITMAP and transfer it through network. I can do this by first creating a jpg file and then reading the data from the file and at last sending it out,but it is not effective,so is there a more effective solution?(i don't want to get into the complexity of jpeglib) (English is not my native language,sorry for my bad English)