|
One solution is WM_CHAR message.
Kuphryn
|
|
|
|
|
|
I suppose it could just be that the line.length is reporting the length of the line with a newline and carriage return character stripped out, but the tellg is "telling it like it is"
|
|
|
|
|
ldsdbomber wrote: I suspect this is something to do with each line having a newline/carriage...
Put the call to tellg() in the for loop to know for sure.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
I have been scouring the web, msdn, and the help files trying to figure out how to do this, and have gotten nowhere except a web of abstract articles on Active Directories, and I'm not really sure A.D. is what I need to use to do this.
Can someone please point me in the right direction?
Thanks in advance for any help you can give.
-Mike the Red
Extra Details, just in case they're relevant:
I'm using DAO to access a database on another computer on the network, which fails if the local machine does not already have an open connection to the server computer. I'm looking to check for the connection before opening the DAO object, and create the connection if it's not connected.
I have serviceable, though not pretty, methods for checking the connection, but have no idea how to create it.)
|
|
|
|
|
Mike the Red wrote: I'm using DAO to access a database on another computer...
What does this code snippet look like?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
To simplify the process, this is the code snippet to open a DB that uses the default system database (usr/pass db).
#include <afxdao.h>
CDaoDatabase* daoDB = new CDaoDatabase();
try {
daoDB->Open("\\\\Main\\E-Drive\\DB\\Operational.mdb", false, true);
} catch (CDaoException * daoE) {
return false;
} catch (Exception* e) {
return false;
};
if (!daoDB->IsOpen()) {
return false;
};
Thanks again,
Mike the Red
|
|
|
|
|
So what exception is thrown, or what error do you receive?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
The daoDB->ReportError() method reports:
The Microsoft Jet database engine cannot open the file '\\Main\E-Drive\DB\Operational.mdb'.
It is already opened exclusively by another user, or you need permission to view its data. If, however, I open My Computer and type '\\Main\E-Drive\DB\' (or any valid path on \\Main) in the address bar, it prompts me to enter my user/pass, and then displays the contents of the drive/folder.
After doing that, if I run the program again, I will no longer receive the error message and the DAO engine can access the file without issue.
(It also works if I map a network drive to some share on \\Main .)
My problem is that I can't seem to find a way to programatically connect to \\Main so that the share can be accessed.
-MZR
|
|
|
|
|
Would is be acceptable to call NetUseAdd() first to map a drive letter to \\Main\\E-Drive, and then use that drive letter in the call to Open() ?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
I don't know how none of my searches turned that up, but thank you. I pulled up NetUseAdd in the help file, and the first thing (ok, second thing) it says is that you don't have to actually map the drive - you can use it to just authenticate with the server for future transactions. This should be perfect!
Thanks, Mr. Crow - what a great help!
|
|
|
|
|
Hello,
I am using an user defined List Control in my application. (CXListCtrl provided by Mr. Hans in Code Project).
If any other window (whose size is less than the size of Control size) is placed and removed that area is not repainted. When I checked OnPaint () of the implemeentation of control is left for default by calling Default () function. I tried to replace Invalidate () before that but it goes for indefinite loop as Invalidate () also invokes OnDraw function.
I tested by invoking a notepad making the size of it less than the size of List control, place it on top the control and switch back to my application. I find the area of notepad being blank. Placing some TRACE Message I found that OnDraw () function of the control is called when i do that test. But since Default () function is called it is not painting that area.
Can any one suggest me what can be done to avoid the repainting problem?
I am developing an MFC SDI application in .NET environment on Windows XP.
Thanks for your Time
Ravi
|
|
|
|
|
Hi I am building a client/server application based on TCP/IP. The Server is running and client can connect to it. Now I want to show a Folder Dialog on client that lists the contents of Server. The client needs to select a folder on Server.
Anyone with suggestions? code examples?
thanks
Adnan
|
|
|
|
|
ariaz wrote: suggestions?
Imho, the appropriate way to do this is for your server to support a request that lists the contents of a folder under its control (much like an FTP server, a nice sample of which can be found here[^]). The client app will make requests off the server as and when it needs to expand a folder in the tree control displayed to the user.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Hi Friends
Do u have any idea for comparing two bitmaps images . Any code in c /c ++ ?
thanx in advance
|
|
|
|
|
What do you want to do ? Can't you simply check if each pixels are equal in both images ?
|
|
|
|
|
Cedric I think that this isnt a good way but possible that he check for each pixel in bitmaps in a loop(only a for)
but usually width and height aren't equal
so 1-first create a bitmap in screen that width and height are same(800x800) and draw bitmap in this screen also for bitmap2
then in one loop read pixels from bitmap1 and bitmap2
Is it possible?
|
|
|
|
|
I don't think the problem is defined well enough for any kind of reply. Do the bitmaps have noise? Like, for example, the ones that come from a live camera? Or are they synthetic (computer generated)?
What does the comparison try to obtain? The diferences? In which form? In the form of a diferential image? Or in the form of a list of diferene regions and their bounding boxes, for example? Or does the comparison result in a flag that says something like "image 1 = room empty", and "image 2 = intruder detected!!"?
Rilhas
|
|
|
|
|
I tesed this way many years but in the case very simple
and compare two bmp files and its worked.I had one bmp file and search for another bmp files with this way.
|
|
|
|
|
hi all,
i want to wake a System using Remote Machine which is Running state. please give me steps how to proceed for WOL (Wake on Lan).
thanks,
uday.
uday kiran
|
|
|
|
|
|
i want to develope one pop up blocker.... i can't get the concept actually...
if somebody knows., i wish to hear it.. source code can also be invited..
do the needful
Ravi Chandran.C
|
|
|
|
|
The basic concept is simple - prevent any new windows from being created. Things get a little complex when you have to differentiate between intentional creation of a new browser window by a user, and malicious ones. Even moreso if you start doing things like examining the HTML document for onload Javascript events, or rewriting the HTML script itself.
For a start, take a look at the WebBroswer Control documentation in/on MSDN, especially the DWebBrowserEvents2 interface and the BeforeNavigate2 and NewWindow2 events.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
since i'm a beginner in VC++., i need some sample code to develope it...
Ravi Chandran.C
|
|
|
|
|
hi,
can somebody let me know what is the nmake syntax & option to be given to build a dll..
Is there any changes to be done in .mak file for converting a win32 application's nmake to build a dll...
Thanks,
|
|
|
|