|
What is the problem? Looks okay.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I have some dialog boxes implemented in CLI, and when the display DPI is set to 120, it throws everything off. It makes a tree control so large that it overlaps other controls, for instance.
Are there any easy ways to deal with this?
|
|
|
|
|
AutoScaleDimensions and AutoScaleMode doesn't help?
|
|
|
|
|
Thanks! I was unaware of those properties.
|
|
|
|
|
I'm a C# programmer with some Java experience as well. Does anybody have book recommendations for an experienced C# programmer on C++? I'm not sure where to start, and C++ is such a huge subject, I assume that managed C++ would be a logical starting point for me.
I was looking at Pro Visual C++ 2005 for C# Developers[^]. Does anybody have a suggestion for a better place to start?
|
|
|
|
|
Actually, it depends on what you are going to use for? The book you mentioned is helpful for C# programmers since both languages look similar but differ in some unexpected ways.
Pro Visual C++/CLI and the .NET 2.0 Platform, Stephen Frasier also may be a good start but Pro Visual C++ 2005 for C# Developers may be a better choice for you. C++/CLI in Action, Nishant Sivakumar should be a great follow up since it dwells more into advance topics and provides information not found in the other books mentioned in this post. C++/CLI, The Visual C++ Language for .NET, Gordon Hogenson is a nice book to have by your side when programming. The most advanced book is Expert C++/CLI, .NET for Visual C++ Programmers overlaps a bit with C++/CLI in Action but is great for interop with native and managed code. There are a couple of other books not worth mentioning.
George
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Thanks for the input. I'm mostly just interested in finally learning C++. Eventually, I'd probably be interested in game programming, but that's a long ways down the road. With my current knowledge, I assume working managed with the framework would be most familiar to me so I could concentrate more on the language than exploring a new library set.
Thanks again, I'll take a look at your suggested book.
|
|
|
|
|
Nishes book is an awesome intro to C++/CLI. It's published by Manning, but I forget the title ( I can't see it from where I am sitting )
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks, I'll see if I can find it.
|
|
|
|
|
It is one of the books I suggested.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Pro Visual C++/CLI and the .NET 2.0 Platform
Copyright © 2006 by Stephen R.G. Fraser
|
|
|
|
|
Hi,
I'm building a SIP (soft input panel >> keyboard) software for a device that has WinCE 5.0 on it. I have made some progress, I'm able to show the input panel where it should show in the bottom-right corner. But i'm having problems with button controls.
Does anyone have a working solution for this particular problem?
Thank you!
|
|
|
|
|
You're using .NET for this, or are you in the wrong forum ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hello eveyone, i am chinese, now i just graduated from Hefei University of technology( china ), i like programming, lippman is my sunshine( like his c++ primer, inside c++ object ), want to be a archtecturer, also like pc game, yeah, now, i just want to get a friend who can teach my english, and i also teach him chinese, wo can chat something about c++, data structures, algoritms etc.
msn: claus-santa@hotmail.com
don't laugh me!
thanks!
i only want to learn english better and prgram better.
very poor english
|
|
|
|
|
Can anyone tell me what is the meaning of \p in C/C++
here is the example
if(strcmp(arg2,"\\p"))
{
statment 1
statment 2
}
HP
|
|
|
|
|
Backslashes indicate Escape Sequences[^]. Two backslashes compiles to one backslash,
so your string literal is "\p".
Please ask non-managed C/C++ questions on the Visual C++/MFC board[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi All,
I have written a program which receives messages (i.e. TCP packets) using .NET Sockets, and decodes them. In fact my application is a server that listens to the coming messages through TCP/IP. Well, the client(s) send messages continuously and I use ThreadPool::QueueUserWorkItem to send each received messages to a separate thread that does Decoding task.
So far everything is fine, if client(s) send not many packets. But I get into the trouble when client(s) send many packets continuously for long time.
Since the decoding routine is a complicated and time consuming task, then the receiving part of the program would be far ahead of the decoding part. For example, the counter that shows number of received messages (let’s call it RCVNO) shows 1000 messages, but the counter that shows number of decoded messages (let’s call it DECODNO) shows 100. Therefore when the client finishes sending its messages, RCVNO is not changing anymore, DECODNO is increasing slowly for a minute or so, but it never reaches to same number of RCVNO. It means that my spawned threads do their works, but after some time the ThreadPool suddenly gets drained, so even its threads that haven’t start their actual work get terminated somehow!!!
1. QueueUserWorkItem queues a method for execution on a separate thread. Will this thread be automatically closed and terminated (all its resources released and cleaned) after executing the method? Or I should do this part by writing codes? If yes, how?
2. Is there any way to find out whether ThreadPool is still healthy and running?
3. How can I force ThreadPool to be stable until its last thread had done its work and terminated?
Many thanks in advance.
AlwaysStudent
|
|
|
|
|
Have you tried the Producer/Consumer design pattern?
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Hello dear,
Thanks in advance for your prompt reply.
That's shame, I'm afraid, I'm not familiar with this design pattern. If that is definitely what I should follow, thanks for your comment. I'll start looking for and studying this design pattern.
Anyhow, I appreciate if you take your time to answer my questions and guide me.
AlwaysStudent
|
|
|
|
|
|
Hi,
ThreadPool threads don't clean up your mess: they stay alive when done, and you are
responsible for whatever resources you created.
And the ThreadPool remains healthy provided you don't mess with its threads:
you are not supposed to abort the threads, and I am not sure to what extend you are allowed
to modify thread settings (IsBackground, ThreadPriority, ...).
If you want full control, you may want to create your own Threads and possibly your own
pool of Threads. That way you can choose how many threads are in the pool too.
BTW: If yours is a server, creating a thread for every incoming packet, you may want to refuse
some packets rather than serve them with an unbounded delay.
Hope this helps.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi
How to convert an CString variable to String variable
CString str1;
String ^str2;
How to assing str1 to str2?
VIBIN
"Fool's run away,where angle's fear to tread"
|
|
|
|
|
dtr.GetBuffer() will give you the underlying memory pointer, I assume you can build a String ^ from that.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
String ^str2 = gcnew String(str1);
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|