|
Hello,
I have a smiple dialog box with a edit control(multiple line).. I pump strings into the edit control and start filling it up.. each string I put into the control goes on a new line below the previous line.. How do I get the control to auto-scroll down so that each new line that is inserted is displayed with out having to manually scroll to the bottom of the control.
Thanks!
|
|
|
|
|
Try with m_youredit.SetSel(-1,-1,TRUE) .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Didn't work.. I have tried even tried SetScrollPos(SB_VERT,1,TRUE); to scroll the bar down only one click.. but it doesn't seem like anything is effecting the scroll bar.
|
|
|
|
|
|
Thanks, I used his example and made mine work!
|
|
|
|
|
Glad my old, worn-out article helped!
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hello !!!!
How can i open my access database as READ ONLY by Carlos Antollini classes ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
hadi,
I understand that you can set the readonly feature in the connection string.
"Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=C:\test.mdb;Mode=Read;Extended Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=4;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False";
|
|
|
|
|
Hello Alex
Thanks for reply, i'll test it and then tell you the result ...
About the connection string ...
I don't most of connection string parameters that you wrote
for example:
Extended Properties, Jet OLEDB:System database, Registry Path and etc ...
Could you explain about connection string parameters ?
I have other question, too.
I have problem in opening database from CD !!!
Because as you know, when i open the access database, the access database makes a .LDB file beside the access database !
So can you tell me, how can i open access database from CD ?
Is opening access database as read-only good way ?
Regards,
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hadi
The parameters are those generated from C# when addition a OleDBConnection object to a form.
I am sure I succeeded in reading an Access database from a CD in the past. However, performance is not good.
Cheers,
Alex
|
|
|
|
|
I have an MDI app, CMyEditDoc (from CDocument), and CMyEditView (from CEditView).
In CMyEditDoc, I have a CStringArray with text I want displayed.
How do I actually get the view updated from the doc?
I seem to have a block in understanding this. Can someone help a brother out, here?
BW
{insert witty/thought-provoking saying here}
|
|
|
|
|
the usual way is to call CMyDoc::UpdateAllViews. this function takes a couple of parameters that you can use to use to pass a flag or a CObject-dervied class (or actually, anything because you can cast to a CObject* to pass and then cast back to the real type in the view).
anyway, you call UpdateAllViews with your flags/data and then in your view's OnUpdate handler, you look at the parameters that were passed and act accordingly.
most of my apps will just send a flag in UpdateAllViews. the views look at that flag, decide what to do and call back to the doc to get any data they need. i rarely pass much data in the CObject* parameter (sometimes i pass a little bit of state info, but rarely do i pass the real document data).
-c
"Kate said / The flowers of intolerance and hatred / Are blooimg kind of early this year / Someone's been watering them.
-- Robyn Hitchcock, Devil's Radio
|
|
|
|
|
Hello Everybody:
I want to have a group box that becomes visible and invisible by clicking another object (it could be a button or even an Bitmap with WM_LBUTTONDOWN maybe). Is there a way that I can do this? If so, can you give me a quick example?
Regards,
Luis E. Cuadrado
)
|
|
|
|
|
The thing seems simple. Where are you stuck? Showing/hiding a control (or any window) can be achieved with ShowWindow .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks for the quick reply. Well, I'm stuck in showing and hiding the control itself. I'm not sure if a group box is considered a CStatic class, or a CButton class. But what I'm planning to do is in a Dialog, to have a Button or a Bitmap control and when I click that control the group box will appear.
If you need more info, let me know.
Gracias,
Luis E.
|
|
|
|
|
Insert the group box into your dialog resource. Then, anywhere inside the dialog code, GetDlgItem(IDC_YOUR_GROUP_BOX) (or whatever identifier the box has) will give you a CWnd * on which you can call ShowWindow .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Just to make sure. Are you aware that showing and hiding a group box will not show or hide the controls in that box?
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Hi all,
Is TAPI 2 capable of dialing digits on a line while a call is in progress, i.e. to respond to voice mail options?
Thanks!
--Two Magic Lovers
|
|
|
|
|
Yes, use lineGenerateDigits()
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Can VS7 optimize compilation for a dual-processor machine?
I have a dual-processor machine here, and I have some analysis code that completely peaks out performance - but between the 2 processors, it's only 50% system performance.
Now I'm an assembly programmer, so I don't mind doing some low-level coding to hand-optimize it, but I have this horrible feeling that WinNT is going to shout at me if I try to take it over.
Any thoughts? Do I need a new compiler?
J
|
|
|
|
|
Just from the top of my head.
If you have only one thread, I think a second processor is useless. Having multiple processors is usefull only for multi-threaded apps or when running multiple processes.
----------------
Blaster
Computer game programmer and part time human being
http://www.blastersoft.com
|
|
|
|
|
I'm not 100% sure, but I'd say Windows OSs do not distribute a given process execution among different processors --they only assign processes across processors to balance the load. So to take advantage of a 2-CPU machine in a single program, you should be launching processes from the app, much the same ay as you would with threads.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hmmm. This is my understanding as well... So it's going to be a major pain in the ass to share the data between processes.
J
|
|
|
|
|
It is not that hard. Use shared data segments for accessing and named mutexes for synchronization.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hmmm. I think they (Windows OSs) do distribute thread among CPUs. Take a look at SmartHeap SMP (http://www.microquill.com), it seems to talk about heap allocation with multiple processors.
----------------
Blaster
Computer game programmer and part time human being
http://www.blastersoft.com
|
|
|
|