|
Hi All,
My app uses a MS Access db that is password protected. I have a new requirement that I create a copy of the db that is not protected (I'm using DAO). Is there a way to unset the password of the copy from within VC++? I guess I can always build the copy from scratch (so the password isn't copied), but that would be a pain.
Thanks.
Paul Ebert
pebert@ix.netcom.com
|
|
|
|
|
Check out the MSDN article "TN054: Calling DAO Directly While Using MFC DAO Classes".
|
|
|
|
|
Hi all,
I want to make a 2D array of CString in MFC.
Can I know if it is possible and how to declare and make it work??
Thx for your help!
|
|
|
|
|
Don't hate me but I don't think you can do it. I gave up after trying for a week. Currently I'm using linked CStringArray objects. Not neat but works.
|
|
|
|
|
Why I need to hate you that you gave me advice? ^v^!
Anyway, can I know how to use CStringArray to construct a 2D array? Can you show me how to use and declare it?
Thx for your sincere help!
|
|
|
|
|
|
I think I misunderstood something. (Read it at 4.30am so...)
What I tried to do was a 2D CStringArray, derived from CStringArray, so that I could dynamicaly assign CString objects and have the array class allocate and clean up at run-time. I'm using "CStringArray fred[ 2 ]" at the moment. This is not neat at all as I said but works OK. I ass-u-med the original post was about this.
|
|
|
|
|
Hi
Today I bumped into this. I'm working on an MFC app. When I link MFC statically, something goes wrong when the application terminates. A box comes up with "Memory 0x0000 0000 referenced 0x0000 0000, Memory could not be read", I can abort or debug.
This only happends when linking statically to MFC. It doesn't matter which configuration I use, both debug and release behaves this way. I've tried to debug ofcourse. I can follow the execution out of WinMain, but not further.
Any ideas?
|
|
|
|
|
Hi,
I have an application that draw numerous line of text in the main window (this text is drawing from a printing class that I want to send to the display device context).
When I scroll the window, the lines of text are repeated (similar to a figure that is separated when we scroll).
I have put in OnDraw functions like SetROP2 and SetTextColor with CLR_NONE.
But I am not sur that is the good way.
Anybody has suggestions ?
Thanks
Claude
|
|
|
|
|
You mean scrolling does not work ? You need to use GetScrollPosition() to position your text based on where the scroll bars are.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
For this problem i used MFC with Visual Studio 6.
I've some question and i'm not sure if what i want is possible. Maybe you
can help me. I want to create some very simple multithreaded environment for
activex controls. I know there are the synchronization issues with
multithreading but that will be a next step. For now even the basics doesn't
seem to work with me.
I want to created a container control. In design time it acts
just like a normal activex container. You can put other activex controls on
it. The container control can be hosted by an other container such as a VB
form. In runtime it spans a CWinThread object and creates a window in that
threat. The window is a child of the VBForm and a parent of the activex
control container. Which makes the activex control and it's children running
in a new thread. This is the theory
I manage to create a window in a CWinThread object. I manage to put the
window between the form and the activex control container. When i look with
spy++, the window between the form and the container is running in a new
thread as i expected. But the control container and it's controls are still
running in the same thread of the VBForm.
I used a override of the CreateControlWindow method of COleControl to
reparent the control. Maybe this is way to simplistic. I also tried the
ReparentControlWindow override with the same effect.
Is it possible what i want ??
Is it more complicated then i at first thought ??
Are there hooks in the MFC control creation process that allow this ??
Do i've to create the controls dynamically from within the new threaded
window ??
|
|
|
|
|
How can I open a web page in the default web browser of my system?
Thanks!
Erik
|
|
|
|
|
Call ShellExecute() and pass it the URL, and use "open" as the verb.
--Mike--
http://home.inreach.com/mdunn/
Time is an illusion; lunchtime doubly so.
|
|
|
|
|
Does anyone have HTML Parser in Visual C++ for reference?
Thank you.
|
|
|
|
|
Vickie
I been looking for a parser myself, I need to parse raw HTML fetched from a Winsock connection.
In the end I wrote my own, but it is specific in the way that it only parses links.
If you get a copy of WebFerret (www.webferret.com) and do a search for "C++ HTML Parser" you'll find some a parser written for Unix, but I'm sure with little effort could be ported over to Win32.
Regards
Norm
|
|
|
|
|
Vickie
I been looking for a parser myself, I need to parse raw HTML fetched from a Winsock connection.
In the end I wrote my own, but it is specific in the way that it only parses links.
If you get a copy of WebFerret (www.webferret.com) and do a search for "C++ HTML Parser" you'll find some a parser written for Unix, but I'm sure with little effort could be ported over to Win32.
Regards
Norm
|
|
|
|
|
In my program, I just want to parse the contents, headings, frames and links. However, followed what you've adviced, I could only find XML parser in C/C++ but none for html. Can you give me more advice or if you can show me some coding?
Thanks!
Regards,
Vickie
|
|
|
|
|
If you don't need to format text, this might not be too difficult.
Hmmm... lets say you can load the whole page into, say, a CString. Work directly with the file stream if you like, but a CString or string might allow less code for a prototype.
Every item you're interested in will start with a '<' character. As you travel through the string Find ing this character, you examine the chars that follow (perhaps using Compare and Left(position, strlen(tag)) (remember to discard initial white space) to see if they match one of the keywords you're interested in (H1, H2, href etc.) and take action. If the chars after the the '<' don't match anything you need, just go back to looking for the next '<'.
This is very much 'context free' parsing, and is something that HTML lends itself well to - writing a browser gets a lot more complicated, but for what you want to do this might be a good start. Probably only 'context' you have to deal with is remembering you have seen a <tag> when you encouner a </tag>
There are certainly some details to work out as to how you store and parse the tags you're looking for, but start small and you'll probably find a reasonably efficient setup. I bet you could do something quite elegant with the STL containers, if that's your cup of tea.
You might also search for some web spider code - there's bound to be some link parsing you can borrow in that type of app.
|
|
|
|
|
Thanks a lot for your detailed advice! I am trying to write the parser now! Hope there is good news few days later!
|
|
|
|
|
Just noticed that Andrew Koenig / Barbera Moo 's article in Januarys CUJ has a routine (p48) for finding URLs in a text string.
Worth a look, if you're interested in an STL solution.
|
|
|
|
|
How can I put a button (bitmap) next to the minimize button on the title bar
|
|
|
|
|
Why would you want that? It's not quite regular behavior to do that. (At least, not at this moment yet).
I think this article may be very useful.
G'luck!
--
Alex Marbus
|
|
|
|
|
Hi:
I want to know is there any way to view (load into the program if possible) if not just is there any viewer for this type of files, so that I can call that application in my program in away or another. I'd appriciate any help.
thank-you
|
|
|
|
|
Hello
does anybody know if it is possible to use a vaiable datatyp in a template header. for instance
template <class vartyp=""> ...
the reason is that i would like to get the name of my varTyp from an external file.
or does anybody has another solution?
greetings
|
|
|
|
|
Hello!
We have a service running under Win2k, and the problem is that we doesn’t know when a user has logged on and the Taskbar on the desktop is created. We need this information to create our System Tray afterwards, so that it will surely appear on the Taskbar.
We have tried to solve this problem by implementing a Notification Packet DLL, which Winlogon.exe loads automatically and calls a registered logon function that was implemented in the DLL. This function will then inform MTS that a user has logged on. There is however, an uncertain span between the time when Winlogon calls this function, and when the taskbar is created on the desktop.
We would like to ask which message or notification our service should subscribe, which will be sent to the service only after the taskbar is created?
Thanks in advance!
Mathias Tunared
Ericsson Enterprise AB
Sweden
|
|
|
|