mfc >> ShellExecute().......Quiet urgent..........

by priya » Mon, 20 Mar 2006 14:19:54 GMT

hi
Priyanka here....

i am trying to open .chm file from my VC++ application.
first of all, i was not able open the .chm file due to some dependency.
each time i was asked to specify the path for htmlhelp.pdb. i was
unable to track the problem. Then i used ShellExecute() to open the
.chm file.
Now the file is getting open. but its not getting closed with the
application. so, now
1. i am not able to get which all windows are open as child windows of
the main application.
2. as i am not having handle of the child window, i am not able to send
close message to the
window.

Is anybody knows how to close all the windows before closing the main
window, please help........me out............

its quiet urgent...........


regards,
Priyanka



mfc >> ShellExecute().......Quiet urgent..........

by Mar Kon » Mon, 20 Mar 2006 18:16:35 GMT


Hi

Use

HWND
WINAPI
HtmlHelpA(
HWND hwndCaller,
LPCSTR pszFile,
UINT uCommand,
DWORD_PTR dwData
);

or a Unicode version from HtmlHelp.h




mfc >> ShellExecute().......Quiet urgent..........

by Tom Serface » Tue, 21 Mar 2006 00:07:56 GMT

You could use CreateProcess() to start the help engine:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createprocess.asp

or

You could use ShellExecuteEx() and look at the process that started so you
could close it if it is not a NULL return.

Tom







ShellExecute().......Quiet urgent..........

by Galito » Tue, 21 Mar 2006 11:41:08 GMT

Have you try to pass your main windows HWND as a parameter to the
ShellExecute function?



ShellExecute().......Quiet urgent..........

by priya » Tue, 21 Mar 2006 12:09:52 GMT

Thanks dear
it was quiet urgent and i solved the problem by using HTMLHelpA() API.
but still it asks me for HTMLHelp.pdb file in the debug version.
i am not sure whether this may impact somehow in the release version or
what?

Thanks........
Priyanka



ShellExecute().......Quiet urgent..........

by Mar Kon » Tue, 21 Mar 2006 17:10:48 GMT

The pdb file is the Program Database File for Debug release purposes.
Try to change the options in the project properties under C\C++ ::
Debug Information Format. Also, don't bother with the release - it
should run fine, unless you specify to use the pdb in this release (you
shouldn't).



Similar Threads

1. using ShellExecute...very Urgent

2. Setup Installer Moide Quiet

Hi,

I show a new windows forms in my class Installer : method 
Install(stateserver)..
But when I launch the setup in mode quiet (msiexec /quiet) I don't want to 
show this forms... How can I test this mode in my method ???

Thx

3. Quiet MessageBox?

4. Quiet message box with MessageBoxIndirect

I'm trying to make a message box that shows without playing system
sound. I've read this could be done with MessageBoxIndirect. I have
the following code:

MSGBOXPARAMS msg;
msg.cbSize = sizeof(msg);
msg.hwndOwner = m_hWnd;
msg.hInstance = AfxGetInstanceHandle(); //NULL;
msg.lpszText = "Hello world";
msg.lpszCaption = "Error";
msg.dwStyle = MB_OK|MB_USERICON;
msg.lpszIcon = IDI_ASTERISK;
msg.dwContextHelpId = NULL;
msg.lpfnMsgBoxCallback = NULL;
msg.dwLanguageId = LANG_NEUTRAL;

//MessageBoxIndirect returns 0
int ret = MessageBoxIndirect(&msg);

//GetLastError returns 0.
int err = GetLastError();

But no message box shows with this code. MessageBoxIndirect return 0,
and GetLastError also return 0. If I change hInstance to NULL, I see a
message box but there is no icon (but there is an empty area reserved
for the icon). I want to use the asterisk icon.

This code doesn't work on Windows 98, but it works as it should in
Windows XP.

PEK

5. Quiet In Here Tonight

6. Compile-time constant quiet NaN (double) ???

Running VC++ 6 under Win2K on i386.

I would like to assign a (compile-time) constant that resolves to a
quiet NaN (of type double)

I can assign a quiet NaN to a *variable* (of type const double, say)
by eg.:

    const double qnan = fmod(1.0,0.0);

but - for efficiency reasons - what I really want is a (compile-time)
constant:

    #define QNAN ???

Now I have established that (on my system at least) the type __int64
is the same size as a double and that a quiet NaN corresponds to an
__int64 with a value of -2251799813685248. However, the "obvious":

    #define QNAN -2251799813685248i64

will not work, since an assignment eg.:

    double x = QNAN;

will cause the QNAN to be *cast* to type double, so that x will have
the value -2251799813685248.0

Is there a way to "turn off" automatic casting, so that an assignation
as above simply copies byte-for-byte?

Any ideas much appreciated,

-- 
Lionel B

7. testing for quiet not a number (QNAN)

8. understanding quiet and signalling NaN