|
If you have IE installed, it should be associated already through registry I guess, unless you did some registory edits.
|
|
|
|
|
If there's no app associated with .HTM(L) files, then either a) there's no browser installed; b) the registry is horked; or c) the user went in and manually deleted the association. None of which you can do anything about.
--Mike--
http://home.inreach.com/mdunn/
Time is an illusion; lunchtime doubly so.
|
|
|
|
|
hi,
I'm working on a program that needs to insert complete files in a Jet database. There can be ASCI as well as binary files. I'm writing the program in Visual C++. Could anyone give me a hint or reference on how to do this?
Regards,
WimB
|
|
|
|
|
It's been a while that I'm trying to get information on that, any help will be precious :
I'm trying to get information (the path for example) of the current focused Explorer Window. I found a way, but it's not clean at all :
// #1 get previous window Hwnd
HWND current = GetSafeHwnd();
prevhwnd = ::FindWindow("CabinetWClass", NULL);
// #2 find the ComboBox called "addess" in the explorer window
::EnumChildWindows(prevhwnd, EnumChildProc, 0);
// #3 now, we have g_combohwnd = CComboBox HWND
CComboBoxEx *cb = (CComboBoxEx *) FromHandle (g_combohwnd);
// #4 get the text in the combobox edit zone....
::SendMessage(cb->m_hWnd, WM_GETTEXT, (WPARAM)256, (LPARAM)buf);
This is really ugly... Any idea, please ????
Roms
|
|
|
|
|
Am still looking for a Tutorial on save and load....
I cant find any help on this one.
thank you
|
|
|
|
|
I reckon no-one has answered because it's so easy. If you go to msdn.microsoft.com and look up CFile, assuming you don't want to use serialisation, you'll find oodles of information...
|
|
|
|
|
|
I'm writing a C++ console app for Windows and UNIX. When it runs, the app needs to know the directory where it's located. Of course, this may or may not be different from the working directory (which I don't care about). I need the directory where the app's file is at -- the equivalent of GetModuleFileName on Windows.
Anyone have a clue?
Thanks,
Alvaro
|
|
|
|
|
There are many flavors of UNIX. You will need to look at the system calls available for the flavor you are coding for.
|
|
|
|
|
> When it runs, the app needs to know the directory where it's located.
Check the first argument passed to "main(...)". That usually contains the path to the executable.
-=- James.
|
|
|
|
|
I am using SDI project' original printing, but for some reason what is being printed is much smaller that what is it in my screen: I know that I should be using SetMapMode but I have no clue how! Please give me some help, I'd really appreciate you comments.
thank-you
// pDC->SetMapMode(MM_TEXT*10);
for(int i=0;i<ind2-1;i++)
{
="" pdc-="">MoveTo(xypoint[i]);
pDC->LineTo(xypoint[i+1]);
}
But lines are printed much smaller than they what are.(they are smaller in printpreview either)
|
|
|
|
|
Trying to make the screen display actually the same size as a hard copy is basically impossible (Not really but in my opinion impractical). The standard program does not care if you are using a 21" monitor or a 15" monitor. It has a defined screen resolution independent of the phiysical size.
The mapping modes work with the device driver for hard copy printout to produce an acurate placement.
Most of the tutorial books cover the basics of this. My personal favorite starting point is Kruglinski's Inside Visual C++ Forth Edition. This will not go into the underlying details like Petzolts book but will get you started.
Michael A Barnhart
mabtech@swbell.net
|
|
|
|
|
why do we need to do something like mask & 1010101??
Thanks for answering
|
|
|
|
|
why do we need to do something like mask & 1010101??
Thanks for answering
|
|
|
|
|
bitmasking lets you use an unsigned datatype as a collection of flags. If you use an int then you get 32 flags that you can set. To set any of the flags you would use
var |= FlagToSet
and to check if a flag (single bit) is set you would
if (var & FlagToCheck)
which will check on a bit by bit basis and return the result. If the bit(s) specified in FlagToCheck are not set in var then the result will be 0. If any of the flags are set then it will be nonzero (actual result based on which bits are set).
|
|
|
|
|
For intercepting Messages from window applications.. Is it better to use Hook functions (SetWinEventHook) or uses Interface methods (PointConnection, IID...)?
|
|
|
|
|
There are two acceptable methods that I have used in the past.
1. Inserting a Windows Message hook which I put behind a edit control in
a separate process so I could make my windows enable and disable
depending on the content of the edit.
This worked fine and ended up being very little code, however it did
have to be in a separate DLL. (You'll want to use Spy to help you!)
2. Subclassing. I have done subclassing before but have found it confusing
when doing anything other than the simple case. This could have just
been me as I was a novice at the time.
J
|
|
|
|
|
I have a class that is derived from the CAsyncSocket class. This is used to monitor a socket on machine and works fine when used with an application. I would like to use this with a NT service. I have limited experience with services. I have read some (most?) of the MSDN documentation but feel (hope) that I must be missing some critical issues. In reviewing samples available (Nigel's work on the MS site, Koeing's and Naughters samples on the CodeGuru site) I find that all are using a loop step through until a stop command is issued which then breaks the loop. TO keep the service from running 100% a sleep command is issued. It appears that when a sleep call is issued the service is then not monitoring the socket which defeats its purpose. SO:
1) Can someone confirm I am correct here.
2) Any suggestions - a pointer to some documentation is fine. I do not mind working on this just am at somewhat of a dead end with what I have found (understand) to date.
A web server must be doing something simmilar to what I need.
Thanks
Michael A Barnhart
mabtech@swbell.net
|
|
|
|
|
I found what the issue is. It is not a sleep idle variation, MFC socket classes rely on messages posted to a window, which my service does not have.
Michael A Barnhart
mabtech@swbell.net
|
|
|
|
|
I was just wondering. I'm using a third party DLL in an application. I DO have both a release and debug build of the DLL (though no source). I have a full spec of the DLL and know what each function is supposed to do. Is there some way I can 'hook' the DLL in such a way as to 'spy' on it?
|
|
|
|
|
There are a variety of ways:-
Take a look at the deadlock detector by John Robbins in MSJ a year or so back.
That shows one way.
Alternateively write wrapper functions for each function in the DLL and call
your wrapper functions rather than call the DLL directly. Put your 'spy' code
in there.
I've also developed another technique, which uses a fair bit of assembly to
mess about with function APIs to do the job, but that has taken me a year and is
part of a product that will be for sale at some point. As you can imagine,
I'm not about to part with that info. Sorry.
Finally there is a company 'Sarion' I think that sells a product called 'APIus'
which looks like it might do the job you want. I've seen adverts in MSJ/DDJ/WDJ
for it.
Stephen Kellett
|
|
|
|
|
Hello,
i want to visualize a large (1000m x 200m) depot, but using CBmp is blasting my memory. So im lokking for a different way. Anyone got an idea ?
Greets Matthias Schikowsky
|
|
|
|
|
So,
i came across Metafiles. But is it possible to use this method, and if so, how ?
MS
|
|
|
|
|
I look for sample code for capture messages from a window application (like Spy++)
Thanks!
|
|
|
|
|
Tom the source for SPY++ is included with the PLATFORM SDK.
|
|
|
|