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
  • WebBrowser

    c++ help
    2
    0 Votes
    2 Posts
    0 Views
    U
    I'm a little confused about what you needed... but here is instruction on how to include the web browser control on a dialog. Go to project, Add To Project, Components and Controls. Go to Registered Active X controls and select Microsoft Web Browser. This should create the files WebBrowser2.cpp & .h In you dialog #inlcude “WebBrowser2.h” then when you want to fill in you browser with a site add the following CWebBrowser2* pBrowser = (CWebBrowser2*)GetDlgItem( IDC_EXPLORER1 ); COleVariant varEmpty = new COleVariant; pBrowser->Navigate( "http://www.carolecode.com", &varEmpty, &varEmpty,&varEmpty, &varEmpty ); ================== The original message was: Hi all, I want to add the functionality , that set the url document, right to left document and left to right document. In visual c++ , mfc. Please help.... thanks Lilach.
  • Code Optimization

    c++ algorithms performance
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • How To Change Dialog BackGround Color on the FLy,

    c++ tutorial
    3
    0 Votes
    3 Posts
    0 Views
    B
    Thanks Jerry ! ================== The original message was:
  • Minimize in modal child dialogs

    question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Getting GUID from a control

    database com announcement
    2
    0 Votes
    2 Posts
    0 Views
    L
    __uuidof ( expression ) thought this might help. ================== The original message was: I would like to create a program that can read the GUID from an ActiveX control. I will be reading each dll/ocx in a directory and storing the GUID and version information in a database. I have the version part but need to read the GUID.
  • Where is Working Set Tuner

    tools help question code-review
    4
    0 Votes
    4 Posts
    0 Views
    J
    I just received the following note from Robin Caron at MS Developer Support: Hi Jonathan, The release notes failed to indicate the the working set tuner is not included with the Platform SDK because it did meet expectation for quality and stability set for Windows 2000. If you have specific needs that were answered by WST, please let me know and I'll do my best to find you alternatives. At a future time tools like working set tuner may get added back into the Platform SDK. Thank you for using the Platform SDK.
  • remote execution of a program

    question
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Pls help me

    help c++ tutorial question
    2
    0 Votes
    2 Posts
    13 Views
    M
    Hitting the ESC key calls CDialog::OnCancel() which closes the dialog. You just have to override OnCancel() and make the handler empty (don't call the base class OnCancel) As for the static controls, add a handler for WM_CTLCOLOR, and when nCtlColor is CTLCOLOR_STATIC, return a null brush. --Mike-- ================== The original message was: Pls help me some other problem: - Can I creat and activate other child Dialog from a Dialog ? - How to throw ESC keystroke while activating dialog. I try to write a Dialog base program with MFC Wizard. When main window (dialog) activated, if ESC pressed, the window (program) also deactivate. Whate can I do to avoid this ? - I want to make my main window (dialog) to have a background with a small picture (bmp) like webpage (by "tile" way. Can you help me to do this ? Can you send me a dialog class with the this properties ? I have download a source nearly with my taget (BmpDlg - from CodeProject/Codeguru), but I could not to change Static Control to not transparent. Please help me asap. Thank you, Hai Le
  • Keyboard hook

    com question
    4
    0 Votes
    4 Posts
    24 Views
    L
    Hi, you can use universal message filters and look for keyboard messagers. I tried other ways too, but no one works. I the sample file you can replace ::GetCurrentThreadId() by NULL to have a system-wide filter. ================== The original message was: Does anyone have experience with keyboard hooks? I have created a keyboard hook and it works just fine provided the exe driving the dll displays a dialog box with an edit control and the edit control has focus. However, if another app has focus, say Notepad.exe, then the keyboard hook never receives the messages. What I think I need is some way to force the keyboard hook to the top of the message chain. I would like to start a dialog with anyone that has worked with keyboard hooks before. Thank you. PMCGAHAN@UCSWORKS.COM
  • Printing Condenced text

    help
    3
    0 Votes
    3 Posts
    15 Views
    M
    I think there may be difficulty in sending control characters to a dot matrix printer using the standard windows printing system, so I'm not sure you can just send character 15 to the printer.... Troy in our office mentioned that Windows supports a "plain text" printer driver that has limited capabilities (ie, might not support networkable connections etc.) but does allow you to send control codes. I'm sure I read an article in MSDN about this topic, when reviewing material on how to write a printer driver (we flirted with writing a fax printer driver years and years ago), and remember reading a passage about this. Sorry I don't have a more specific solution. David ================== The original message was: Just send ASCII character #15 cheers, Chris ================== The original message was: In my application I am sending plain text to the dot matrix printer. I am having problems to force the printer to print the text in condenced mode. Can someone please help me with this. Thank you Peter Zajac
  • problem refreshing CD label in browse dialog

    help
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Problem with dialog derived from CFileDialog

    help question
    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • Capturing Carriage Return in CEdit

    question
    3
    0 Votes
    3 Posts
    14 Views
    P
    The following code will convert CR to a TAB for jumping to the next control and only when the OK button has focus CR will close the dialog. void CMyDlg:: OnOK() { CWnd *pWnd = GetFocus(); ASSERT (pWnd); if (IDOK == pWnd ->GetDlgCtrlID()) { CDialog::OnOK(); } else { NextDlgCtrl(); } } ================== The original message was: How do I capture the carriage return in a simple single line edit box in a dialog so that the default button is not pressed?
  • 0 Votes
    3 Posts
    10 Views
    R
    Accept in a loop? Thats not a correct way. Create a user interface thread of which the socket is a member and call Accept just once in the Initinstance of the thread ================== The original message was: Hi, I'm working on making my own simple proxy server to learn a bit about socket programming. I'm also implementing the main loop as a seperate thread but since my CSocket.Accept(CSocket) call is in its own loop waiting for a connection, I can't send it a CEvent to shut down. Any help would be appreciated.
  • Adding Splitter ctrl to activex Control

    com help
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • WM_COPYDATA or Shared Data Segment

    c++ tutorial com question
    1
    0 Votes
    1 Posts
    8 Views
    No one has replied
  • CWnd & CDC

    question
    2
    0 Votes
    2 Posts
    9 Views
    J
    Have you tried using CWnd::OnDraw(CDC *pDC)? ================== The original message was: I have CWnd* wnd; And I have CDC* pDC; How can I draw wnd to pDC?
  • lock toolbar position after docking

    question
    3
    0 Votes
    3 Posts
    18 Views
    J
    The whole point of Dockable toolbars is so that they can be moved. The best thing to do is not to lock them. I can't see any reason why it would ultimately benefit the user in the end. Users like to be able to arrange things any way they want.
  • Tab control or property sheets

    question
    1
    0 Votes
    1 Posts
    9 Views
    No one has replied
  • How Do I use VirtualListView (LVN_GETDISPINFO) with CRecordset?

    question
    2
    0 Votes
    2 Posts
    7 Views
    A
    Sorry, All! Help does not need, I simply unattentive look MSDN. Sorry. ================== The original message was: Hi, All! How Do I use VirtualListView (LVN_GETDISPINFO) with CRecordset? Unlike CDaoRecordset here no a absolute position. Thanks.