|
Thanks, Dominik pal!
Your reply has resolved all my doubts!
Cheers,
George
|
|
|
|
|
This is used in header files that must be compatible with both C and C++. extern "C" tells the C++ compiler that anything inside the curly braces { } must be treated as C language declarations.
|
|
|
|
|
Thanks, markkuk, my old friend!
Your reply has resolved all my doubts!
Cheers,
George
|
|
|
|
|
I want to install hook to detect Win32 function called, eg. ::TextOut(). What type of hook I should use?
|
|
|
|
|
|
This one on Codeguru rocks,
And I swallow a small raisin.
|
|
|
|
|
Hello everyone!
My problem is as follows...
I've created a RichEditCtrl which contains text with various font sizes,
formatting and the total number of lines exceedes the visible window.
I want to calculate the number of visible lines that are in it.
I'd appriciate any suggestions....
Thanks
|
|
|
|
|
Issue a resize message to the control like this:
DWORD dwEventMask=m_richedit_ayuda.GetEventMask();
dwEventMask|=ENM_REQUESTRESIZE;
m_richedit.SetEventMask(dwEventMask);
m_richedit.RequestResize(); Then, have EM_REQUESTRESIZE handled: there you are provided with the new size. It is up to you to do the actual resizing or not:
void CYourDlg::OnRichEditRequestResize(NMHDR* pNMHDR, LRESULT* pResult)
{
REQRESIZE *pReqResize = reinterpret_cast<REQRESIZE *>(pNMHDR);
CRect rect(pReqResize->rc);
m_richedit_ayuda.SetWindowPos(NULL,0,0,rect.Width(),rect.Height(),SWP_NOMOVE|SWP_NOZORDER);
*pResult = 0;
}
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks that was helpful!!
Ioannis Sarris
|
|
|
|
|
Hello,
I'm already programming my parallel port in c++ with inp and outp to control and external device but I would like to programm it in MFC and I'm realy lost...
I need to write data to port 0x378, read and write on port 0x379 and 0x37a (command register)
Anny help will be very apreciate.
Thank's
Yan
Here my email address: yanwxt@hotmail.com
|
|
|
|
|
hi yannick
as per my knowledge
inp and outp routines only work on windows95
anju
|
|
|
|
|
Tool : Vc++ OS : xp
Bios Information - i'm want source code . please
I need Bios Information ( make date )
Go~~
|
|
|
|
|
If you only need general information about the BIOS you can simply read out the following 3 keys of the registry:
The name of the BIOS:
HKEY_LOCAL_MACHINE\\Enum\\Root\\*PNP0C01\\0000\\ "BIOSName"
Version of the BIOS:
HKEY_LOCAL_MACHINE\\Enum\\Root\\*PNP0C01\\0000\\ "BIOSVersion"
Date of the BIOS:
HKEY_LOCAL_MACHINE\\Enum\\Root\\*PNP0C01\\0000\\ "BIOSDate"
Happy coding!
-Dominik
|
|
|
|
|
|
|
RasSetEntryProperties changes an existing Dialup entry or creates it if none exists by the name provided. If you want to make sure the entry you are creating is fresh, use RasDeleteEntry first.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
|
Hi all..
i have a problem as follows
i created an VB activex dll which is using another 2 VB activx dlls and one c++ dll can any one tell me
how can i use this VB activex dll in vc++
thanks in advance
anju
|
|
|
|
|
if it's registered, and has a typelib, you can add a wrapper class to your VC project. Project menu / Add to Project / Components And Controls. then VC will create a wrapper class for the ActiveX control that you can use.
-c
For men use, if they have an evil turn, to write it in marble:
and whoso doth us a good turn we write it in dust.
-- Sir Thomas More
|
|
|
|
|
Thak u for reply.
still i have problem
i registered my activex vb dll
and followed your steps it is
giving me the following error
"The file you have selected is not a recognizable component"
can u clarify me it needs to me very urgent
thank u
anju
|
|
|
|
|
I have create a .dll which compiles fine that I am trying to call from within VB. It seems like something must be wrong somewhere because when I call the function it actually creates a new file and it just starts getting huge very fast, soon I had a file that was around 200 meg. Does something look goofy with the one function in you dll?
#include "Append.h"
void __stdcall AppendFile(char *pcMainFile, char *pcAppendThisFile)
{
ifstream inFile;
ofstream outFile;
int c;
inFile.open(pcMainFile, ios::in);
outFile.open(pcAppendThisFile, ios::app);
while(! inFile.eof())
{
c = inFile.get();
if(c != inFile.eof())
{
outFile << (char)c;
}
}
inFile.close();
outFile.close();
}
VB portion is declared as such
Private Declare Function AppendFile Lib "C:\Documents and Settings\User\Desktop\file\AppendFile\Debug\AppendFile.dll" (ByVal pcMainFile As String, ByVal pcAppendThisFile As String)
Private Sub Form_Load()
Call AppendFile("C:\Documents and Settings\User\Desktop\file\hello.txt", "C:\Documents and Settings\User\Desktop\file\nick.txt")
End Sub
Thanks in advance.
Nick Parker
|
|
|
|
|
while(! inFile.eof())
{
c = inFile.get();
if(c != inFile.eof())
so which is it: does it return EOF or is EOF a property of the file?
-c
For men use, if they have an evil turn, to write it in marble:
and whoso doth us a good turn we write it in dust.
-- Sir Thomas More
|
|
|
|
|
Should it not be both EOF being a property of the file, which I am checking as I cycle through it. Did I miss something?
Nick Parker
|
|
|
|
|
There are two eof() methods, which are easily confused due to the crappy STL docs.
basic_ios::eof() returns a bool indicating whether the stream has hit the end of the file.
char_traits<char>::eof() returns the character value that is returned by get() when the stream hits the end of the file.
--Mike--
Just released - RightClick-Encrypt v1.4 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Are the strings coming in to the C function correct? VB uses BSTRs, doesn't it?
Also, your if (c != inFile.eof()) should be if (!inFile.eof()) . Your code compares c with the EOF flag of the stream, which isn't what you intended.
--Mike--
Just released - RightClick-Encrypt v1.4 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|