|
In the project I work for, every time we have problems with the Crypto API is because the host don't have the high encryption pack installed (since we are using high encryption).
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
I have a CDialogBar derived object attached to the bottom of my MDI mainframe window. Works fine, except it is left justified in the frame/bar...I want it centered in the frame.
How do I do this?
I have tried overriding the OnWindowPosChanging and setting the position that way...which moves the window ok, but leaves garbage to the left of the window.
Gary Kirkham
A working Program is one that has only unobserved bugs
|
|
|
|
|
Try with void DockControlBar( CControlBar * pBar, UINT nDockBarID, LPCRECT lpRect) but specify lpRect for size and position, nDockBarID is ... well I guess you get the idea!
VOTD: 27 "Religion that God our Father accepts as pure and faultless is this:
to look after orphans and widows in their distress and to keep oneself from being polluted by the world." - Jam 1:27 (NIV)
|
|
|
|
|
i need to drag and drop menu items (or popup menu), do u know how to do it? any sample or idea will be great!
thx
includeh10
|
|
|
|
|
i develped an app, it has been used by customers for over 2 months (at least 16 hrs a day - for machines) with no problem, but i still warry about it, really need ur suggestion.
my question is:
in the app, i used a large buffer, some code as following:
//the large buffer, iSize>100,1000
char*pszBuf=new char[iSize];
char*p0=pszBuf+100;
char*p1=pszBuf+1000;
char ch=*p1;
*p1=0; //key point to warry, temp break the string
CString cs=p0;
*p1=ch;
in this way, access can be in high speed, main app uses in the way always (say, once/50 ms).
there are 3 threads use the buffer at same time (read only) and access whole buffer.
at first, i thought there must be troubles because i broke the buffer with *p1=0 and other threads can't access whole buffer. but after 2 months, no any problem!
in theory, i need to lock the buffer while doing break, but it is too complicated to do so.
why no problem? am i luck or OS helps me to do something i don't know?
thx.
includeh10
|
|
|
|
|
You should definately use locks and they are damn easy to use. Just look at EnterCriticalSection and LeaveCriticalSection functions in the MSDN documentation.
Mustafa Demirhan
http://www.macroangel.com
Sonork ID 100.9935:zoltrix
<nobr>They say I'm lazy but it takes all my time
|
|
|
|
|
'includeh\a'
Why do you worry about it? It's not the best piece of code that I have seen for sure but why are you worryied right now? It works since you are doing only 'read' access (I still think one thread is writing there...somehow!) or it doesn't matter if one thread reads last value stored (for one of these bytes) while other thread is writing. In anycase, the best solution is to synchronize access to your buffer.
VOTD: 27 "Religion that God our Father accepts as pure and faultless is this:
to look after orphans and widows in their distress and to keep oneself from being polluted by the world." - Jam 1:27 (NIV)
|
|
|
|
|
Yes, this looks rather dangerous.
Have you ever tested it on a 2 CPU machine? The probability it breaks there is much higher!
I would strongly recommend to use CriticalSections. CriticalSections cause a penality only if really two threads try to access it at the same time, which is not that probably because your threads access the buffer only every 50 ms.
Because your threds would lock the buffer only for a very small period, I would also recommend to use InitializeCriticalSectionAndSpinCount to set a small spin count for increased performance on SMP machines
--
Daniel Lohmann
http://www.losoft.de
(Hey, this page is worth looking! You can find some free and handy NT tools there )
|
|
|
|
|
Does anyone know where I can find some information on building an application database for the Windows CE handheld using (ADO or DAO) and SQL using Visual C++?
I've found VB code all over the place but the device I'm working on doesn't support VB.
Thanks.
|
|
|
|
|
I'm working on an ODBC database using Access as the source. I would like to use the SetModifiedFlag(); function so the user will be prompted to save when they change a record. When I tried implementing this I just get an error saying that it is an undeclared identifier. I am using CFormView as my base class.
I'd really appreciate any assistance.
Thanks
|
|
|
|
|
The SetModifiedFlag function is a member of CDocument. Try this instead from your CFormView derived class:
<br />
GetDocument()->SetModifiedFlag();<br />
Chris Richardson
|
|
|
|
|
Hey, thanks a lot Chris! The simplest of solution; huh? I'm real new to all this, but I'm learning.
Garry
|
|
|
|
|
Hi,
I am trying again. maybe this time I will get lucky..
I have a program based on a FrameWnd that contines a splitter with left side tree control and right side list control, everything works great....
From the menu of this application I activate another window which is also a FrameWnd that contains a list control. After I respond to a double click on this list control, the main window pops up and cover the second one
If I try SetFocus() right after the handling of the double click, I will cover something I dont't want. The only question is why the parent window decides to pop up ????
Any questions are welcomed, I can even send the source....
Thanks
Shay Harel
|
|
|
|
|
How can one autofill fields in IE or Netscape. I understand the two maybe completely different ways. I do not wish to use the functionality that comes with the browser for autofill. I have the information in a database and then need to launch the browser and then fill some fields.
Any ideas?
Thanks
|
|
|
|
|
If by autofill you mean put a value in the textbox initially, right when the page loads, add a value="whatever" attribute to the <input> element.
-Domenic Denicola- [CPUA 0x1337]
MadHamster Creations
"I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."
|
|
|
|
|
Depends if you are on the client-side or on the server side :
- on the server side, the solution will work for ALL browsers including Opera as well :
your web server is a proxy server. Surfers surf the net through your web server by urls of the form http://www.yoursite.com?url=... where ... is the URL of the target site.
What you do is that you get this request, you DO yourself the request against the target URL, retrieve the HTML, and once you've got the HTML you must do two things :
- remap all relative links to absolute links by adding http://www.yoursite.com?url= prefixes
- parse the HTML source code and fill out yourself all recognized forms in it, such like those for login, and so on.
Using PHP or ASP that's very easy. Even a dumb can do it.
That's it !!
- on the client-side, it will work on IE only. Do a C++ app, MFC-based is highly recommended. Do an app that wraps the web browser control. And override the OnDocumentComplete() event. That will give you access to the DOM once the HTML page is retrieved. Using the DOM, you can easily find form fields (there is even a collection for forms), and apply new value for recognized forms such like login, ...
That's it !!
And I swallow a small raisin.
|
|
|
|
|
Its client side but I cannot wrap the IE control. What I need is the ability to launch the browser and fill the fields. Sort of how Gator does it. In case you have not used Gator, it memorizes all your entries and then fills up fields as you reuse these pages.
I do not want my application to pick up what the user types. Simply fill in from a database after IE is launched. Cannot have an embedded IE control though.
Thanks
|
|
|
|
|
Gator is scum. If you are developing such IE extensions and intend to sell it, be ready to be assaulted by many folks who really don't want this in their browser.
If you provide the exact same features than Gator, then I don't know where you are going.
Besides auto-fill features, which by the way is built-in in IE (that's why users will not buy or even download a client-side toolbar for it), you'll spend most of your time answering back users for proof of whether or not your IE extension is doing any harm to their privacy. I know what I am talking about...
Believe me, if your project is just for fun, go on, I believe that's fun achieving it. And for this purpose I recommend you download the samples that were available with the Internet Client 4.0 SDK : you'll have sample of deskbands, commbands, and so on. Hopefully these samples are still available with MSDN CDs. I recommend you get the back issues of MSDN magazine (available free on MSDN site) : there are very very good articles and samples,
And I swallow a small raisin.
|
|
|
|
|
I am aware that Gator is crap and thanks for your marketing stratgey advice. No I am not interested in making any product and selling it to anyone. I am simply working on something and used Gator as an example to get some technical answers. But that seemed to have gotten lost. Thanks all the same.
|
|
|
|
|
And I hate it when I forget to log in and it puts in my reply as anonymous.
Have a good day you all.
|
|
|
|
|
Hi
A famous Newbies example to declare a CString was
CString welcome_string = "Welcome to Visual C++";
What if I want to declare a text that was as long as one paragraph? when I can't even do things like this
CString welcome_string
="Welcome to Visual C++...not finish yet continue next line
.....more text ";
there was a "newline is constant" error. Please help
Newbies
|
|
|
|
|
you need a "\" as this:
CString welcome_string
="Welcome to Visual C++...not finish yet continue next line\
.....more text ";
to let the compiler know that this line is not finished.
try it.
|
|
|
|
|
Thanks. I never thought it was so simple. What a shame.
What if I want to force it to make a newline?
Newbies
|
|
|
|
|
A new line in the text? Use \n , there's others too like \t for tab, \\ for '\', etc. Look these up (or 'escape sequences') in MSDN for more info
Dylan Kenneally
London, UK
|
|
|
|
|
Thanks
I've look at MSDN and you were right.
but when I want to type like this
CString welcome_string
= "Hello\ \n
World";
so that Hello and World are in different line, there was a "newline is constant" error.
Newbies
|
|
|
|