|
Make sure you link to htmlhelp.lib. By default it is located in C:\Program Files\HTML Help Workshop\Lib
|
|
|
|
|
where i set the link to the library htmlhelp.lib?
thanks and merry christmas
|
|
|
|
|
Go to project properties to Linker section. Also look for C++ FAQ on this site... IIRC it has info about that plus more stuff you probably want to learn.
|
|
|
|
|
I want to access Window Procedure of another processes window. I just want to display address of that window procedure.
In short Something like SPY++.
To add to above, GetWindowLong fails for GWL_WNDPROC (but works for GWL_HWNDPARENT) and GetLastError returns 0.
Does this fail because the target window lies in different process?
If yes, then how does SPY++ do same thing
Have a great day ahead!
Regards,
Sohail Kadiwala
(My Blog - http://blogs.wdevs.com/sohail/[^])
modified 21-Apr-21 21:01pm.
|
|
|
|
|
I am developping in VC 6 and my app. do not run over XP.
Could somebody help me?..
|
|
|
|
|
What's the problem you are facing.
Still Alone in this beautiful world
My Articles
|
|
|
|
|
The project run with win 98. In Xp simply, the app. do not start. I haven't any error, only do not run.
I thought that the problem is the plataform, isn't it?
Something special to install?
|
|
|
|
|
Hmmm. Is it a debug build? If so, build a release version and try that - it doesn't need the non-distributable DEBUG dlls for CRT and MFC.
You should check the dependencies (using DEPENDS.EXE) to see that the DLLs it needs are on your XP platform. Do you get any diagnostic messages at all?
Steve S
Developer for hire hired!
|
|
|
|
|
Thank you, I have solvered my problem, just was my CRY.Rpt Control... Thank again....
|
|
|
|
|
Friends,
I am opening a file using std::fstream . The purpose is to read all the contents of file into a buffer and then close the file. Program uses this buffer later.
The problem is that i am not an expert of fstream . I am using a function Read() , to copy data from file to buffer. The problem is the allocation of buffer. Lets see what i am doing:
fstream file("somefile.txt");
char *pBuffer = CreateNewBuffer(100) // 100 is buffer size
while(!file.eof())
{
file.read(buffer,100);
// Blah Blah
}
I don't know the number of bytes actually present in the file and so i am creating the buffer of size 100.
Is there any way to find out that how many bytes are there in the file OR how many bytes left, so that there will only be one Read() call instead of loop??
And most important for me is that how may bytes are actually read into the buffer.
Imtiaz
|
|
|
|
|
std::ifstream isn't designed to allow the reading of the entire filesize. The function _filelength in <io.h> will give you the length of a file. Be warned that this function is limited to the size of a long, so for very large files you'll need to use a platform dependant API (See MSDN).
The following function taken from the boost::regex sample code (regex_grep_example1.cpp) is one example of how to efficiently and safely allocate space using std::string. This is not the simplest solution, it is flexible. However without profiling this is micro-optimisation that probably isn't going to help. Note the use of reserve and capacity to ensure appropriate growth system for you buffers. You may be able to tweak initial size and growth rates if you know roughly what size the file will be.
void load_file(std::string& s, std::istream& is)
{
s.erase();
if(is.bad()) return;
s.reserve(is.rdbuf()->in_avail());
char c;
while(is.get(c))
{
if(s.capacity() == s.size())
s.reserve(s.capacity() * 3);
s.append(1, c);
}
}
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
|
|
|
|
|
hi all,
I have added Edit Box to MFC Dialog base Program.I also activated auto Horizontal Scroll Bar and Vertical Scroll bar..
How do I show a Message (say "hellow") when click on a Scroll bar of that edit box.?
If any know that please reply me...
Thanks in advance..
|
|
|
|
|
Add Message Handlers for EN_HSCROLL and EN_VSCROLL messages and display MessageBox there.
Now, I hope you know how to add message handlers. If you dont, u can find it in any basic level MFC Book.
Regards,
Still Alone in this beautiful world
My Articles
|
|
|
|
|
hi,
I added that messages to Application..
void CA1Dlg::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
AfxMessageBox("hi");
CDialog::OnVScroll(nSBCode, nPos, pScrollBar);
}
But it is not working and not displying the Message
I have used MFC Dialog wizard to create the Application..
thanks in advance
|
|
|
|
|
i want to know about is it possible to have a command button in vc++ like in vb6.
|
|
|
|
|
Yeah Why noT every Thing that is possible in VB is possible in vc also.
siva_nkl33 wrote:
command button
Use CButton if you are using MFC
use HBUTTON hBut=(HBUTTON)CreateWindow("BUTTON"......); in WIN32apis
"I Think this Will Help"
Alok Gupta visit me at http://www.thisisalok.tk
|
|
|
|
|
I am getting an error as"Breakpoint has been reached"
while using VC++ rich edit text box
Can anybody help me find solution
Grace
|
|
|
|
|
Try rebuilding the project. Or just ignore it and run program further by pressing F5.
|
|
|
|
|
Dear friends,
I am declaring a template class in header file and defining its methods in cpp file. As such i am getting an error of "unresolved external symbols" whenever i create object of this class.
Instead, if i define the methods in *.h file and remove cpp file, the errors are removed and program runs fine. Can anyone tell me whats the problem:
////////////////////////////////////////////////////////////////////////////
// File MyTemplate.h
template <class T> class TMyTemplate
{
public :
TMyTemplate();
~TMyTemplate();
};
template <class T>
TMyTemplate<T>::TMyTemplate()
{
}
template <class T>
TExpandableBuffer<T>::~TExpandableBuffer()
{
}
/////////////////////////////////////////////////////////////////
i.e i declared and defined functions in header file and this works fine for me. But if i remove the methods definition from header to cpp file the compiler starts giving me error of "Unresolved External Symbols" whenever i create object of class like:
TMyTemplate<char> myTemplate;
Imtiaz
|
|
|
|
|
|
how to call vc++ exe from another vc++ exe file
can i call??
|
|
|
|
|
ShellExecute[^]
also the C 'system' function. try google to search for it
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
"Philosophy is a study that lets us be unhappy more intelligently."
-Anon.
|
|
|
|
|
To Call Exe File in VC ++ you have to use the Buildin Function
"Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long"
Hwnd as user Handle
lpOperation as operation i.e. "open","print"
lpFile as path of exe file
thanks,
Pavanbhai Pawar
Software Programmer,
Trans Tech Projects Pvt. Ltd.
Pune 411 004.
Mob: 9225527829
E-Mail Id:pawar@transtechprojects.com
Personal ID : pavanbhai_pawar@yahoo.com
|
|
|
|
|
you can use ShellExecute to call any exe from ur application
|
|
|
|
|
theer are numerous apis for achieving that like
<ul>
<li>ShellExecute/ShellExecuteEx
<li>WinExec
<li>CreateProcess
</ul>
|
|
|
|