go into the "Resource View" tab of your project and change both IDR_MAINFRAME icons to whatever icons you want :)
iceage
Posts
-
MFC icon -
How to Create Dialog Without resource Dynamicallytake a look at CreateDialogIndirect in MSDN.
-
How to display a bitmap when starting an application?go to: Project->Add To Project->Components and Controls->Visual C++ Components->Splash screen
-
path of my documents folder// Allocate a pointer to an Item ID list LPITEMIDLIST pidl; // Get a pointer to an item ID list that // represents the path of a special folder HRESULT hr = SHGetSpecialFolderLocation(NULL, /*CSIDL_SEARCH_MSDN*/, &pidl); // Convert the item ID list's binary // representation into a file system path char szPath[_MAX_PATH]; SHGetPathFromIDList(pidl, szPath); // Allocate a pointer to an IMalloc interface LPMALLOC pMalloc; // Get the address of our task allocator's IMalloc interface hr = SHGetMalloc(&pMalloc); // Free the item ID list allocated by SHGetSpecialFolderLocation pMalloc->Free(pidl); // Free our task allocator pMalloc->Release(); // Work with the special folder's path (contained in szPath) strcat(szPath , "\\Folder");
-
Calling one exe from otheryou can use WaitForSingleObject or WaitForMultipleObjects
-
restricting to type in CEditopen Class Wizard and assign a CString variable for your edit and you will see "Maximum characters" in the lower part of the Class Wizard. Set there how many characters your CString wants to have.(same for int, long...)
-
Toolbar in CDialog//add a toolbar to the dialog m_toolBar.CreateEx(this, TBSTYLE_FLAT | TBSTYLE_TRANSPARENT , WS_CHILD |WS_VISIBLE | CBRS_FLOATING ); m_toolBar.LoadToolBar(IDR_TOOLBAR); m_toolBar.SetBarStyle(CBRS_ALIGN_TOP | CBRS_TOOLTIPS | CBRS_FLYBY); RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);
-
casting problem -
Messaging questionThe best way to implement this is to use the OBSERVER pattern described in "Design Patterns" book. You can find here some example for that: http://www.codeproject.com/cpp/observer.asp http://www.codeproject.com/useritems/Observer\_with\_templates.asp http://www.codeproject.com/gen/design/ObserverPattern.asp