|
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
|
|
|
|
|
Ummm... Yeah, you're right. Even NT 4.0 allowed for threadwise multiprocessor support. It is stated very clearly here[^].
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Yes, but you don't get better performance from a single thread. You'll just see, in the task manager, that both cpu's uses about 50% each
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
You can use the API SetThreadAffinityMask to tell WinNT which processors a thread can run on. So if you've got two threads and two processors, make two calls to SetThreadAffinityMask giving it each thread handle and each different processor affinity mask. Like so:
<br />
SetThreadAffinityMask( GetCurrentThread(), NOT_SURE_HOW_TO_GET_THIS_VALUE );<br />
<br />
SetThreadAffinityMask( GetCurrentThread(), NOT_SURE_HOW_TO_GET_THIS_VALUE_BUT_IT_WILL_BE_DIFFERENT_THAN_ABOVE_VALUE );<br />
<br />
There's also SetThreadIdealProcessor, but I don't think that would be super reliable, as it is only a request.
Chris Richardson
|
|
|
|
|
As others have said, you need a thread per processor to get better performance...
If you play around with the cpustress.exe utility you can see it very clearly
You can find cpustress in the platform sdk's bin folder
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Windows balances threads, not processes. A single process, with multiple threads, will be balanced by the O/S. Of course, like any multithreaded application, you have to make sure that thread arbitration doesn't bog things down.
Gary R. Wheeler
|
|
|
|
|
In my application, I have lots of top level windows. The only styles I set are WS_EX_TOOLWINDOW (extended style) and WS_POPUP (normal style). That makes border-less windows that do not add a button on the task bar.
I have a registered a hotkey to show all the windows from anywhere. It works perfectly.
What I am trying to do now is find a way to send those windows to the bottom of the Z order, behind all other windows and the give the focus to the window that had the focus before the windows where shown.
SetWindowPos with HWND_BOTTOM (and SWP_NOSIZE | SWP_NOMOVE) should do that trick, but it doesn't. The function is called and returns a success, but the windows stay in from. I tried not setting the WS_EX_TOOLWINDOW style but it doesn't change anything.
I have looked for HWND_BOTTOM (and MFC's wndBottom) in the message board, on CodeGuru's message board and on Google. I saw someone with the same problem, but there was no reply. It was either a copy-paste of the doc with the message related to HWND_TOP, or the doc itself.
----------------
Blaster
Computer game programmer and part time human being
http://www.blastersoft.com
|
|
|
|
|
Try setting the desktop as the parent of your top level windows (no success guaranteed ).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Yeah, I know about GetDesktopWindow but I always thought it was the same as specifying null as the parent.
By the way, no luck, it didn't work.
----------------
Blaster
Computer game programmer and part time human being
http://www.blastersoft.com
|
|
|
|