Search Results

Search found 584 results on 24 pages for 'mfc'.

Page 12/24 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • why message box is always hidden behind main dialog and cannot be shown on the top

    - by Cougar_usa
    I am using MFC to write a GUI application. I chose dialog-based application, and put picture control, edit box and buttons on it. When the picture control is mapped to the class derived from CWnd using DDX_Control, all the message boxes (including default system message box pop up when you enter invalid input in the edit box) are hidden behind main dialog until you use "alt + tab" to bring them to front. If I map the picture control to the default CStatic class, the above problem disappeared. Do anyone has some hints to solve this problem? Thank you in advance for any help.

    Read the article

  • 'Generating code' and stop in building release mode (Visual Studio 2005 )

    - by cchcc
    Hi! I have a problem about release build I'm using Visual Studio 2005. The project is worked on MFC When I build the project what I working in debug mode, It builds done successfully. but in release mode, Output window shows next 1Compiling resources... 1Linking... 1Generating code and then.. it doesn't pass. It seems like be stoped. After 20 min ,I just canceld build. It has been built well before. I just added some files(.h .cpp) and resorces(.bmp), not special code and it happened. Do you have any idea about that? please help me

    Read the article

  • Do you know of a good program for editing/translating resource (.rc) files?

    - by djeidot
    I'm building a C++/MFC program in a multilingual environment. I have one main (national) language and three international languages. Every time I add a feature to the program I have to keep the international languages up-to-date with the national one. The resource editor in Visual Studio is not very helpful because I frequently end up leaving a string, dialog box, etc., untranslated. I wonder if you guys know of a program that can edit resource (.rc) files and Build a file that includes only the strings to be translated and their respective IDs and accepts the same (or similar) file in another language (this would be helpful since usually the translation is done by someone else), or Handle the translations itself, allowing to view the same string in different languages at the same time.

    Read the article

  • OnSize() Problem in VC++

    - by Anu
    Hi, In my VC++ MFC applcaiton,i have different views.And in each view,when i maximize it,i changed the size and position to new thing(Normally it fully get maximixed to screen size).But i dont want tht.So in OnSize() i coded like this. void CChildFrame::OnSize(UINT nType, int cx, int cy) { CMDIChildWnd::OnSize(nType, cx, cy); int XBorder = GetSystemMetrics(SM_CXMAXIMIZED); int YBorder = GetSystemMetrics(SM_CYMAXIMIZED); switch (nType) { case SIZE_MAXIMIZED: SetWindowPos(NULL,0,60,XBorder-45,YBorder-60,SWP_NOZORDER ); break; } } But what happened is?When i maximize the view,its get maximized to above mention size only.But in that blue bar,there si no minimize,maximize,close button. When i double click in the blue bar,its get to resumed to previous postion with all buttons. How can i get that?

    Read the article

  • Positioning the dialog box in the centre of the screen

    - by ame
    I have a dialog box developed in mfc for a Windows CE device and want it to occupy the entire screen. I used the following code to center my dialog box on the lcd screen of the device: CWnd* pWnd = GetDesktopWindow(); CenterWindow(pWnd); However, I still get a tiny sliver of space on the left side of the dialog box, resizing the dialog merely makes it overflow on the right side of the LCD while the tiny space on the left remains (I can see the blue of the win CE desktop behind.) Are there any suggestions to solve this problem? I checked the margin settings for this dialog box in my .rc files and leftmargin and topmargin are both set to 0. I was wondering if I could get the coordinates of the centre of the screen and then place my window one or two points to the left to deal with the current offset. A messy approach I know!

    Read the article

  • MS VC++ 6 class wizard

    - by Shane MacLaughlin
    Ok, I'm developing an application that has been in pretty much continous development over the last 16 years, from C in DOS, through various flavours of C++ and now is largely based around C++ with MFC and StingRay GUIs and various other SDKs. While I use VS 2005 for the release builds, I still use MSVC 6 for much of the GUI building, simply because ClassWizard is so much quicker in this environment than the weak equivalent tools that followed. Note that I am using ClassWizard to automatically generate code for my own user defined types (see Custom DDXs) and I like to add a lot of member variables and methods in one go. Creating them one at a time as per later versions of Visual Studio for me is a big backward step. At the same time, working with multiple IDEs is also a pain. My question is in two parts; Is there any way of getting ClassWizard to work is VS 2005 or VS 2008? Is there any drop in replacement, or alternative IDE, that provides similar levels of productivty for old C++ hacks such as myself?

    Read the article

  • Questions regarding Web Service development in C++

    - by Eduardo León
    The purpose of this question is to play a joke, but the question itself is serious. Inspired by DOS on Dope, I want to make my own framework for Web Service development based on MFC serialization. However, my only experience in Web Service development consists in having written a toy ASP.NET Web Service. All I had to do to expose a method was... [WebMethod] public ReturnType ExposedMethod(InputType1 param1, InputType2 param2) { //... } ... and ASP.NET took care of the rest for me. Obviously, I will have to do everything by hand in my own framework. Thus, I would like to delve a bit more into the little details of how ordinary SOAP Web Services work, in order to replicate them. So I have mainly two questions: Where can I find the details on how SOAP Web Services work, and what ASP.NET hides from me? What are the main challenges I am going to find in my completely lunatic project?

    Read the article

  • Scaling a CBitmap - what am I doing wrong?

    - by Smashery
    I've written the following code, which attempts to take a 32x32 bitmap (loaded through MFC's Resource system) and turn it into a 16x16 bitmap, so they can be used as the big and small CImageLists for a CListCtrl. However, when I open the CListCtrl, all the icons are black (in both small and large view). Before I started playing with resizing, everything worked perfectly in Large View. What am I doing wrong? // Create the CImageLists if (!m_imageListL.Create(32,32,ILC_COLOR24, 1, 1)) { throw std::exception("Failed to create CImageList"); } if (!m_imageListS.Create(16,16,ILC_COLOR24, 1, 1)) { throw std::exception("Failed to create CImageList"); } // Fill the CImageLists with items loaded from ResourceIDs int i = 0; for (std::vector<UINT>::iterator it = vec.begin(); it != vec.end(); it++, i++) { CBitmap* bmpBig = new CBitmap(); bmpBig->LoadBitmap(*it); CDC bigDC; bigDC.CreateCompatibleDC(m_itemList.GetDC()); bigDC.SelectObject(bmpBig); CBitmap* bmpSmall = new CBitmap(); bmpSmall->CreateBitmap(16, 16, 1, 24, 0); CDC smallDC; smallDC.CreateCompatibleDC(&bigDC); smallDC.SelectObject(bmpSmall); smallDC.StretchBlt(0, 0, 32, 32, &bigDC, 0, 0, 16, 16, SRCCOPY); m_imageListL.Add(bmpBig, RGB(0,0,0)); m_imageListS.Add(bmpSmall, RGB(0,0,0)); } m_itemList.SetImageList(&m_imageListS, LVSIL_SMALL); m_itemList.SetImageList(&m_imageListL, LVSIL_NORMAL);

    Read the article

  • How to implement two way binding between an ActiveX control and a WPF MVVM View Model

    - by Zamboni
    I have a WPF application implemented using the MVVM framework that uses an ActiveX control and I need to keep the WPF and ActiveX UI synchronised. So far I can update the ActiveX UI when I change the WPF UI using the code at the bottom of the question that I got from the article Hosting an ActiveX Control in WPF and this question. But I cannot update the WPF UI when I make a change in the ActiveX UI. I suspect that I need to fire the PropertyChanged event from my ActiveX control but I have no idea how to do this or if it is even possible. The ActiveX controls I have written are in VB6 and MFC as I am just prototying at this time for the eventual integration of VB6 ActiveX controls in a WPF contaner application. Here is a code snipet that indicates the work done so far: System.Windows.Forms.Integration.WindowsFormsHost host = new System.Windows.Forms.Integration.WindowsFormsHost(); // Create the ActiveX control. AxTEXTBOXActiveXLib.AxTEXTBOXActiveX axWmp = new AxTEXTBOXActiveXLib.AxTEXTBOXActiveX(); // Assign the ActiveX control as the host control's child. host.Child = axWmp; axWmp.DataBindings.Add(new System.Windows.Forms.Binding("ActiveXStatus", (MainWindowViewModel)this.DataContext, "ModelStatus", true, DataSourceUpdateMode.OnPropertyChanged )); // Add the interop host control to the Grid // control's collection of child controls. this.activexRow.Children.Add(host); How to implement two way binding between an ActiveX control and a WPF MVVM View Model?

    Read the article

  • After Navigate2 Method returns S_OK Stuck at READYSTATE of READYSTATE_LOADING

    - by Stone Free
    I am working on a MFC Document View architecture application which has multiple documents and views and a tabbed window interface. I have been tasked with making an automatic switch to another tab on the press of the OK button in one of the other tabs. When the other tab is clicked on it uses a C++ wrapper over IWebBrowser2 to navigate to a specific web page. When this is done manually by clicking on the tab everything is fine and the webpage within the view loads successfully. In my first attempt at doing this the tab successfully switched in response to a call to AfxGetMainWnd()->SendMessageToDescendants(SOME_MESSAGE, ...); however by sending this windows message at the wrong point the application would crash once control returned because the chain of events caused the (modeless) dialog (*) that sent the message, to no longer exist. I then found the correct place to make the call, but now when the other tab is activated, it no longer displays the webpage as it should. To debug this problem I added code to check the READYSTATE in both the situation where it works and the situation where it does not. When the page fails to load (despite the call to Navigate2 returning S_OK), the READYSTATE just stays at READYSTATE_LOADING. Unfortunately now I am to many edits away from when I had it partially working. I have added TRACE statements to the most obvious events such as OnSetFocus, CView::OnActivateView but all traces come out in the same order despite the behaviour being different * hosted in the view

    Read the article

  • How do I find a source code position from an address given by a crash in Window CE

    - by Shane MacLaughlin
    I have a Windows mobile 4.0 application, written using EVC++ 4.0 SP4 with MFC, that is exhibiting a random occasional crash in the field. e.g. Exception ox800000002 at 00112584. It does not happen under various emulators and simulators, hence is very difficult to trace using a debugger. The crash throws up and address and exception type. Given that I have the PDB is there any way to track this address to the source. I can't recompile using VC++ 8 as it doesn't support the mobile 4 SDK. My guess is that without a stack trace I'm not going to have much joy, as the chances are that the exception may not be in my source. Worth a try all the same. Edit As suggested, I have looked at the address in the context of the .MAP file for the program. This reveals the following Address Publics by Value Rva+Base Lib:Object 0001:00000000 ?GetUnduValue@@YANMM@Z 00011000 f 7Par.obj ' ' ' 0001:001124b8 ?OnLButtonUp@CGXGridUserDragSelectRangeImp@@UAAHPAVCGXGridCore@@AAVCPoint@@AAI@Z 001234b8 f gxseldrg.obj 0001:001126d8 ?OnSelDragStart@CGXGridUserDragSelectRangeImp@@UAAHPAVCGXGridCore@@KK@Z 001236d8 f gxseldrg.obj Which suggests the error occured during CGXGridUserDragSelectRangeImp::OnLButtonUp(), which seems a bit odd as I don't think there was a mouse / keyboard / screen button pressed at the time. Could be the stack got fragged before the crash got reported, and I'm wasting my time. I'll recompile with assembler output to try to isolate it to a given line, but don't hold out much hope :( Does the fact that the map file reports segmented addresses e.g. 0001:xxxxxxxxx and the crash report unsegmented addresses mean I have to carry out some computation to get the map address from the crash address?

    Read the article

  • Why function Ellipse(...) are needed twice here to draw an ellipse?

    - by John Son
    MFC: I read this code which is to draw an ellipse (not solid interior), but I cannot understand why function "pDC-Ellipse(...)" is needed twice here? CDC *pDC=GetDC(); CPen pen; CBrush brush; getpen(pen,pDC,col,bol); if(do_what>=DRAW_LINE&&do_what<=DRAW_RRECT){ p->p[0]=start; p->p[1]=end; if(sol==1){ getbrush(brush,pDC,col); } if(do_what==DRAW_LINE){ pDC->MoveTo(start); pDC->LineTo(end); } else if(do_what==DRAW_ELLIPSE||do_what==DRAW_CIRCLE){ pDC->SetROP2(R2_NOT); assist=start; if(do_what==DRAW_CIRCLE){ assist.y=end.y-end.x+start.x; } pDC->Ellipse(start.x,assist.y,end.x,end.y); pDC->SetROP2(R2_COPYPEN); if(sol==0){ pDC->SelectStockObject(NULL_BRUSH); } if(do_what==DRAW_CIRCLE){ assist.y=point.y-point.x+start.x; } pDC->Ellipse(start.x,assist.y,point.x,point.y); end=point; } } If I remove the first one, the ellipse will be black solid inside. If I remove the second one, the ellipse will never be drawn but disappears when left mouse button is up. the dialog: when moving mouse: mouse moving when mouse button pops: mouse button pops Besides, what color of CBrush is if I use "CBrush brush; pDC-Ellipse(start.x,assist.y,end.x,end.y);"

    Read the article

  • Paste or Drop, copy data and release source?

    - by Harvey
    I have an MFC DocView SDI App that receives data from either the clipboard or drag and drop. The data is in either CF_HDROP or CF_TEXT format. I have a COleDropTarget derived CMyDropTarget member m_dropTarget of my CMainFrame class. I have two member functions of CMyDropTarget; OnDrop(...) and OnPaste() which each call another member function PostData(pDataObject). I want to get a copy of the pDataObject from either CF_... format and PostMessage to my CmainFrame which will call a member of my Doc class. What is a simple way of getting a copy of the global data to pass with the PostMessage() so that I can get the drop source released before I get around to processing the global data? NOTE that they are always treated as a copy of the source data, so there is no need for the source to delete anything when the operation is done. Or perhaps a better way of asking the question is: How can I release the Drop source before processing the global data? Can I pass the HGLOBAL via PostMessage and still release the source without making a copy of it?

    Read the article

  • Testing approach for multi-threaded software

    - by Shane MacLaughlin
    I have a piece of mature geospatial software that has recently had areas rewritten to take better advantage of the multiple processors available in modern PCs. Specifically, display, GUI, spatial searching, and main processing have all been hived off to seperate threads. The software has a pretty sizeable GUI automation suite for functional regression, and another smaller one for performance regression. While all automated tests are passing, I'm not convinced that they provide nearly enough coverage in terms of finding bugs relating race conditions, deadlocks, and other nasties associated with multi-threading. What techniques would you use to see if such bugs exist? What techniques would you advocate for rooting them out, assuming there are some in there to root out? What I'm doing so far is running the GUI functional automation on the app running under a debugger, such that I can break out of deadlocks and catch crashes, and plan to make a bounds checker build and repeat the tests against that version. I've also carried out a static analysis of the source via PC-Lint with the hope of locating potential dead locks, but not had any worthwhile results. The application is C++, MFC, mulitple document/view, with a number of threads per doc. The locking mechanism I'm using is based on an object that includes a pointer to a CMutex, which is locked in the ctor and freed in the dtor. I use local variables of this object to lock various bits of code as required, and my mutex has a time out that fires my a warning if the timeout is reached. I avoid locking where possible, using resource copies where possible instead. What other tests would you carry out?

    Read the article

  • How do you send a named pipe string from umnanaged to managed code space?

    - by billmcf
    I appear to have a named pipes 101 issue. I have a very simple set up to connect a simplex named pipe transmitting from a C++ unmanaged app to a C# managed app. The pipe connects, but I cannot send a "message" through the pipe unless I close the handle which appears to flush the buffer and pass the message through. It's like the message is blocked. I have tried reversing the roles of client/server and invoking them with different Flag combinations without any luck. I can easily send messages in the other direction from C# managed to C++ unmanaged. Does anyone have any insight. Can any of you guys successfully send messages from C++ unmanaged to C# managed? I can find plenty of examples of intra amanged or unmanaged pipes but not inter managed to/from unamanged - just claims to be able to do it. In the listings, I have omitted much of the wrapper stuff for clarity. The key bits I believe that are relevant are the pipe connection/creation/read and write methods. Don't worry too much about blocking/threading here. C# Server side // This runs in its own thread and so it is OK to block private void ConnectToClient() { // This server will listen to the sending client if (m_InPipeStream == null) { m_InPipeStream = new NamedPipeServerStream("TestPipe", PipeDirection.In, 1); } // Wait for client to connect to our server m_InPipeStream.WaitForConnection(); // Verify client is running if (!m_InPipeStream.IsConnected) { return; } // Start listening for messages on the client stream if (m_InPipeStream != null && m_InPipeStream.CanRead) { ReadThread = new Thread(new ParameterizedThreadStart(Read)); ReadThread.Start(m_InPipeStream); } } // This runs in its own thread and so it is OK to block private void Read(object serverObj) { NamedPipeServerStream pipeStream = (NamedPipeServerStream)serverObj; using (StreamReader sr = new StreamReader(pipeStream)) { while (true) { string buffer = "" ; try { // Blocks here until the handle is closed by the client-side!! buffer = sr.ReadLine(); // <<<<<<<<<<<<<< Sticks here } catch { // Read error break; } // Client has disconnected? if (buffer == null || buffer.Length == 0) break; // Fire message received event if message is non-empty if (MessageReceived != null && buffer != "") { MessageReceived(buffer); } } } } C++ client side // Static - running in its own thread. DWORD CNamedPipe::ListenForServer(LPVOID arg) { // The calling app (this) is passed as the parameter CNamedPipe* app = (CNamedPipe*)arg; // Out-Pipe: connect as a client to a waiting server app->m_hOutPipeHandle = CreateFile("\\\\.\\pipe\\TestPipe", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); // Could not create handle if (app->m_hInPipeHandle == NULL || app->m_hInPipeHandle == INVALID_HANDLE_VALUE) { return 1; } return 0; } // Sends a message to the server BOOL CNamedPipe::SendMessage(CString message) { DWORD dwSent; if (m_hOutPipeHandle == NULL || m_hOutPipeHandle == INVALID_HANDLE_VALUE) { return FALSE; } else { BOOL bOK = WriteFile(m_hOutPipeHandle, message, message.GetLength()+1, &dwSent, NULL); //FlushFileBuffers(m_hOutPipeHandle); // <<<<<<< Tried this return (!bOK || (message.GetLength()+1) != dwSent) ? FALSE : TRUE; } } // Somewhere in the Windows C++/MFC code... ... // This write is non-blocking. It just passes through having loaded the pipe. m_pNamedPipe->SendMessage("Hi de hi"); ...

    Read the article

  • Could not see memory being released on closing MFC modal dialog that hosts wpf user control using HW

    - by Naveen Chiluka
    This is in continuation with my last question posted "Continuous Memory leak while using WpfHWndSource" I have to load an WPF User Control in an MFC Modal Dialog that is being invoked from the ocx control. For this I have created a MFC Regular Dll(Mixed Mode Regular dll with clr option enabled), I have created a modal dialog which will host wpf user control using HWndSource. This exported dialog is placed as a child Dialog of the above MFC dialog that is being invoked from the ocx. Ny intermediate dialog uses C++/Cli code. When the main MFC dialog is closed, I am deleteing the ptr reference of the intermediate dialog created on the heap. In the the dipose of the .Net User Control, I have set most of the references that I have created to null, unsubscribed to the events (to avoid weak refernces), unbinded from the propertes(by using clear binding). Called delete on the HwndSource and the user control(which basically calls the dispose method). But I do not see complete memory being released. Any help would be greatful.

    Read the article

  • SetWindowLong in CustomDraw causes unhandled exception

    - by neeul
    Hello, I am making some changes to a CSliderCtrl using the Custom Draw, the control is to be used in a dialog. Here is the structure: In my MessageMap I have : ON_NOTIFY_REFLECT_EX(NM_CUSTOMDRAW, OnNMCustomdraw) The OnNMCustomdraw method looks like the following: BOOL CCustomSliderCtrl::OnNMCustomdraw(NMHDR *pNMHDR, LRESULT *pResult) { *pResult = CDRF_DODEFAULT; LPNMCUSTOMDRAW pNMCD = reinterpret_cast<LPNMCUSTOMDRAW>(pNMHDR); switch(pNMCD->dwDrawStage) { case CDDS_PREPAINT: { //Dialogs don't receive CDRF_NOTIFYITEMDRAW notifcations by returning it as part of pResult, we must //use the following so we ensure we receive the msg SetWindowLong(pNMHDR->hwndFrom, DWL_MSGRESULT, CDRF_NOTIFYITEMDRAW); return TRUE; } case CDDS_ITEMPREPAINT: if(pNMCD->dwItemSpec == TBCD_CHANNEL) { ...SNIP... SetWindowLong(pNMHDR->hwndFrom, DWL_MSGRESULT, CDRF_SKIPDEFAULT); return TRUE; } } return FALSE; } Reading around I learnt that you had to use SetWindowLong to set the return value for the custom draw, otherwise your method will not always receive the CDDS_ITEMPREPAINT message. However, when using SetWindowLong my application will never receive the CDDS_ITEMPREPAINT and so my slider just looks like a standard slider. The application crashes when any sort of interaction takes place upon the slider, such as hovering over it or minimizing and maximizing the dialog. I snipped the TBCD_CHANNEL code as it is never reached. When running in debug mode, it crashes at the end of the AfxUnlockGlobals method, in afxcrit.cpp. Here is a stack trace: Update: Since adding debug symbols, the crash seems to be picked up at CWnd::DefWindowProc mwthod. comctl32.dll!_TrackBarWndProc@16() + 0x551 bytes user32.dll!_InternalCallWinProc@20() + 0x28 bytes user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 bytes user32.dll!_CallWindowProcAorW@24() + 0x51 bytes user32.dll!_CallWindowProcW@20() + 0x1b bytes mfc90ud.dll!CWnd::DefWindowProcW(unsigned int nMsg=15, unsigned int wParam=0, long lParam=0) Line 1043 + 0x20 bytes C++ mfc90ud.dll!CWnd::WindowProc(unsigned int message=15, unsigned int wParam=0, long lParam=0) Line 1756 + 0x1c bytes C++ mfc90ud.dll!AfxCallWndProc(CWnd * pWnd=0x0012fdbc, HWND__ * hWnd=0x000308fe, unsigned int nMsg=15, unsigned int wParam=0, long lParam=0) Line 240 + 0x1c bytes C++ mfc90ud.dll!AfxWndProc(HWND__ * hWnd=0x000308fe, unsigned int nMsg=15, unsigned int wParam=0, long lParam=0) Line 403 C++ mfc90ud.dll!AfxWndProcBase(HWND__ * hWnd=0x000308fe, unsigned int nMsg=15, unsigned int wParam=0, long lParam=0) Line 441 + 0x15 bytes C++ user32.dll!_InternalCallWinProc@20() + 0x28 bytes user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 bytes user32.dll!_DispatchClientMessage@20() + 0x4d bytes user32.dll!___fnDWORD@4() + 0x24 bytes ntdll.dll!_KiUserCallbackDispatcher@12() + 0x13 bytes user32.dll!_NtUserDispatchMessage@4() + 0xc bytes user32.dll!_DispatchMessageW@4() + 0xf bytes mfc90ud.dll!AfxInternalPumpMessage() Line 183 C++ mfc90ud.dll!CWinThread::PumpMessage() Line 900 C++ mfc90ud.dll!AfxPumpMessage() Line 190 + 0xd bytes C++ mfc90ud.dll!CWnd::RunModalLoop(unsigned long dwFlags=4) Line 4386 + 0x5 bytes C++ mfc90ud.dll!CDialog::DoModal() Line 584 + 0xc bytes C++ SetSelection.exe!CSetSelectionApp::InitInstance() Line 64 + 0xb bytes C++ mfc90ud.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, wchar_t * lpCmdLine=0x00020a84, int nCmdShow=1) Line 37 + 0xd bytes C++ SetSelection.exe!wWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, wchar_t * lpCmdLine=0x00020a84, int nCmdShow=1) Line 34 C++ SetSelection.exe!__tmainCRTStartup() Line 578 + 0x35 bytes C SetSelection.exe!wWinMainCRTStartup() Line 403 C kernel32.dll!_BaseProcessStart@4() + 0x23 bytes So, does anyone have any insight into this matter? If you need more info just let me know.

    Read the article

  • Show CMFCRibbonStatusBar

    - by praetorian20
    Hi, I'm creating a simple SDI app using the new VS2008 service pack. I added ribbon support but all I want on the ribbon are the Open & Close buttons. I commented out all the code that creates the other default buttons and categories but doing this also gets rid of the status bar (CMFCRibbonStatusBar). I can't find what member function is called when I click the checkbox that displays the statusbar in the default generated code. I've tried the following but it doesn't work: m_wndStatusBar.ShowWindow( SW_SHOWNORMAL ); How do I have the status bar showing without having to have the 'Home' category and 'View' panel (with the 'Show status bar' checkbox) being generated? Thanks, Ashish.

    Read the article

  • Load a png resource into a CBitMap

    - by Rohit Sasikumar
    How do i load a png resource into a CBitMap? When i try this it doesnt work. CImage image; image.LoadFromResource(AfxGetInstanceHandle(), IDB_PNG1); bitmap.Attach(image.Detach()); It gives me an error resource type not found. Is there any other way to load a PNG resource?

    Read the article

  • ATL CString or_bstr_t?

    - by Gopalakrishnan Subramani
    In our COM project, we need to choose between best string class implementation so that BSTR (used for COM interfaces) and elegant string class like CString provides many string manipulation APIs. Are there any better way to handle the strings and string operations so that it can be BSTR complaints as well as we can have naive CString operations?

    Read the article

  • Auto Resizing in a ClistCtrl

    - by Isuru
    Hi, Is there a way to resize the listcontrol automatically? Usually when the item gets too long the back end disappears from view and the user manually has to resize the width of the column. Is there anyway to do this by the code? Thank You!!

    Read the article

  • How to use CWnd::CreateEx

    - by chitra
    I was using CreateEx( 0, className, "XXX", WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, rect, parent, 0); in Visual C++ 6.0. when i port the same to VS 2008.., its giving an error message saying that.. error C2664: 'BOOL CWnd::CreateEx(DWORD,LPCTSTR,LPCTSTR,DWORD,const RECT &,CWnd *,UINT,LPVOID)' : cannot convert parameter 3 from 'const char [7]' to 'LPCTSTR' how to rectify the same thanks Chitra

    Read the article

  • Why so much stack space used for each recursion?

    - by Harvey
    I have a simple recursive function RCompare() that calls a more complex function Compare() which returns before the recursive call. Each recursion level uses 248 bytes of stack space which seems like way more than it should. Here is the recursive function: void CMList::RCompare(MP n1) // RECURSIVE and Looping compare function { auto MP ne=n1->mf; while(StkAvl() && Compare(n1=ne->mb)) RCompare(n1); // Recursive call ! } StkAvl() is a simple stack space check function that compares the address of an auto variable to the value of an address near the end of the stack stored in a static variable. It seems to me that the only things added to the stack in each recursion are two pointer variables (MP is a pointer to a structure) and the stuff that one function call stores, a few saved registers, base pointer, return address, etc., all 32-bit (4 byte) values. There's no way that is 248 bytes is it? I don't no how to actually look at the stack in a meaningful way in Visual Studio 2008. Thanks

    Read the article

  • Icons on CMFCOutlookBar

    - by steve-weeks
    I'm using CMFCOutlookBar from the Feature Pack, and I'm trying to put an icon on the "button" of the tabbed pane - the thing that slides up and down in the bar, when you select a pane. The pane API includes a "SetIcon" function, but this doesn't do anything as far as I can tell. Neither does the "SetTabHicon" function of the bar. Does anyone know how to do this?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >