Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
U

usfesco

@usfesco
About
Posts
5
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • CString to WCHAR
    U usfesco

    Mr.Prakash wrote: If you have not declared _UNICODE then you may need to use WideByteToMultibyte api... lookup in the MSDN for further information should be MultiByteToWideChar..

    C / C++ / MFC question

  • Display a MessageBox right after a dialog is drawn on the screen?
    U usfesco

    Thanks dear Mr. Arends, It Worked! :rose: :laugh:

    C / C++ / MFC help tutorial question

  • Display a MessageBox right after a dialog is drawn on the screen?
    U usfesco

    hi all, I would like my dialog-based app to pop up a message box right after the dialog itself is shown on the screen... anyone knows how to do that? If I put a message box in my dialog's OnInitDialog like this: BOOL CTestDlg::OnInitDialog() { CDialog::OnInitDialog(); ...... AfxMessageBox("hello"); return TRUE; // return TRUE unless you set the focus to a control } the message box pops up before the main dialog appears, but I want the message box to pop up AFTER the main dialog appears. I've tried handling WM_SHOWWINDOW message, i.e., put the AfxMessageBox in the dialog's OnShowWindow() function, but it was the same thing as putting the AfxMessageBox in OnInitDialog() -- the message box still pops up before the main dialog appears. Thanks for your help in advance :-O

    C / C++ / MFC help tutorial question

  • Anyone has any experience on using CHtmlEditCtrl?
    U usfesco

    CHtmlEditCtrl is a new class introduced since MFC 7.0. It sounds like a great class, which can be used in dialogs for WYSIWYG html editing. But I have a big problem in using CHtmlEditCtrl::SetDocumentHTML after its creation: BOOL CTestDlg::OnInitDialog() { CDialog::OnInitDialog(); CString str = "<html>My page<p>test</p></html>"; CHtmlEditCtrl* m_pHtmlEditor = new CHtmlEditCtrl(); m_pHtmlEditor ->Create("",0,CRect(10,10,200,200),this,IDC_HTMLEDITOR); // put some html code in it m_pHtmlEditor->SetDocumentHTML(str); return TRUE; } Everything looks good, but when I run the app, the HTML code in "str" does not show up in the HTML Editor window :(( i.e., the html editor window is blank after the dialog appears on the screen. What's more "interesting" (and frustrating) is, if I put a MessageBox before m_pHtmlEditor->SetDocumentHTML(str); i.e., change the code to: BOOL CTestDlg::OnInitDialog() { CDialog::OnInitDialog(); CString str = "<html>My page<p>test</p></html>"; CHtmlEditCtrl* m_pHtmlEditor = new CHtmlEditCtrl(); m_pHtmlEditor ->Create("",0,CRect(10,10,200,200),this,IDC_HTMLEDITOR); **AfxMessageBox("test");** // put some html code in it m_pHtmlEditor->SetDocumentHTML(str); return TRUE; } It then works! The HTML code in "str" is showing up in the HTML editor window. But I really don't need that MessageBox. Anybody has any idea? I am really stuck. I can provide a link to my test project if anyone needs it. Big thanks! :rose:

    C / C++ / MFC help c++ html question

  • Unicode
    U usfesco

    for ANSI characters, the lower byte of its unicode representation is just the same as ASCII, while the higher byte is always 00. So, since 'N' in ASCII is 0x4E, Unicode 'N' is 0x004E (it might be 0x4E00, depending on big endian or little endian).

    C / C++ / MFC help tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups