Cause in addition to the text I have graphics in the same CStatic derived class. SetWindowText() don't have any control about in which position inside the control you write your text. Imagine a INFO panel where there is a border, some graphics and a multiline text. Anyway don't worry, I've found a simple way. Dr.Pi
doctorpi
Posts
-
Justify text in a CStatic control -
Justify text in a CStatic controlThe problem is that I have a CString too long for the width of the control (then I have to show as multiline). Then, I don't know how to manage this.
-
Justify text in a CStatic controlYes.
-
Justify text in a CStatic controlSorry, I was talking about a CMyStatic where your own paints the text,bitmaps,etc... Dr.Pi
-
Justify text in a CStatic controlHi guys ¿Do you know a way to show a long text (CString) in a CStatic justified or left aligned? Thanks in forwarding. Dr.Pî
-
Question for Michael A. Barnhart 's CXML class usersSolved.
-
Question for Michael A. Barnhart 's CXML class usersPlease if you use this class, could you tell me if it's possible to read a CDATA text value and how? Example of XML CDATA in this page https://www.quinielista.com/xml/comentarios.asp?jornada=20&temporada=2008 Thanks in forwarding Dr.Pi
-
How don't let run a program from anotherThe question is that 2 programs are really time consuming exigents. The point is don't let the user execute both at the same time. Then , if one is running don't let run the other and viceversa. Dr.Pi
-
How don't let run a program from anotherIt is possible to avoid that a program executes from our own application? An example: I'm running my app and I don't want to let notepad.exe to execute. Is this possible? Thanks in advance. Dr.Pi
-
converting int to charI hope this help Streams were originally designed for text, so the default output mode is text. In text mode, the newline character (hexadecimal 10) expands to a carriage return–linefeed (16-bit only). The expansion can cause problems, as shown here: #include int iarray[2] = { 99, 10 }; void main() { ofstream os( "test.dat" ); os.write( (char *) iarray, sizeof( iarray ) ); } You might expect this program to output the byte sequence { 99, 0, 10, 0 }; instead, it outputs { 99, 0, 13, 10, 0 }, which causes problems for a program expecting binary input. If you need true binary output, in which characters are written untranslated, you have several choices: Construct a stream as usual, then use the setmode member function, which changes the mode after the file is opened: ofstream ofs ( "test.dat" ); ofs.setmode( filebuf::binary ); ofs.write( char*iarray, 4 ); // Exactly 4 bytes written Specify binary output by using the ofstream constuctor mode argument: #include #include #include int iarray[2] = { 99, 10 }; void main() { ofstream os( "test.dat", ios::binary ); ofs.write( iarray, 4 ); // Exactly 4 bytes written } Use the binary manipulator instead of the setmode member function: ofs << binary; Use the text manipulator to switch the stream to text translation mode. Open the file using the run-time _open function with a binary mode flag: filedesc fd = _open( "test.dat", _O_BINARY | _O_CREAT | _O_WRONLY ); ofstream ofs( fd ); ofs.write( ( char* ) iarray, 4 ); // Exactly 4 bytes written
-
Assigning parent to a DialogJust one question then. If I want to modify from the CMyDialog the CDocument it's mandatory include the CMyDocument.h ? Then always the complete app is recompiled if I add a member to my CMyDialog? And then If CMyDialog affects CMyFormView (through CMyDocument) I have to update with Updateallviews from CMyDocument? Thanks -- modified at 14:31 Wednesday 11th April, 2007
-
Assigning parent to a DialogThanks, I knew I missed something ;P
-
Assigning parent to a DialogHi Guys I've got my CMyFormView class I define a Dialog and Create a Class for this dialog called CMyDialog From CMyFormView I call an instance of CMyDialog Ex: . . . CMyDialog dlgTest; dlgTest.DoModal(); . . . What's the right way to acces from inside dlgTest the CMyFormView members? (I could continue the question with... ...to avoid that each time that I touch the CMyDialog.h the complete app recompiles ?) Ex: BOOL CMyDialog::OnInitDialog() { CDialog::OnInitDialog(); // Write code here to acces m_nNumber a int variable declared in CMyFormView.h return TRUE; } Thanks
-
How to avoid to close my App?This is the place, thanks. Dr.Pi
-
How to avoid to close my App?It helps a lot, that works fine, thanks. Dr.Pi
-
How to avoid to close my App?In my CFormView? In my App? I've tried in my CFormView but the app is closing anyway. I miss something to do? Dr.Pi
-
How to avoid to close my App?Hi guys I was wandering where I have to put this... ----------------------------------------------------------------------- int ret=AfxMessageBox("You will exit the program.\nContinue?",MB_YESNO); if (ret==IDNO) return ; (someone more is needed ?) ----------------------------------------------------------------------- ...in my SDI application when someone clicks on the right upper Cross (standard close button) of my app. Thanks in forwarding. Dr.Pi
-
Calling Outlook ExpressThanks a lot. mailto doesn't admit attachments?
-
Calling Outlook ExpressHi guys, there is an easy way from C++ to make the same as when in a web page you click on a button an a New Mail (from outlook express) appears with a preselected adress on it? Do you know an example of this? Thanks and Merry Christmas.
-
Managing DoubleClick in CListCtrl with scrollbarsThanks, I'll take a look.