|
i'm sure there are functions available somewhere but using a lookup table is very easy
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Hello, the codegurus around the world.;)
Are you looking for
setiosflags(ios::hex), setiosflags(ios::oct), and setiosflags(ios::dec)?
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
i think he mentioned binary too so i figured it was easier to build the 3 look-up functions in one go rather than splitting the functionality across 2 different methods
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
greetings,
i am working on a dll hook project
in this function
LRESULT CALLBACK MyProc(int nCode, WPARAM wParam, LPARAM lParam)
wParam gets the virtual key code
whats the best way to convert the virtual key code to ascii?
thanks for your time
|
|
|
|
|
The virtual key codes for 0-9 and A-Z are, conveniently enough, '0' to '9' and 'A' to 'Z'. If you need more info on the key codes, see winuser.h, and there's a list of the codes in MSDN.
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
Here we have a Custom OLEDB provider. We have problems
dealing with the null values. The OLEDB provider is in
VC. Here we get the records as an variant array and
then moving it to a stream object and then assigning
it to a BSTR pointer. We are reading that as an ADO
recordset from VB. All the values are ok in VB. But
when we come across null values, we are not able to
process it properly. When we write NULL to the stream
object (which is bytes), we are reading it as 0 in the
VB recordset.(since in vc NULL has a value 0). So i need to read that value as null in
the VB.
In VC i tried writing VT_NULL and VT_EMPTY. But i
could not read that as null in VB.
if i use the isnull(fieldname) , i need to get the
result as true if the value is null. I dont know how
the null value is treated internally.
We use this OLEDB provider not only from VB, we use
even from Crystal reports for reports.
So can anybody please let me know how do it or let me
know any source where i can get the help from. Or is there any sample available for the Custom OLEDB provider. I have looked on to the sample from Microsoft . But nothing worked out
|
|
|
|
|
Here we have a Custom OLEDB provider. We have problems
dealing with the null values. The OLEDB provider is in
VC. Here we get the records as an variant array and
then moving it to a stream object and then assigning
it to a BSTR pointer. We are reading that as an ADO
recordset from VB. All the values are ok in VB. But
when we come across null values, we are not able to
process it properly. When we write NULL to the stream
object (which is bytes), we are reading it as 0 in the
VB recordset.(since in vc NULL has a value 0). So i need to read that value as null in
the VB.
In VC i tried writing VT_NULL and VT_EMPTY. But i
could not read that as null in VB.
if i use the isnull(fieldname) , i need to get the
result as true if the value is null. I dont know how
the null value is treated internally.
We use this OLEDB provider not only from VB, we use
even from Crystal reports for reports.
So can anybody please let me know how do it or let me
know any source where i can get the help from. Or is there any sample available for the Custom OLEDB provider. I have looked on to the sample from Microsoft . But nothing worked out
|
|
|
|
|
hello, does anybody know how to find out if server supports random read through wininet?
thank you
|
|
|
|
|
One of the developers I work with has a problem on Win9x platforms.
He has created an MFC extension DLL which is intended to be used to
access resources. In this case the DLL has something like 948 bitmaps
in it. The DLL is 1.6Mb in size.
The problem is the DLL won't load on Win9x boxes, but will load on
NT/2000. We've also tried LoadLibraryEx() with the LOAD_DLL_AS_RESOURCES
flag but that didn't work.
I know there is a 2MB limit on resources for Win9x, but that is GDI
resources, and these bitmaps have not yet turned into resources
as they haven't been loaded yet (doesn't get to DllMain()).
Any ideas?
Stephen Kellett
|
|
|
|
|
I have created a very basic Internet browser SDI. In the app I have a Address bar which is a edit box.. When I enter a string/internet address into the box and push enter I get an error it states: "The instruction at "0x5f50bf59" referenced memroy at "0x0000007c".The memory could not be "read".
This error only happens about 90% of the time. Yesterday the app worked fine for about 15 minutes or so. Any ideas?
Thanks,
Rob Jones
|
|
|
|
|
Rob,
It sounds like you are accessing memory via a pointer that holds
an incorrect address. Most probably an uninitialised pointer.
Without a stack trace and a snippet of code its very hard to say for
sure.
Stephen Kellett
|
|
|
|
|
One of the developers I work with has a problem on Win9x platforms.
He has created an MFC extension DLL which is intended to be used to
access resources. In this case the DLL has something like 948 bitmaps
in it. The DLL is 1.6Mb in size.
The problem is the DLL won't load on Win9x boxes, but will load on
NT/2000. We've also tried LoadLibraryEx() with the LOAD_DLL_AS_RESOURCES
flag but that didn't work.
I know there is a 2MB limit on resources for Win9x, but that is GDI
resources, and these bitmaps have not yet turned into resources
as they haven't been loaded yet (doesn't get to DllMain()).
Any ideas?
Stephen Kellett
|
|
|
|
|
Help me please loading a bitmap as my dialog background. I don't manage to do that.
Thanks.
Stephanie
|
|
|
|
|
Does anyone knows how to construct a window with 3 columns, such that the first column contains a tree control, and the other 2 columns contains the data of the corresponding tree control item at the same level.
Do I have to combine List control with Tree control to get such a view?
Any sample code if possible. Thanks!
|
|
|
|
|
Derive from CListView or CTreeview and do some custom
drawing or search the net for a class that someone else
has written to do this.
"das leid schlaft in der maschine" -Einstürzende Neubauten
|
|
|
|
|
Hi All,
I have a Cstring variable and i have to find whether there exists a space character with in the string.
I tried using Find function of Cstring.The the problem is that i am not able to specify which parameter to pass into the Find() function of the CString.
For Example if the string is " Sear ch".Thre is a space character between 'r' and 'c'.
I want to find out this.
Can u pls tell me what is the procedure to be followed if i use the find ( ) function of Cstring.
Regards;P
|
|
|
|
|
Okey, te sintax of Find is.
int Find(LPCTSTR str)
int Find(TCHAR ch)
Or
int Find(LPTSTR str, int nStart)
int Find(TCHAR ch, int nStart)
In the first two sintaxs Find search from the biginning.
In the Second two sintaxs Find search from the start position.
The Find always returns the position where found the first substring or character. if don't found the substring or character returns -1.
An Example:
CString str = _T("");
str = " Text to Search";
nPos = str.Find(32); //This search for the first " "
while(nPos != -1)
{
nPos = str.Find(32, nPos + 1);
}
This example will found the character 32 in the position 0, 5 and 8.
Carlos Antollini.
|
|
|
|
|
Carlos Antollini did a great job in answering this, I think. The one thing that may not have been very
clear from his answer and example is that the 32 he used in the .Find(32) call is the ASCII code for
the "spacebar" character.
You probably figured that out, but it wasn't entirely clear from what Carlos wrote.
Other than that, I think he answered your question really well.
|
|
|
|
|
Hi,
I am now programming for Exchange Server by means of ADSI 2.5 using Visual
C++. Now I want set the property "dialin permission" using ADsRAS for Win
NT account. Anybody know how to code using VC(I can do it using VB)?
many thanx.
jingang
|
|
|
|
|
Hi,
I am now programming for Exchange Server by means of ADSI 2.5 using Visual
C++. Now I want set the property "dialin permission" using ADsRAS for Win
NT account. Anybody know how to code using VC(I can do it using VB)?
many thanx.
jingang
|
|
|
|
|
I am looking for a way to convert a date/time to a string and then back.
For instance, I have a COM component and when you call the Generate function I want it to return a string representing the current date and time.
Then you pass the date/time string returned by Generate to a Verify function later it compares this string to the current date/time and returns false if the difference is more than say 3600 seconds.
Can anyone tell me how to do this? It's an ATL component but I would rather not use MFC... Thanks in advance.
William
|
|
|
|
|
When I do m_lsCis.AddString("Whatever"); (m_lsCis being a valid list box member variable ) in my onInitDialog() it throws an assertion error. I was wondering if this is because while my onInitDialog() function is running the list box still isn't visible. Do I have to populate the list boxes after OnInitDialoge()? If so, where?
|
|
|
|
|
You need to call CDialog::OnInitDialog first. Before this call, your member variable is not associated with HWND.
BOOL CMyDialog::OnInitDialog()
{
CDialog::OnInitDialog();
m_lsCis.AddString("Whatever");
return TRUE;
}
Tomasz Sowinski
http://www.shooltz.com.pl
|
|
|
|
|
Hi,
Is it possible to start/stop the Dial-Up Server process automatically.
I have used the RAS functions to create a service that connects to a running Dial-Up server, but is it possible to use these functions to start/stop the actuall server.
The registry key:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\RemoteAccess\CallAccess changes when the Dial-Up Server is started manually if this is of any use!!.
Thanks.
Joe.
|
|
|
|
|
Does anyone know the LF character (or whatever is used to signify a newline in a MAC format text file)?
I'm trying to convert a text file from MAC format to DOS format, and I was under the impression MAC format was the same as UNIX format with just a LF, but this doesn't seem to be the case.
Cheers,
Peter Pearson
|
|
|
|