Search Results

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

Page 7/24 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • How to use a CTabCtrl in a MFC dialog based application ?

    - by shan23
    I need to do something which i expected to be was simple - create a tab control which has 2 tabs, implying 2 modes of operation for my app. When user clicks on Tab1, he'll be presented with some buttons and textboxes, and when he clicks Tab2, some other input method. I noticed that there was a CTabCtrl class thats used in MFC to add tabs. However, once I added the tab ctrl using the UI designer, I couldn't specify how many tabs there'll be using property window. Searching on the net, I found some examples but all of them required you to derive from CtabCtrl , create 2 or more child dialogs etc and to write your own custom class. My question is, since I want to do something so basic, why couldn't I do it using the familiar Add Event handler/Add member variable wizard and then handle everything else inside my app's class ? Surely, the default CTabCtrl class can do something useful without needing to derive from it ?

    Read the article

  • Why are not all texts of my MFC applicatiopn displayed using ClearType?

    - by mxp
    I've got an MFC application that is built with VC6. When ClearType is enabled (Windows XP) some texts are rendered smoothly, i.e. with ClearType, and others are not. Dialog texts don't seem to ever get rendered with ClearType. Some list controls, however, have it enabled completely, others only in their headers. What could be the reason for this? Where should I look to find out why it works only in some places and doesn't in others?

    Read the article

  • How to query a CGI based webserver from an app written in MFC (MSVC 2008) and process the result?

    - by shan23
    Hi, I am exploring the option of querying a web-page, which has a CGI script running on its end, with a search string (say in the form of http://sw.mycompany.com/~tools/cgi-bin/script.cgi?param1=value1&param2=value2&param3=value3 ), and displaying the result on my app (after due processing of course). My app is written in MFC C++ , and I must confess that I have never attempted anything related to network programming before. Is what I'm trying to do very infeasible ? If not, could anyone point me at the resources I need to look at in order to go about this ? Thanks !

    Read the article

  • How do I bypass GUI in MFC app if command line options exist?

    - by Brandon
    I've got an existing simple MFC app that the user specifies the input file, output file, and then a "Process" button. I'd like to just add the capability so that the input/output files are command line parameters. But, if they exist, I don't want the GUI to show up. I just want the "Process" to execute. I see where I can get the command line parameters (m_lpCmdLine) but how can I bypass the displaying of the GUI? If I step into the app, it goes directly to winmain.cpp and displays the GUI without stepping into any of my code.

    Read the article

  • How to create and add a custom made component to a Dialog based app (MFC)?

    - by kobac
    I want to make a custom made component (a line chart), that would be used in other applications. I don't know 2 things: 1) Where should I use (within component class!) the methods for drawing, like FillRect or PolyLine? In OnPaint handler that I should define and map it in MESSAGE MAP? Will it (OnPaint handler) be called from OnPaint handler of the dialog of the application or where from? 2)How to connect the component, once it is made, to the test application, which will for example be dialog based? Where should I instantiate that component? From an OnCreate method of the MyAppDialog.cpp? I started coding in MFC few days ago and I'm so confused about it. Thanks in advance, Cheers.

    Read the article

  • How to Change an MFC Modeless Dialog to be the child of a CView in an MDI application?

    - by Kieveli
    I have an MFC application that is a Doc/View/Frame implementation. One dialog is running as a modeless dialog which pops up on demand (from a menu option). I'm looking to add the modeless dialog to an MDI child view. Basically, I want to load the template from the resource file, and create it as a child of the CView in my new trio (doc/view/frame) that I am adding to the template lists for the MDI. I've tried a few things in my derived CMyView class: void CMyView::OnInitialUpdate() { m_ListDialog = new Dialogs::CListDialog( m_config, this ); m_ListDialog->Create( Dialogs::CListDialog::IDD, this ); m_ListDialog->ShowWindow( SW_SHOW ); } I've tried calling SetWindowPos, ModifyStyle (WS_CHILD, WS_VISIBLE, DS_CONTROL). I've tried modifying the resource file to set the child and control manually. Everytime it calls Create, the ListDialog's m_hWnd is left as 0. This tells me it's not getting created properly. Any call to SetWindowPos() or ShowWindow() fails because the m_hWnd is 0 (debug assertion fails). What do I need to do to get a modeless dialog to be constructed, created, and appear as a child to CMyView in my MDI application?

    Read the article

  • Can a custom MFC window/dialog be a class template instantiation?

    - by John
    There's a bunch of special macros that MFC uses when creating dialogs, and in my quick tests I'm getting weird errors trying to compile a template dialog class. Is this likely to be a big pain to achieve? Here's what I tried: MyDlg.h template <class W> class CMyDlg : public CDialog { typedef CDialog super; DECLARE_DYNAMIC(CMyDlg <W>) public: CMyDlg (CWnd* pParent); // standard constructor virtual ~CMyDlg (); // Dialog Data enum { IDD = IDD_MYDLG }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support DECLARE_MESSAGE_MAP() private: W *m_pWidget; //W will always be a CDialog }; IMPLEMENT_DYNAMIC(CMyDlg<W>, super) <------------------- template <class W> CMyDlg<W>::CMyDlg(CWnd* pParent) : super(CMyDlg::IDD, pParent) { m_pWidget = new W(this); } I get a whole bunch of errors but main one appears to be: error C2955: 'CMyDlg' : use of class template requires template argument list I tried using some specialised template versions of macros but it doesn't help much, other errors change but this one remains. Note my code is all in one file, since C++ templates don't like .h/.cpp like normal. I'm assuming someone must have done this in the past, possibly creating custom versions of macros, but I can't find it by searching, since 'template' has other meanings.

    Read the article

  • C++ MFC server app with sockets crashes and I cannot find the fault, help!

    - by usermeister
    My program has one dialog and two sockets. Both sockets are derived from CAsyncSocket, one is for listening, other is for receiving data from client. My program crashes when client tries to connect to server application and server needs to initialize receiving socket. This is my MFC dialog class. class CFileTransferServerDlg : public CDialog { ... ListeningSocket ListenSock; ReceivingSocket* RecvSock; void OnAccept(); // called when ListenSock gets connection attempt ... }; This is my derived socket class for receiving data that calls parent dialogs method when event is signaled. class ReceivingSocket : public CAsyncSocket { CFileTransferServerDlg* m_pDlg; // for accessing parent dialogs controls virtual void OnReceive(int nErrorCode); } ReceivingSocket::ReceivingSocket() { } This is dialogs function that handles incoming connection attempt when listening socket gets event notification. This is where the crash happens. void CFileTransferServerDlg::OnAccept() { RecvSock = new ReceivingSocket; /* CRASH */ } OR void CFileTransferServerDlg::OnAccept() { ReceivingSocket* tmpSock = new ReceivingSocket; tmpSock->SetParentDlg(this); CString message; if( ListenSock.Accept(*tmpSock) ) /* CRASH */ { message.LoadStringW(IDS_CLIENT_CONNECTED); m_txtStatus.SetWindowTextW(message); RecvSock = tmpSock; } } My program crashes when I try to create a socket for receiving file sent from client application. OnAccept starts when Listening socket signals incoming connection attempt, but my application then crashes. I've tried running it on another computer and connection attempt was succesful. What could be wrong? Error in debug mode: Unhandled exception at 0x009c30e1 in FileTransferServer.exe: 0xC0000005: Access violation reading location 0xccccce58.

    Read the article

  • Can a custom MFC window/dialog be a template class?

    - by John
    There's a bunch of special macros that MFC uses when creating dialogs, and in my quick tests I'm getting weird errors trying to compile a template dialog class. Is this likely to be a big pain to achieve? Here's what I tried: MyDlg.h template <class W> class CMyDlg : public CDialog { typedef CDialog super; DECLARE_DYNAMIC(CMyDlg <W>) public: CMyDlg (CWnd* pParent); // standard constructor virtual ~CMyDlg (); // Dialog Data enum { IDD = IDD_MYDLG }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support DECLARE_MESSAGE_MAP() private: W *m_pWidget; //W will always be a CDialog }; IMPLEMENT_DYNAMIC(CMyDlg<W>, super) <------------------- template <class W> CMyDlg<W>::CMyDlg(CWnd* pParent) : super(CMyDlg::IDD, pParent) { m_pWidget = new W(this); } I get a whole bunch of errors but main one appears to be: error C2955: 'CMyDlg' : use of class template requires template argument list I tried using some specialised template versions of macros but it doesn't help much, other errors change but this one remains. Note my code is all in one file, since C++ templates don't like .h/.cpp like normal.

    Read the article

  • How to estimate effort required to convert a large codebase to another language/platform

    - by Justin Branch
    We have an MFC C++ program with around 200,000 lines of code in it. It's pretty much finished. We'd like to hire someone to convert it to work for Macs, but we are not sure how to properly estimate a reasonable timeline for this project. What techniques can we use to estimate what it would take to convert this project to work on a Mac? Also, is there anything in particular we should be watching out for specific to this sort of conversion?

    Read the article

  • Getting my brother MFC-J825DW working as a network scanner

    - by AntonChanning
    I've been attempting to set up my new brother multi-function device to work as a printer and scanner using the following steps. It is connected to the network as a LAN device, not directly connected to my ubuntu machine. Downloaded the lpr driver and cupswrapper driver from Brother support. (Select the deb packages, not the rpms). Followed the instructions to install the lpr driver. Followed the instructions to install the cupswrapper driver. After this point I was able to successfully perform a test print, so the printer part is working. So far I haven't had much luck getting the scanner working. This is what I've tried: Downloaded the brscan4 and scan-key-tool deb packages from brother support. Followed the instructions for installing the scanner driver for network. Followed the instructions for installing scan-key-tool. However when I tried to scan it detects no scanner. I then tried the solution offered in this answer to a question based on a similar brother printer, but no luck. I must have made a mistake somewhere along the line. Does anyone have any ideas what I can try to find out what? Or should I uninstall everything and start again from the beginning?

    Read the article

  • Getting mybrother MFC-J825DW working as a network scanner

    - by AntonChanning
    I've been attempting to set up my new brother multi-function device to work as a printer and scanner using the following steps. It is connected to the network as a LAN device, not directly connected to my ubuntu machine. Downloaded the lpr driver and cupswrapper driver from Brother support. (Select the deb packages, not the rpms). Followed the instructions to install the lpr driver. Followed the instructions to install the cupswrapper driver. After this point I was able to successfully perform a test print, so the printer part is working. So far I haven't had much luck getting the scanner working. This is what I've tried: Downloaded the brscan4 and scan-key-tool deb packages from brother support. Followed the instructions for installing the scanner driver for network. Followed the instructions for installing scan-key-tool. However when I tried to scan it detects no scanner. I then tried the solution offered in this answer to a question based on a similar brother printer, but no luck. I must have made a mistake somewhere along the line. Does anyone have any ideas what I can try to find out what? Or should I uninstall everything and start again from the beginning?

    Read the article

  • How to fix a dpkg broken by the Brother MFC-7340 deb driver

    - by Roman A. Taycher
    I'm getting an apt-get error that says E: The package brmfc7340lpr needs to be reinstalled, but I can't find an archive for it. (the brmfc7340lpr is a printer driver) its a local deb file, doing an dpkg or apt-get purge doesn't work, neither does apt-get install -f How do I reinstall a package from a local deb file? P.S. box-name% sudo apt-get upgrade [sudo] password for username: Reading package lists... Done Building dependency tree Reading state information... Done E: The package brmfc7340lpr needs to be reinstalled, but I can't find an archive for it. box-name% sudo apt-get purge brmfc7340lpr Reading package lists... Done Building dependency tree Reading state information... Done E: The package brmfc7340lpr needs to be reinstalled, but I can't find an archive for it. box-name% sudo dpkg --purge brmfc7340lpr dpkg: error processing brmfc7340lpr (--purge): Package is in a very bad inconsistent state - you should reinstall it before attempting a removal. Errors were encountered while processing: brmfc7340lpr box-name% sudo dpkg --install brmfc7340lpr-2.0.2-1.i386.deb Selecting previously deselected package brmfc7340lpr. (Reading database ... 725204 files and directories currently installed.) Preparing to replace brmfc7340lpr 2.0.2-1 (using .../brmfc7340lpr-2.0.2-1.i386.deb) ... Unpacking replacement brmfc7340lpr ... start: Unknown job: lpd dpkg: warning: subprocess old post-removal script returned error exit status 1 dpkg - trying script from the new package instead ... start: Unknown job: lpd dpkg: error processing brmfc7340lpr-2.0.2-1.i386.deb (--install): subprocess new post-removal script returned error exit status 1 start: Unknown job: lpd dpkg: error while cleaning up: subprocess new post-removal script returned error exit status 1 Errors were encountered while processing: brmfc7340lpr-2.0.2-1.i386.deb box-name% sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done E: The package brmfc7340lpr needs to be reinstalled, but I can't find an archive for it. box-name%

    Read the article

  • Brother MFC 7220 Replacement Toner

    In years past, printers were solely for the purpose of making copies in the office. Today, printers come with many functions so many office functions can be done using the same equipment. The Brother... [Author: Ben Pate - Computers and Internet - March 31, 2010]

    Read the article

  • game programming career, vc++ reference and future of it [closed]

    - by Pappu Bacha
    1) I have quite a lot of interest in game programming and I (to my thought) am quite good at programming skills, I have developed some console based animations and text based animation games (like copter-it, snake, and a music visualization), should I invest in game programming? I have 2 years at college left. 2) If I am to pursue a career in game programming, and I select to go only with c++ and DirectX, is it enough? is assembly language necessary? 3) is Visual C++ or MFC dead? should I invest in it or not? 4) I am unable to find any reference book for Visual C++ 2008 or later (just like C++ the complete reference book) I need a book that covers the basic fundamentals and covers the most of the libraries etc.

    Read the article

  • Change Scan-to-PC list names on Brother MFC-8890DW Printer

    - by dralezero
    I have two Brother MFC-8890DW. When scanning over the network, it shows a list of PCs (on the scanner display) to save to that have the software/drivers installed. Each PC is listed as the name of the employee for that computer. I have setup a third MFC-8890DW and installed on these computers. The list, however, is the computer name. Somehow it is possible to customize the name. Brother support did not know. I couldn't find anything in manuals. I thought I remember setting up those names before.

    Read the article

  • How do I edit a "ell in an MFC Listbox?

    - by Pedro
    I have CListBox control that has 2 columns and any number of rows. I want the user to be able to click(or maybe double-click) a "cell" and be able edit the text therein. link text (Can't post images yet, need +10). What I mean is that I want to be able to click and edit any of the places where it says "TEST" by clicking on the text to make it editable. How should I go about this? I suppose I should use a mouse click event but how would I make the cell editable?

    Read the article

  • How can i display a MFC CHtmlView inside a dialog?

    - by Lothar
    I found a lot of links on the internet for this question but i don't understand their (partial) solutions. One of the main problems seems that i'm builing all dialogs by hand without dialog resource files or the Visual Studio Application Wizards. So i would need pure C++ code that i can type into my Editor. There is also some reference to a "CWebBrowser2" control, but a grep on the VC directory does not give me any results, so where can i find this?

    Read the article

  • MFC Combo-Box Control is not showing the full list of items when I click the drop-down menu...

    - by shan23
    I'm coding an app in MSVS 2008, which has a ComboBox control which I initialize thru the code as below: static char* OptionString[4] = {"Opt1", "Opt2", "Opt3", "Opt4"}; BOOL CMyAppDlg::OnInitDialog() { CDialog::OnInitDialog(); // Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon // TODO: Add extra initialization here m_Option.AddString(OptionString[0]); m_Option.AddString(OptionString[1]); m_Option.AddString(OptionString[2]); m_Option.AddString(OptionString[3]); m_Option.SetCurSel(0); return TRUE; // return TRUE unless you set the focus to a control } Now, when I build the app and click the down-arrow, the drop-down box shows the first option ONLY(since I've selected that thru my code). But, if i press down-arrow key on keyboard, it cycles thru the options in the order I've inserted, but never does it show more than 1 option in the box. So, In case an user wants to select option3, he has to cycle through options 1 and 2 !! Though once I select any option using the keyboard, the appropriate event handlers are fired, I'm miffed by this behaviour , as is understandable. I'm listing the properties of the combo-box control as well - only the properties that are true(rest are set to false): Type - Dropdown Vertical Scrollbar Visible Tabstop This has bugged me for weeks now. Can anyone pls enlighten me ?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >