|
I used spy++ to trace messages of my program, but did not get any WM_QUIT message.
So I'm afraid if it would take effect if I work with the WM_QUIT message.
|
|
|
|
|
Well I'm pretty sure that's what happens when you press the big orange 'X' button.
Try this and you'll see what it does. In any of the drop down menus you have create an option called "Quit" and in the code just put
PostMessage(WM_QUIT, 0, 0);
That will quit the entire app.
|
|
|
|
|
Hello all. I'm in a big problem. I'm opening a file and I'm getting the size of the file someway like this:
<br />
long nFileSize;<br />
ifstream objStrmReader;<br />
<br />
objStrmReader.open("my file.txt");<br />
objStrmReader.seekg(0, ios::end);<br />
nFileSize = objStrmReader.tellg(); <br />
and it is working quite well. But then, my "boss" told me that the file I'm opening can be of -be prepared- 17 GB long! This because it can be an Oracle dump file, and it can be that huge! So I'm in trouble here, because ifstream::tellg() returns a long value, and I'd need to return me a double, so I can hold the value (because with long I get an overflow).
Does anyone can help me with this? Thanks a lot.
Kith Kahnan
|
|
|
|
|
Use the Windows SDK functions to work with the files if you can.
SetFilePointer(...);
or
__int64 _filelengthi64(...);
Both of these function can do what you want.
Good Luck!
INTP
|
|
|
|
|
I am developing a user interface software using VC++ 6.0. I have a written document that tells a user how to use the software but I don't know how to link it with Help menu. Any help with it much appreciated.
|
|
|
|
|
I am trying to write code that takes data from an MS Acess Database, and moves it to software I purchased called Problem Tracker. I purchased their SDK, and they sent a dll file along with a list of functions on how to upload records. What I can't seem to figure out is how to use ODBC to access these records from my Access database and apply them to these functions. Any links you could throw at me or advice on where to start would be greatly appreciated.
|
|
|
|
|
Hi,
Is is it possible to check if SQL Server Agent is running and if it is not running start it to schedule tasks from MFC app in VC++.net
Any help is highly apprecited!
Thankx
|
|
|
|
|
SQL Server Agent run as Service in Window2000 and above
So u have to use service api' to achieve that.
here are API's
1->OpenScManager -->open Service Database of local system
2->OpenService -> Open the Particular service
//now check Status of Service
3->QueryServiceStatus
and to run service
4->StartService and to stop service ControlService
or you can look at this article
http://www.codeproject.com/useritems/AMFSServiceManager.asp[^]
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Thanks a lot for pointing me in right direction.
I think I can manage things from here
|
|
|
|
|
I got a little proglem here though
The computer which I am interested in is on LAN. that is the computer running SQL SERVER and where SQLSERVERAGENT service should be running.
the problem is
OpenSCManager function returns RPC server not available if I use the following call:
::OpenSCManager( "\\servername", SERVICES_ACTIVE_DATABASE, SC_MANAGER_ALL_ACCESS );
and it paase and returns a handle if I make this call
hscManager = ::OpenSCManager( "servername", SERVICES_ACTIVE_DATABASE, SC_MANAGER_ALL_ACCESS );
the subsequent call to ::OpenService passes if i do this
hscService = ::OpenService( hscManager, serviceName, SERVICE_ALL_ACCESS );
but then the call to QueryServiceStatus fails if i do the following
::QueryServiceStatus( hscService, lpServiceStatus )
the error code says Invalid Handle (i assume hscService ).
What am i doing wrong here?
If the calls to openscmanager and openservice paas the QueryServiceStatus fails. but if I append "\\" to the servername the openscmanager fails.
what is going on here??
Anyone can help?
|
|
|
|
|
Ok. I've tried putting in every valid path combination in the projects settings, but the .obj files ALWAYS ends up under $(ProjectDir)/Debug. No matter what I do. Any ideas?
/Rob
|
|
|
|
|
I remember having problems with this a while ago.
Check that the 'Object File Name' (C/C++ - Output Files) is set to the location that you expect, if visual studio can't work out what the location means it will output to the default location (with no warnings or errors). Specifically check that you have a trailing slash.
$(IntDir)/
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts your aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Will check that. Because the odd thing is that the buildlog.html file does end up in the directories specified, but not any of the output files *.obj etc. etc.
Thanks Andrew.
|
|
|
|
|
Indeed Andrew,
I think the problem arised from having VC++ 6 projects ported to VS .NET . The "output files" section as you pointed out, was ".\Debug/" . By clicking the combobox and selecting "<inherit project defaults>", the correct path was setup, i.e. "$(IntDir)/" and everything worked A OK.
Thanks again Andrew,
/Rob
|
|
|
|
|
I'm trying to hide various portions of a window, much like what windows media player ( versions 9 and 10, i believe ) does with the titlebar... only im trying to hide the bottom of the application instead of the titlebar. Does anyone know the window properties i need to manipulate to perform this?
I don't want to just make the window height 0 because that really isn't efficient, in my opinion.
Thanks in advance for any help
Regards,
will
|
|
|
|
|
Blast! I forgot how to do that. But never fear there are a lot articles at CP that tell you all you need to know. Windows, button, etc...
Have Fun!
INTP
|
|
|
|
|
You can do something like that using SetWindowRgn()
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Does anyone know how i can check a menu item? evrytime i click this item in the menu i want it to get checked
the menu is from resource...
I have no idea
|
|
|
|
|
search for CMenu::SetCheck() or something like that...
TOXCCT >>> GEII power [VisualCalc]
|
|
|
|
|
If you made own class like MessageBox from what class it would be derivatived and why?
|
|
|
|
|
if you mean you want to reproduce MessageBox-like Classes, CDialog seem to be a good class...
otherwise, please precise a bit more what you want.
TOXCCT >>> GEII power [VisualCalc]
|
|
|
|
|
Yes, I want to create a MessageBox-like class with extended features. But, why not CWnd class instead CDialog?
|
|
|
|
|
because CWnd is not a class for dialogs... or you recreate your own CmyDialog !!??!! i advise you not to... lol
use CDialog to create dialog boxes...
TOXCCT >>> GEII power [VisualCalc]
|
|
|
|
|
ell, thanks you.
I'll think about this.
|
|
|
|
|
Is there a trick displaying large document with ScrollView in SDI MFC?
Currently my text display stutters and scroll lags behind when I scroll the document.
|
|
|
|