Skip to content

C / C++ / MFC

C, Visual C++ and MFC discussions

This category can be followed from the open social web via the handle c-c-mfc@forum.codeproject.com

111.5k Topics 465.7k Posts
  • Virtual Overloaded Function Question...

    question c++ help
    3
    0 Votes
    3 Posts
    1 Views
    P
    You have actually overrided the function 'fn' and using it as a overloaded function. Check it out. Regards, Prabhat ================== The original message was: I was wondering if somebody can explain why the following doesn't work: class base { public: virtual void fn(int nData) ( /* Do Something */ }; virtual void fn(char * pszData) { /* Do Something */ }; } class derived : public base { public: virtual void fn(char * pszData) { /* Do Something */ }; } void MyFunction { derived myderived; int nData = 5; myderived.fn(nData); } The compiler complains about myderived.fn(nData). It says.... "error C2664: 'fn' : cannot convert parameter 1 from 'int' to 'char *'. ...." Why doesn't it just use the base class fn(int nData)???? Am I doing something wrong or is this C++ behaviour? Thanks in Advance Chris Mancini
  • document file

    c++ question
    2
    0 Votes
    2 Posts
    0 Views
    L
    Go to www.wotsit.org and search for "doc". ================== The original message was: Hi, I have to open a document file (word97) in a c++ program. Where can I find the doc file specifications? Thanx.
  • Cells in ADOMD VC++

    c++ sharepoint database help tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Cells in ADOMD VC++

    c++ sharepoint database help tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • API to play MP3 files

    json question
    3
    0 Votes
    3 Posts
    1 Views
    S
    APIs can play only .wav files, according to my knowledge. ================== The original message was: Is there any API to play MP3 files ? Alex
  • advanced ui

    question c++ graphics design
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Scrolling a dialog window in a tab control

    question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Docking window. Layout. NEED HELP!!!

    help question
    2
    0 Votes
    2 Posts
    0 Views
    L
    Take a look here: http://ftp.datamekanix.com/sizecbar/faq.html#dockbarlayout ================== The original message was: Hi All! I have a big problem with docking layout. As You know docking controls are docked by the same way (rectangle layout): i.e. VERTICAL docking controls are between HORIZONTAL - see the picture below. --------- T ------- T - top L - left L R R - right B - bottom B --------- I have just one question to You... Is there the way to modify rectangle layouts to HORIZONTAL docking controls are between VERTICAL (see the picture below)? --------- | | T | | | |---| | T - top |L| |R| L - left | | | | R - right | |---| | B - bottom | | B | | --------- I'll be pleased for any idea :-) Beast regards, Yuri.
  • Application to Shell drag and drop

    html com graphics linux tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Resizing controls on the fly

    help question
    4
    0 Votes
    4 Posts
    0 Views
    N
    Sorry, I found the solutions for this. Thanks Anyway. Nyon ================== The original message was: No. I know what the first parameter of SetWindowPos() functions do. What I mean was in the SetWindowPos() function, they check if the control that was calling this function a valid window. In fact, they do an assertion check ASSERT(::IsWindow(m_hWnd)); and i found out that this value is NULL for all controls. Thus I was asking if anyone know a workaround for this or has any solutions. Thanks. ================== The original message was: Are you talking about the first parameter of CWnd::SetWindowPos()? You only use that if you are changing the Z-order of the control (in dialogs, Z-order determines the tab order of the dialog's controls). Just pass NULL for that parameter, and be sure to include the SWP_NOZORDER flag to indicate you're not changing the Z-order. --Mike-- ================== The original message was: Can anyone help me with this ? I tried resizing controls like buttons and edit box using the CWnd function SetWindowPos. There this function needs a valid HWND which i found that controls don't have. Anyone have a solution? I would great apprieciate it... Nyon
  • class for ftp client and server

    sysadmin
    2
    0 Votes
    2 Posts
    0 Views
    A
    Hi! The Ultimate TCP/IP 3.0 has the FTP client and server classes and ActiveX controls. Check our web site at www.dundas.com. If you have any questions just e-mail me. Regards, Alex Gorev, Dundas Software. ================== The original message was: hi, i'm looking for a class to make a ftp client and server.If you have a program which does it, it will be welcome to. thanks.
  • How save content (DC) of a MCI window as a Cbitmap (Urgent)?

    tutorial question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Trying to extend autocomplete combobox

    regex help tutorial announcement
    2
    0 Votes
    2 Posts
    0 Views
    L
    Hi, Please check SHAutoComplete( ) if you are using latest version of IE... It helped me... ================== The original message was: Hi! I needed a two column combo box that autocompletes. I used Chris Maunders excellent autocomplete example as a starting point and have a perfectly working control. However I have a problem: I normally would override ONSELENDOK in my app to update a view when a user selects a new item from the drop down list, with this new control a user can type a partial string, hit a match and tab out of the control. So there are two ways of selecting an item. I have tried several methods to do this but none very successfull, they would be too complex in most cases. The ideal solution I'm guessing would be to post an ONSELENDOK message either way but I can't seem to get it to work. Any recommendations would be greatly appreciated.
  • COM Arrays of arrays

    c++ question com data-structures
    2
    0 Votes
    2 Posts
    0 Views
    A
    Hi Andreas! You must use SAFEARRAYs. You can create a SAFEARRAY where each element is another SAFEARRAY and in this second array each element is integer. Regards, Alex Gorev, Dundas Software. ================== The original message was: Hello, how can I translate VBA-constructs like Array(Array(1, 2), Array(2, 2), Array(3, 1)) to Visual C++? This is important to use the Excel-method "Workbooks.OpenText(..., FieldInfo, ...). Who can help? Thanks Andreas Jäger PMC
  • Aldus Placeable Metafiles -> Enhanced Metafile problems.

    performance question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • how to make groupbox-title act like a button?

    help tutorial question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Crystal Report

    c++ help
    5
    0 Votes
    5 Posts
    0 Views
    U
    Even I have used it, What is the problem ?????? ================== The original message was:
  • How to set focus to dialog controls

    help tutorial
    2
    0 Votes
    2 Posts
    4 Views
    U
    Hi Chris, Its' not clear to understand your need. What I guess was you want to set a focus to child control. Get a window handle of that control using pControl->GetSafeHwnd() which will return HWND, Using this handle get a pointer ot that window using FromHandle(). Use this returned pointer to set the focus of that window. This should work. If not, feel free to mail me. ================== The original message was: Hi everybody, i have a dialog with a treectrl and several other controls like combo and listboxes, and i want that if you doubleclick a treenode/item that his related control in the dialog gets the focus. The treenode stores a pointer to his related control. I tried pControl->SetFocus() in the OnDblClk handler but it doesn't work. Need help. TIA, Chris
  • Hold redraw until view resizing is finished

    tutorial question
    4
    0 Votes
    4 Posts
    0 Views
    L
    This doesn't do anything. I assume you mean to set these in the AfxRegisterWndClass() command. I tried doing that in both the CView class and the CMDIChildWnd class. Neither place did I notice any effect. The IOnSize message gets called anyway every time the frame window size changes a little bit. Is there another place to set these flags to get the desired effect? Mike Newberry ================== The original message was: Modify the window's class not to have the CS_HREDRAW and CS_VREDRAW styles set.
  • microphone

    c++ question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied