|
Hello, I have an editbox that is in a child dialog – this child dialog is a “cancel test” type screen having a single button that when pushed cancels a long series of calculations, and a single multilane editbox that receives information from my main program and displays them in a multilane form.
Here is my problem: I can get the multilane part to work great, but I always have to scroll down to see the most recent message. For example, if I were to make an editbox that is only tall enough to print a single line, then I will always see the very first string that I sent to the editbox – I am wanting to see the most recent string, not the oldest.
I know I need to use something like pcanceldlg->LineScroll(1, 0); but I always get an error saying LineScroll' : is not a member of 'CCancelBoxDlg' If anyone can help me with how to use the LineScroll function in a child dialog I would greatly appreciate it.
If it helps any, here is the code I am using to send the strings:
pcanceldlg->GetDlgItemText(1015, s_oldprogress);<br />
s_newprogress = s_oldprogress + "\r\n" + s_progress;<br />
pcanceldlg->SetDlgItemText(IDC_MOVEMENTDIALOG, s_newprogress);
Thanks,
Loren
|
|
|
|
|
Hi,
LineScroll is a member of the CEdit class, not CDialog , which is why when you try to call the function using the dialog pointer, you get a syntax error. To call LineScroll , therefore, you need to have the CEdit control variable or a pointer to it. Try this instead:
<br />
CEdit *myEdit = ((CEdit*)GetDlgItem(IDC_MOVEMENTDIALOG));<br />
<br />
myEdit->LineScroll(1, 0);<br />
Hope that helps!
Sincerely,
Alexander Wiseman
Est melior esse quam videri
It is better to be than to seem
|
|
|
|
|
Sounds very much like an editbox I'm using to log messages. This is how I scroll to the bottom of the editbox.
int len = m_SystemStatus.GetWindowTextLength();
m_SystemStatus.SetSel(len,len,FALSE);
|
|
|
|
|
Hi,
I want to use CDatabase::ExecuteSQL to execute a update sql statement to Access database.
I use the following sql statement.
sql="update table_name set col_name=\"dd'ee\" where id=1";
(the content of col_name has a ')
it doesn't work.
Please help me solve the problem!!
thanks a lot!!
Alan
|
|
|
|
|
Did you test the SQL statement in Access?
It looks like there might be an error in it. It appears you have an apostrophe character in the string value for the col_name field. I am not positive but i seem to remember that Access and other relational DB's do not support that character in string data.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
Yes, I test sql statement, it works.
|
|
|
|
|
Try this syntax:
strQuery = "UPDATE employees "
strQuery += "SET employee_lastname = " + m_Value;
strQuery += "WHERE employee_id = " + nEmpId;
remove those slashes
TaknUmone
|
|
|
|
|
but we have use ''/"" to the char column.
because the content of the column include a ', so I change teh one pair of '' to "".
|
|
|
|
|
alanshen209 wrote:
it doesn't work.
What does that mean? Does it throw an exception?
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
when I run my sql statement, I got a error msgbox.
|
|
|
|
|
if i am using ofstream out("hello") this would wirte a file to the project file i'm working in. is there a way to send this to another file ... say c:\program files\
thanks
shawn
|
|
|
|
|
|
I realize this may not be the most appropriate place to post this but it ties in.
Does any body know about a good C compiler for free??
Just regular C, because I am going to start from C and work myself into C++.
-Thanks
Mark
As you journey through life take a minute every now and then to give a thought for the other fellow.
He could be plotting something.
-Hagar the Horrible
|
|
|
|
|
Bloodshed Dev-C++ is a full-featured Integrated Development Environment (IDE) for the C/C++ programming language. For Windows 95, 98, NT, 2000, XP.
It's been used in my Comp. Science classes since it is freeware.
You can download it here: http://www.bloodshed.net/dev/devcpp.html[^]
|
|
|
|
|
GCC is the standard on Unix (you can get it in the Cygwin package), there's also DJGPP which can make DOS executables.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
There is a saying in statistics that a million monkeys pounding on typewriters would eventually create a work of Shakespeare. Thanks to the Internet, we now know that this is not true.
|
|
|
|
|
http://www.compilers.net/
wWw.KruncherInc.cOm - My cool programs
|
|
|
|
|
Hai,
I have created my own message box (a dialog with its proc). Now the problem is the control is not returning automatically to the original parent window after closing the message box unless I do some action like clicking a button in the parent window.What do I have to do.
Thanks a lot in advance.
|
|
|
|
|
Is the dialog modal or modeless? Did you specify a parent when it was created?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Yeah, I specified the parent. My dialog is modeless dialog.
What should I do? Thanks.
|
|
|
|
|
destory the child window, delete the object, and release the resourse automatically.
|
|
|
|
|
Hi, I have a CDHtmlDialog in a project and I'm trying to add frames to it. I use
<FRAME name="top" src="res:/HTML/#156" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">
and when the dialog is displayed the frame only contains "The page cannot be displayed"
Anyone can help?
|
|
|
|
|
Write it like this:
<frame name="top" src="res:%23156" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">
Hope that helps.
./regards
Florian
|
|
|
|
|
Hello, I want to have a command line program create a cpl (control panel applet)file of another executable. Does anybody have code that would let me do this? Thank you.
|
|
|
|
|
Remember that a Control Panel applet is just a DLL with a special function called CPlApplet() . When the Windows Control Panel starts up, it looks for .CPL files, and for each one found and loaded, it calls its CPlApplet() function with various messages, such as CPL_INIT and CPL_DBLCLK . Is that enough to get you going?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
yea that helps. I dont really want to use MFC. I dont know if that code was MFC or not. I was wondering if its possible to convert an exe to a cpl file. I want code that converts the exe to a cpl.
-Ryan M.
|
|
|
|