Click here to Skip to main content
15,888,579 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
SuggestionRe: PlaySoundA does not return within injected DLL Pin
Richard MacCutchan26-May-13 0:54
mveRichard MacCutchan26-May-13 0:54 
GeneralRe: PlaySoundA does not return within injected DLL Pin
Furblog Sidloth26-May-13 20:39
Furblog Sidloth26-May-13 20:39 
GeneralRe: PlaySoundA does not return within injected DLL Pin
Richard MacCutchan26-May-13 21:38
mveRichard MacCutchan26-May-13 21:38 
GeneralRe: PlaySoundA does not return within injected DLL Pin
Erudite_Eric27-May-13 5:48
Erudite_Eric27-May-13 5:48 
GeneralRe: PlaySoundA does not return within injected DLL Pin
Richard MacCutchan27-May-13 5:53
mveRichard MacCutchan27-May-13 5:53 
GeneralRe: PlaySoundA does not return within injected DLL Pin
Erudite_Eric27-May-13 10:54
Erudite_Eric27-May-13 10:54 
GeneralRe: PlaySoundA does not return within injected DLL Pin
Richard MacCutchan27-May-13 20:59
mveRichard MacCutchan27-May-13 20:59 
QuestionModeless Dialog CricheditCtrl Issues Pin
ForNow25-May-13 19:34
ForNow25-May-13 19:34 
Hi,

I am having a number of problems Getting my richedit to work with my Modless Dialog Box

it started with scrolling as I was unable to get the Current Line and then I while trying to debug it

I noticed the I was I using DDX to connect my crichedit class with the resource defined window

which the documentation says only works for modal however when I comment out the UpdateData

and used the CRichEdtCtrl::Create to connect my windows class to the resource window none the Streamed in data is displayed I'll display the code along with the resource statements

The Create of the modeless Dialog

C++
ret =  progdbg->Create(IDD_PROGDBG,(CWnd *)this);


C++
BOOL CprogDebug::OnInitDialog()
{
  int FirstVisible; 
  long start, end, theline;
  myedit = new CProgedit;       // allocate the richedit
		CRect myrect(17,39,735,273);
		myedit->SetOptions(ECOOP_OR, ECO_AUTOVSCROLL |  ECO_AUTOHSCROLL);
  //  myedit->Create(WS_CHILD| ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE,myrect,this,IDC_RICHEDIT22);
	 UpdateData(FALSE);  // connect to dilog object
         EDITSTREAM es;
           

   // Set the ENM_REQUESTRESIZE event flag
 //  myedit->SetEventMask( ENM_REQUESTRESIZE ); // set notificate to keep number of charcters in view

   // Force the control to issue a EN_REQUESTRESIZE notification
 //  myedit->RequestResize( );


   CStdioFile *fileptr = new CStdioFile;
   fileptr->Open(proglisting,CFile::typeBinary);
           es.dwCookie = (DWORD) fileptr;
        es.dwError = 0;
        es.pfnCallback = (EDITSTREAMCALLBACK) readlisting;
         myedit->StreamIn(SF_TEXT, es);
		  myedit->SetFocus();
	//	 myedit->GetSel(start,end);
		  theline = myedit->LineFromChar(myedit->LineIndex(-1));
	//	 FirstVisible = myedit->GetLineCount();
		 
//		FirstVisible = myedit->LineIndex(-1);
		 myedit->LineScroll(-theline,0);
		 myedit->HideSelection(TRUE,FALSE);
			        // Call MFC Oninit
          ShowWindow(SW_SHOW);
      //  progeditptr = new CProgedit();
		CDialog::OnInitDialog(); 	
        return TRUE;
}


IDD_PROGDBG DIALOGEX 0, 0, 779, 345
STYLE DS_SETFONT | DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "Dialog"
MENU IDR_HERC_CMDTYPE
FONT 8, "Times New Roman", 400, 0, 0x0
BEGIN
CONTROL "",IDC_RICHEDIT22,"RichEdit20A",WS_CHILD | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_MULTILINE | WS_BORDER | WS_TABSTOP,17,39,735,273

END

C++
void CprogDebug::DoDataExchange(CDataExchange* pDX)
 {

//
//        //should precede the DDX and DDV routines
   CDialog::DoDataExchange(pDX);
        // Attach
        DDX_Control(pDX,IDC_RICHEDIT22,(CWnd &)*myedit); // connect rich edit
 //       DDX_Control(pDX,IDC_DESCRIP,descrip);

 //  DDX_Text(pDX, (int) IDC_DESCRIP, mytcpipmess);

 }

AnswerRe: Modeless Dialog CricheditCtrl Issues Pin
Richard MacCutchan26-May-13 0:45
mveRichard MacCutchan26-May-13 0:45 
GeneralRe: Modeless Dialog CricheditCtrl Issues Pin
ForNow26-May-13 2:29
ForNow26-May-13 2:29 
GeneralRe: Modeless Dialog CricheditCtrl Issues Pin
Richard MacCutchan26-May-13 2:32
mveRichard MacCutchan26-May-13 2:32 
GeneralRe: Modeless Dialog CricheditCtrl Issues Pin
ForNow26-May-13 2:45
ForNow26-May-13 2:45 
GeneralRe: Modeless Dialog CricheditCtrl Issues Pin
Richard MacCutchan26-May-13 3:02
mveRichard MacCutchan26-May-13 3:02 
GeneralRe: Modeless Dialog CricheditCtrl Issues Pin
ForNow26-May-13 3:09
ForNow26-May-13 3:09 
GeneralRe: Modeless Dialog CricheditCtrl Issues Pin
Richard MacCutchan26-May-13 3:31
mveRichard MacCutchan26-May-13 3:31 
GeneralRe: Modeless Dialog CricheditCtrl Issues Pin
ForNow26-May-13 3:48
ForNow26-May-13 3:48 
GeneralRe: Modeless Dialog CricheditCtrl Issues Pin
Richard MacCutchan26-May-13 3:53
mveRichard MacCutchan26-May-13 3:53 
GeneralRe: Modeless Dialog CricheditCtrl Issues Pin
ForNow26-May-13 5:48
ForNow26-May-13 5:48 
QuestionRe: Modeless Dialog CricheditCtrl Issues Pin
David Crow29-May-13 4:52
David Crow29-May-13 4:52 
AnswerRe: Modeless Dialog CricheditCtrl Issues Pin
ForNow29-May-13 8:30
ForNow29-May-13 8:30 
GeneralRe: Modeless Dialog CricheditCtrl Issues Pin
David Crow29-May-13 9:20
David Crow29-May-13 9:20 
GeneralRe: Modeless Dialog CricheditCtrl Issues Pin
ForNow29-May-13 9:41
ForNow29-May-13 9:41 
QuestionMulti-Monitor zoom behavior different Pin
transoft25-May-13 5:05
transoft25-May-13 5:05 
AnswerRe: Multi-Monitor zoom behavior different Pin
Richard MacCutchan25-May-13 7:06
mveRichard MacCutchan25-May-13 7:06 
Questiondesign a matchbox? Pin
freemo71624-May-13 6:19
freemo71624-May-13 6:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.