|
|
We want to display help files(.chm format) using HTMLHelp API in a particular format.
HH_KEYWORD_LOOKUP command is used with HtmlHelp API to search for one or more Keywords
in a compiled HTML Help (.chm) File and display it in a "Topics Found" window.
We have some issues with using the HH_KEYWORD_LOOKUP command.
1)When we invoke "Topics Found" window using HH_KEYWORD_LOOKUP command, the parent window from which the "Topics Found" window was invoked doesn't get re-drawn. When you drag the "Topics Found" Window over Parent Window, all the display of the parent window gets erased and is not redrawn. But when we invoke "Topics Found" window from HTMLHelp(chm) Window , the parent window gets re-drawn.
2)When we invoke "Topics Found" window, and move the cursor out-side of the "Topics Found" window ,we get a wait cursor.
We tried with all options in HWND hwndCaller by passing Parent Window Handle,Desktop and NULL.- all with similar results ( as mentioned above)
NB: We need to display HTMLHelp Window only after selecting from "Topics Found" Window.
Otherwise please provide us any alternative solution.
Thanks In Regards
shaffiq Ahamed
|
|
|
|
|
It sounds like your app's message queue is not getting pumped. Before calling the HTMLHelp API, start a timer with something like SetTimer(1, 100, NULL); . Or an alternative would be to call the HTMLHelp API from a non-GUI thread.
It's strange that it behaves this way. I suggest you try to reproduce this in a small app before you go to a lot of trouble. Your help file might be trashed.
|
|
|
|
|
I tried in small application.Behaviour is same.This does not happens when you use Winhelp API with command HELP_KEY for hlp files.It behaves strange for
HTMLHELP.
|
|
|
|
|
Hi everybody,
I have a list control in my dialog, in which I display a numbr of items. The program can toggle between two states: one where only recent items are shown and one where also history is shown. In the latter case, I want to show icons in front of each row, indicating whether an item is recent or not. In itself, this all works: I add a CImageCtrl to the listbox, with the relevant icons. When the program switches back to only recent items, I do not want to show the icons anymore, so I remove the CImageList using CListCtrl::SetImageList (NULL, 0); In itself this works: no icons are shown anymore. However, the item in the first column is now still moved to the right to make room for a possible icon. How do I tell the CListCtrl that also the text in the first column must be displayed at the most left-hand side, rather than moving the items to the right?
Please help!!
Thanks in advance,
William
|
|
|
|
|
Engberts wrote: When the program switches back to only recent items...
How are you adding items at this point?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I Clear all the items (using DeleteAllItems), delete all the columns (using
n = GetHeaderCtrl()->GetItemCount();
while (n-- > 0)
DeleteColumn (0)
Then I clear the image list (using SetImageList (NULL, 0). Then I re-create all the columns (I do this, because I use a separate empty column for the icon, which is either or not included when re-creating the columns depending on whether or not I want to show icons) and then I add the new set of items (using InsertItem for the first columns and SetItem for subsequent columns of the same row)
William
|
|
|
|
|
But what code do you have in place for adding items to the control? Is it in any way referencing an image (or image list)?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I am using a derived class "CListCtrlEx", which has the following code for adding a row:
BOOL CListCtrlEx::AddLine(char *Elements, UINT Id, int iImage)
{
LVITEM Item;
register int i = 0;
register int j = 0;
int subItem = 0;
int r = 1;
int k = 0;
char szItem[256];
memset (&Item, '\0', sizeof (LVITEM));
Item.mask = LVIF_TEXT|LVIF_PARAM;
Item.iItem = m_ItemId++;
Item.lParam = Id;
while (r && Elements[k] != '\0')
{
j = k;
i = 0;
while (Elements[j] != '\0'&&
Elements[j] != '\t')
{
if (i < 250)
szItem[i++] = Elements[j];
j++;
}
szItem[i] = '\0';
Item.iSubItem = subItem++;
Item.pszText = &szItem[0];
if (k == 0)
{
if (iImage != -1)
{
Item.iImage = iImage;
Item.mask |= LVIF_IMAGE;
}
if (InsertItem (&Item) == -1)
r = 0;
else
r = 1;
}
else if ((r = SetItem (&Item)) != 0)
r = 1;
if (Elements[k=j] == '\t')
k++;
Item.mask = LVIF_TEXT;
}
return r;
}
I present this routinew with a character array in which the elements (columns) are separated by tabs. As you can see, the routine only adds an image when the parameter "iImage" does not equal -1, which it does when I populate the contgrol with only recent items where I do not want to see icons. Again: The icons do not show, but the space for the icons remains reserved, which leads to the situation that, on first appearance, the left elements are completely left aligned, but after showing the history items, they always show shifted to the right.
William
|
|
|
|
|
Normaly in our programme ,we always call the system "MessageBox",and it is very easy ,but now in my programme ,i want to make one MessageBox by myself to replace system MessageBox ,and if my programme is running ,if other application call the system "MessageBox" ,i want other application also use my "MessageBox",i hope someone help me ,here thanks first!!1
I am an automation enginer ,and i like vc++ ,becaus she help too much
|
|
|
|
|
I doubt this is possible. Maybe with a global hook, you could intercept the message to fire up your message box, but I doubt you can dismiss the Messagebox called by another applicaton. Why would you like to do this ?
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
Glad to see you replay,i am an automation engineer ,in my work,i use siemens software "wincc",in the software ,i call system "MessageBox",only because it can return "IDYES","IDNO" ...Value,but i don't like it stytle,so i want to make another "MessageBox" to replace but he must can return some value
|
|
|
|
|
You can use global hook . Study about SetWindowsHook | SetWindowsHookEx | ... .
and my belief is that vc++ is male not female !!! )
|
|
|
|
|
See Hooks [^] if its good for you
|
|
|
|
|
Hi,
I Want to add A dialog Box In An MDI Application. So that It displays when i click on the menu item corresponding to it
please Reply all the Steps Including
1. Adding The Dialog box
2. Creating the menu Item For It.
|
|
|
|
|
(using VC6; if using VS.net 2003/2005 you will need to do a little more work since the wizard is gone )
1- go in the resource editor.
create a new dialog; add all the necessary controls.
ctrl-w to call up the wizard.
create a new class for your dialog.
still using the wizard, add variables for you different controls.
2- go in the resource editor.
select your main menu.
go to the last item in a menu.
type in a name.
right-click on your new item and select the wizard.
create an handler for the command.
... the next steps, how to show the dialog is left as an exercise to you.
|
|
|
|
|
In Solution Explorer R click n your project Add->Add class->MFC class then click open button in new window in section Base class select CDialog and in Class Name insert your class name (if you want only to insert dialog goto resource and insert Dialog)and click Finish button now you have a CDialog class
--------------
goto resource editor R click and select Add Resource select menu and click New button now you can insert your items to menu and declare event for these items r click in each item and select Add Event Handler and select COMMAND in Message type and select your class that you want insert this event to it and clickAdd and Edit------------for set menu to your dialog you need to use SetMenu(...);
|
|
|
|
|
Hi,
I am using CreateFile API for getting handle of the shared drive hardware.
HANDLE hDrive = ::CreateFile("\\\\.\\PHYSICALDRIVE0", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,OPEN_EXISTING, 0,NULL );
i want to to issue the commands to the hardware using the handle(hDrive ). But some commands works with "\\\\.\\PHYSICALDRIVE0" and some commands works if i give the "Scsi3:" parameter instead of Drive name("\\\\.\\PHYSICALDRIVE0").
I am unable to understand what is the difference between these two; calling CreateFile using Drive name and using "Scsi3:" as a parameter.
Thanks
Tushar.
|
|
|
|
|
Maybe this microsoft support link ([^]) helps you
SkyWalker
|
|
|
|
|
Hello there!
I've got a project with a folder structure similar to the following
- folderA
- subFolderA
- folderB
- subFolderB
All of the folders and sub folders have source code and header files in them. That is actually my problem.
Say, for example, I have a source file in folderB, and a header file in folderA, how do I show Visual Studio the location of the file without providing an absolute path on my computer (like c:\project\folderA\header.h)? Is there a way to provide a relative pointer to the folder?
As always, thanks for your help in advance.
Patrick
|
|
|
|
|
pgav wrote: Is there a way to provide a relative pointer to the folder?
you can use relative paths : "../folderA/subfolderB"
|
|
|
|
|
Yes, you can use "..\" to specify to look in the parent folder. Example:
In file from folderB:
#include "..\FolderA\MyFile.h"
|
|
|
|
|
Thanks a lot!
Patrick
|
|
|
|
|
You can also add the relative (or absolute) path of the other directory to the project's additional include's in your project settings.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
I am trying to derive bytes from a pass phrase. The latest MSDN doc
indicated that the PasswordDerivedBytes.GetBytes method is obsolete. This
leads me to the CryptDeriveKey method. I can get it to work just fine with the following:
algName = "TripleDES"
algHashName = "SHA1"
keySize=192
rbgIV. Length =8
[this produces byte[] length = 24 {192 bits}]
Now. I want to create a 256 bit byte[] for use with Rijndael.
Unfortunatelty, I do not know the "correct" parameter values. I thought:
algName = "RijndaelManaged"
algHashName = "SHA256"
keySize=256
rbgIV.Length = 16
I can not get it to work. I keep getting the following exception:
System.Security.Cryptography.CryptographicExceptio n was unhandled
Message="Object identifier (OID) is unknown."
Source="mscorlib"
Q1. What are the valid values for the algName ?
Q2. Can any hash be used for any algnName?
Thanks for you help.
|
|
|
|