|
Salvodif wrote: I would like to know how can I connect my application to a mdb file.
See if this article is of any help.
"The largest fire starts with but the smallest spark." - David Crow
|
|
|
|
|
Hi,
I have MFC extension dll which contains some controls derived from standard Tree Controls class.
Now when i use these DLL an creating control on Dialog box at runtime it woks fine and the control is shown. But when i am initializing controls from DLL. these are not shown and its gives expection. When debugged. its fails at
-->HTREEITEM one = mytree.InsertItem("XYZ"); I guess, its giving expection at ::IsWindow(m_hWnd) and some how it is not getting the values of
m_hWnd in my case.
Can someone throw light on these and why works on Simple Dialog and not Property Page.
Thanks in advance
Abhi Lahare
|
|
|
|
|
I believe the OnInitDialog() function for the Property Page has to be called first before you can use controls in it. So make sure that OnInitDialog() for the page is being called first.
This is just a guess. It could be something else also.
this is this.
|
|
|
|
|
|
I think the problem is when you add points to the array.
Could you show the code where you are doing it?
It is actually a CPtrArray , and it is supposed to take different objects each time you add to it. You should new a CPoint etc variable and then add it to the array.
this is this.
|
|
|
|
|
Yes, OnDraw gets called in that case. Try to use your debugger to watch your data. Press F5 to start the debugger and F9 to put breakpoints. Try putting a brakpoint in the OnDraw function.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Hi,
I have the files "AA.doc" , "BB.doc" and "CC.doc", i want to create a zipp folder having these files in it. so i think they will compressed in end.
thanks for reply
Regards.
|
|
|
|
|
That zipp folder can be created on all windows operating system.
If not then any compressed type folder that contain these different file in it , i have to send that folder on network, i want to reduce the size
Regards.
|
|
|
|
|
|
Hi,
I want to send an image to MFC ActiveX Control which need to be in VC++.Net. How can accomplish this. In ActiveX control i need to display that image.
|
|
|
|
|
Ok, I hope I put this in the correct forum. Please bare with me as the question is rather long.
The development environment I am working in is Labwindows/CVI 6.0 (http://www.ni.com/lwcvi/) for the application and visual c++ 6.0 for the GINA.
For an application I was trying to lock the keyboard. Users could then unlock the keyboard by choosing a menu item after which a password box is displayed where a user can enter the password to unlock the keyboard.
I did this by creating a low level keyboard hook to catch all keys except ctrl-alt-del which cannot be intercepted this way. To make sure the password would not be blocked by the lock I would check if the password input field was the active control and if so, some keys would work (letters, numbers, backspace, enter)
To catch ctrl-alt-del I created a GINA stub based on the ginastub example in MSDN. I would then set a mutex in the application when it was locked. After pressing ctrl-alt-del the custom GINA would look for the mutex and block ctrl-alt-del if it found the mutex.
The problem was that when the keyboard was locked, after pressing ctrl-alt-del it wasn't possible anymore to give the password. The letters would just not appear on the screen. It took me some time to figure it out but the solution was to never block the ctrl button in the hook function.
Although I got the solution now I am very curious as to why it is necessary to never block the ctrl button.
I can post some sample code if required.
|
|
|
|
|
can u give me the code to use shellexecute to call a help file(.hlp).i have created the help using visual studios help workshop and NOT HTML HELP WORKSHOP. i think both r different. so please help me in this regard. also if there is any other code that can be used to call the help file pls let me know.
Thanks
|
|
|
|
|
Hi
Please search on MSDN help about ShellExecuteEx
KK
|
|
|
|
|
Hi,
why dnt u try MSDN ?? u will find lots of examples there.
|
|
|
|
|
|
i tried but i dint get anything. under which topic is it given? the contents in msdn aren't clear
|
|
|
|
|
Hope this will help u.
You must modify the .hpj file to correct any file paths that are now invalid. You may also modify the custom build step to provide more informative error reporting.
To modify the .hpj file:
1. Open the .hpj file in Visual C++.
2. Examine its [FILES] and [MAP] sections for hard-coded paths. Modify them as necessary. Notice that the default installation path for Visual C++ 6.0 is as follows: \Program Files\Microsoft Visual Studio\VC98 whereas the default path for Visual C++ 5.0 is as follows: \Program Files\DevStudio\VC
To upgrade the custom build step rule:
1. Right-click the .hpj file in FileView; then click Settings on the Context menu, and click the Custom Build tab in the Project Settings dialog box.
2. Visual C++ 5.0 uses the following custom build step command to build help files:
call "$(ProjDir)\makehelp.bat"
Modify this text in the Commands list box to the following, assuming Makehelp.bat has not been changed from its original form:
start /wait hcw /C /E /M "hlp\$(InputName).hpj"
if errorlevel 1 goto :Error
if not exist "hlp\$(InputName).hlp" goto :Error
copy "hlp\$(InputName).hlp" $(OutDir)
goto :Done
:Error
echo hlp\$(InputName).hpj(1) : error:
type "hlp\$(InputName).log"
:Done
NOTE: The above steps are the default for a new project in Visual C++ 6.0.
3. Delete Makehelp.bat from the project; it is normally in the Help Files folder. If desired, you may also delete the Makehelp.bat file as well.
Back to the top Back to the top
STATUS
|
|
|
|
|
Visit this address it will also help u wotking with Help files
http://www.informit.com/library/content.asp?b=Visual_C_PlusPlus&seqNum=286&rl=1
|
|
|
|
|
if the help file is compiled as HTML then use the Win32 API HtmlHelp .
else you can write like this.
CString strDefaultDir;
strDefaultDir=AfxGetApp()->m_pszHelpFilePath ;
strDefaultDir.Replace(_T("TestApp.CHM"), _T(""));
SetCurrentDirectory(strDefaultDir);
ShellExecute(NULL,"open", "TestAppHelp.txt", NULL, NULL, SW_MAXIMIZE );
where TestApp is the application name and TestAppHelp is the help file name.
Hope this helps.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
i have created the help file using help workshop and not html help workshop. help workshop has generated a .cnt file . By combinig rtf file and cnt file i got a .hlp file. Now i want to display this .hlp file when help button is clicked or "f1" is pressed.
i added your code but nothing is being displayed. what is .CHM and where is the .TXT file created. i dont have these two files. Please help me solve this problem
Thank You
|
|
|
|
|
like this
::ShellExecute(NULL,"open","iexplore.exe","c:\\1.htm",NULL,SW_SHOWNORMAL);
whitesky
|
|
|
|
|
i dont have any htm files!!
|
|
|
|
|
I have a problem like your.
I solved it with this corrections:
Add the macros
ON_COMMAND(ID_HELP_FINDER, CMDIFrameWnd::OnHelpFinder)<br />
ON_COMMAND(ID_DEFAULT_HELP, CMDIFrameWnd::OnHelpFinder)<br />
ON_COMMAND(ID_HELP, CMDIFrameWnd::OnHelp)<br />
ON_COMMAND(ID_CONTEXT_HELP, CMDIFrameWnd::OnContextHelp)
to the Mainframe map
And add to the constructor of the application
EnableHtmlHelp();
Then put the help file in the exe folder.
Note. my help is an html help.
|
|
|
|
|
should i add these code as it is or any changes should be made. what do u mean by "mainframe map"
|
|
|
|
|
Sorry for the late:
As I sad: I solved the problem with this lines, now pressing F1 the help will be displayed.
mainframe is described in MainFrm.cpp
and there you can find the message map:
BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
ON_WM_CREATE()
ON_COMMAND(ID_WINDOW_NEW, OnWindowNew)
... //Add here
The app constructor is (usually empty) in another file: MyAppName.cpp
But note: this works with html help, but I think that the macros are the same in both cases
|
|
|
|