|
hello,
if i m not wrong ur problem is when
char *reg_key_tree = "Software\\microsoft\\etc"
lRet = RegOpenKeyEx(HKEY_LOCAL_MACHINE, reg_key_tree, 0, KEY_QUERY_VALUE, &hKey);
and when
lRet = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\microsoft\\etc"
, 0, KEY_QUERY_VALUE, &hKey);
there is no prblm.
well, i tried out this with my application. there is absolutely no problem. check out ur pointer def...
ask_you
|
|
|
|
|
In Ada, the coder can access the first and last values of an enumeration using attributes as follows:
Some_Enum'FIRST
Some_Enum'LAST
No matter what the enumeration or type, the first and last values are returned.
Is there an equivelent ability in C/C++?
|
|
|
|
|
That is not built into C++, you can simulate it with something like:
enum EColors
{
_firstColor,
Red, Blue, Orange, Mauve
_lastColor
}; Then to test whether a number is in the allowable range you test (n > _firstColor && n < _lastColor) I find it easier to do tests when the sentinel values are not legal enum values. If _firstColor were the same as Red , and Mauve the same as _lastColor , you also introduce a maintenance problem because you (and any other devs) have to remember to keep the definitions of _firstColor and _lastColor in sync with the enum values.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
I even hear the Windows "OMG I booted up fine" sound.
-- Paul Watson diagnosing hardware problems.
|
|
|
|
|
Hello,
is there an option to always display the CTreeView Open, or expanded... i don't want to see the +, i want to see all the sections.
thanks!!
|
|
|
|
|
Hi!
I know how to load a bitman from a bitmap resorce, with the CStatic::GetBitmap function, but i don't know how to load a bitmap from a file.
any ideas?
thanks!!
|
|
|
|
|
Check the LoadImage function.
example:
HBITMAP hBmp = (HBITMAP)LoadImage( NULL, pcszFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE );
|
|
|
|
|
|
I have problems with a 32-bit client, a 64-bit server and a 32-bit server. These applications use sockets.
The applications were written in Visual C++ 6.0 and I use the Microsoft Platform SDK SP1 to compile the server code for the Itanium 64-bit platform.
It seems that sockets in 64-bit behave quite different than sockets in 32-bit. For example when I execute 20 clients trying to connect 100 times to a server this is what happens:
30% of the connections from the 32-bit clients to a 64-bit server fail, whereas on 32-bit it is less than 5%.
The server code is 32-bit and 64-bit compliant. So when i need the server in 32-bit i just compile it for 32-bit and the same with 64-bit.
Another problem that i'm having in 64-bit is that sometimes clients say they were connected but the 64-bit server does not accept their connection.
Any one with ideas?
Thank you very much.
|
|
|
|
|
First off, what I/O model? Secondly, describe more about what you mean by server not accepting connections.
Kuphryn
|
|
|
|
|
I'm creating a large string with CStringto be inserted in an web browser.
I'm mostly concatenating tags and text in the string, eventually, the string will become quite large, and performance will suffer a bit.
is using std::string faster ? if I use std::string::reserve to reserve some memory, even if it's really too much for small buffers, will that make operations faster ?
Also, I'd prefer not having to go back to C strings.
my "builder" class is something like
class Builder
{
CString sBuffer;
void beginRow() { sBuffer += "<tr>";} ;
void endRow() { sBuffer += "</tr>"; };
}
with some other basic html tags methods ...
Thanks.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
certainly pre allocating buffer will increase performance regardless of which class you use.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
well, after some experimenting, seems that the problem is calling my Builder class.
If I create the string locally and send the whole shebang to the Builder class instead of using the Builder class to ease the work of me and other programmers, it goes way, way faster.
Is there a way to reduce the overhead of function calling, inlining the methods does not seems to do much, and I would like not to be forces to use MACRO.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I do not think that the function calling is your problem.
Do you by chance pass strings around by value? That would cause frequent allocation / copying of the strings' content, an THAT will hurt you.
Do you use a profiler to find where the time is spent?
-----------------------------
Get trial copy of comment generating tool CommentMakerPro, std::string and std::string containers viewer FeinEvaluatorPro and windows manager for Microsoft Visual Studio .NET FeinWindows at www.FeinSoftware.com
|
|
|
|
|
I am writing a DDEML program that also runs a MQ client program within it. The MQClient reads from a remote queue and i am trying to write the data read to an excel file using DDEML. I am using DdePostAdvise to call DdeCallBack Function that writes to the Excel file. But the DdePostAdvise is not working properly. Does anyone have a clue on how to do this?????? Please let me know
|
|
|
|
|
Dear All,
I am a novice in C++ programming (or any kind of programming). I am
teaching myself C++ these days mainly to run some mathematical models.
I am using a PC at home (windows millenium).
In order to simulate the models, I need to draw graphs, mainly a set
of numerous connected line segments, also I need to be able to plot
points. I am using Microsoft Visual C++ 6.0. Actually I don't even know
how to create a new window where I can do all these graphings and
don't know which commands to use.
Could someone kindly email me a complete code in visual C++ which
opens a window, draws a set of say 10 connected line segment (if in color, it would be great) and plot a point. I am sure that this is a fairly easy matter. I will very greatly appreciate any help. You will save m A LOT of time. And I will be greatful if you email me at ali_nabavi2000@yahoo.com
Kind Regards,
|
|
|
|
|
Check out the articles collection here. There are a number of graphing apps available. You may find one that works for you, or that can be easily adapted to your use. It's very unlikely that anyone will write one for you, though.
Some people think of it as a six-pack; I consider it more of a support group.
|
|
|
|
|
|
i think its better if u can go through the tutorials of NeHe site for graphics.
http://nehe.gamedev.net
Pavan Kumar N Tiruveedhula
2382 Duncan Dr #4
Fairborn, Ohio-45324
1 (978) 473-1244
|
|
|
|
|
I keep getting that message when closing my application (haven't tested in release version yet though).
Is there a way to figure out which thread that exactly is, and why it exists with code 3?
|
|
|
|
|
Try using Debug/Threads on the IDE Menu when debugging your process.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
GetLastError()
TOXCCT >>> GEII power
|
|
|
|
|
I get the error on exiting my application:
The thread 'Win32 Thread' (0x3e0) has exited with code 3 (0x3)
I don't know if it's a really big issue, I guess not, but still I'd like to know what's up with that every time
|
|
|
|
|
exit codes != to 0 dont mean that there has been an error.
you must find out what this code represent, but for that, get (and give us if you want) more infos on that thread...
TOXCCT >>> GEII power
|
|
|
|
|
I'd really like to give you that info, but unfortunately, I have no idea which threads return that code. I guess it's some internal MFC thread or something.
|
|
|
|
|
Hi!
I am using the win32 api c++.
I have a problem when I try to get some variables from textboxes and comboboxes.
<br />
string code;<br />
char getvalues;<br />
<br />
code.append("your values are: "); <br />
GetDlgItemText(hwnd, IDC_E1, &getvalues,20);<br />
code.append(&getvalues);<br />
code.append(" from e1- ");<br />
GetDlgItemText(hwnd, IDC_E2, &getvalues,20);<br />
code.append(&getvalues);<br />
code.append(" from e2- ");<br />
.....<br />
Well this code works fine if there are no spaces or special characters between the values in the boxes
but when there is a value like "text-decoration" or "text decoration" it gives an error. The error comes when the code.append(&getvalue) is processed.
I want to use the code in a javascript generation application.
Thank you very much for your answers in advance!
Well... I am a beginner ...
|
|
|
|