|
did you set your project setting as _UNICODE?
|
|
|
|
|
|
i wanted to do an asignmnt which are look like this!
pictures:
http://lookpic.com/i/974/bowPXhWd.jpeg
from that pictures...the box 1 and 2...what should i use to make that?? edit control or richedit or static box or else??
the box 1 is for the data text...and the box two are for the display of the data 2...like animation>typewritter...
program file:
http://www.mediafire.com/?ymdzm2tjmdn
for your infomation..the box 1 are the text data...that the box 2 are display...
this are my first try...i did not know how to add function to the box...
http://lookpic.com/i/310/qXtrzfLG.jpeg
please lent me some idea..
for your information, i'm new with VS C++
Thanks!
modified on Thursday, October 15, 2009 9:45 PM
|
|
|
|
|
Take a look here[^] at some of the tutorials on The Code Project; they should offer lots of ideas.
|
|
|
|
|
Hi,
I had some code that I was using on a machine with a Low resolution I populated some data in a Rich Edit control
and aligned up things with GetTextExtent
Now when I ported the code to a machine with a higher resolution the text doesn't align properly
Thought GetTextExtent takes things like that into consideration
The one other difference is that the higher resolution machine runs Vista
Do I have to use GetDeviceCaps ???
thankx
|
|
|
|
|
GetTextExtent is used to get the width and height of a string.
But how and what do you mean by aligning it?
You will need to post the relevant code.
|
|
|
|
|
Here's is the code and I'll try to explain what I am doing
LPCTSTR teststr = "XXXXXX 01234567 89ABCDEF 01234567 89ABCDEF";
Myricheditctrl* Myrichptr = &Myrich;
CClientDC mydc(Myrichptr);
Csize.mysize = mydc.GetTextExtent(teststr,53);
I trying to dump storage 16 bytes per line
using tester to represent the number of spaces between character
I use Setsel and ReplaceSel to replace "XXXXXX" with 000010 ... 0000020
On two of my machines running Windows XP though I dont think this has anything to do with XP
I was able to re-size my Richedit control to fit 16 bytes of storage with a location on the left
using the above code now on My Laptop which has a sharper resolution then two machine the code wraps
Hope I explained it somewhat better
|
|
|
|
|
You may want to use SetFont[^] on your richedit control so that it always uses the same font.
The default font used by the richedit control in both machines are probably different.
|
|
|
|
|
|
When did you wake up, pal? You've posted answers at around 5 AM IST and all?! Did you not sleep at all?
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
I'm in the U.S right now on an assignment.
|
|
|
|
|
Thank God.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Those sleepless times are all long gone man.
|
|
|
|
|
Please Help I want c or c++ program to solve 8 puzzle problem using depth first search and breadth first search and each search print out cpu time and memory space of the queue
|
|
|
|
|
No one is going to "give" you code. You have to show your work and ask for help with problems you are experiencing
AF Pilot
|
|
|
|
|
Wrong forum: You should post in the gimme codez one.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
khatatbeh20092 wrote: I want c or c++ program
I want Megan Fox in her underwear serving me breakfast every morning.
|
|
|
|
|
Heres an exciting thought - you've probably got a better chance of getting what you want than the OP!!
|
|
|
|
|
Hi guys, I'm trying to take a move to unmanaged C++ desktop apps from C#.Net.
But it is still confusing to me on what libraries I should use. I've heard mostly ATL and MFC.
What would you guys recommend? What is the market demand today?
From what I've heard, MFC would be the choice, however, I'm not sure about it.
Whichever choice you recommend, what would you suggest as a good book?
Also, If I intend to port it to other platforms (MacOS/Linux) what would make the job easier?
Thanks and Regards!!
Fábio
|
|
|
|
|
For MFC, I'd recommend the book: Programming Windows with MFC by Jeff Prosise[^]. It is very neatly written and covers many aspects of MFC.
ATL and MFC are quite different (and one is not a replacement for the other).
Neither ATL nor MFC are portable to other operating systems. If you need portability, there are things like wxWidgets[^], QT[^], and there's Visual Component Framework[^], which is written and maintained by our fellow CPian, Jim Crafton and these are mostly for UI development.
There's also Boost[^], which is highly praised and is fully portable across operating systems. Poco Library[^] is another thing that you might want to consider.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Thanks for all those recommendations. It certainly made me more confused on what to use
I don't really need portability yet, but I'd rather learn something portable than not portable like the MFC. I took a quick look at VCF and it seemed really interesting. How powerful it is, I don't know. I believe the MFC should be more powerful than anything else, but if there is something close to it that is portable, it would be better. QT, looked promising, but still, can't be sure. If you were me, what would you use?
The MFC book you recommended got me thinking... It is from 1999, and from what I remember there were no fancy looking apps back then. Will I be able to build fancy apps like the ones I can with .Net or like Office 2007? Did MFC got updates since then or it's just that old?
Thanks a lot for your feedback!
Regards,
Fábio
|
|
|
|
|
Hi,
It is not very clear from your reply if or not you are proficient with standard c++ at first place. These libraries use many aspects of object oriented programming very extensively (some of them are libraries, some of them are frameworks) and are all written in C++ (some portions may be in C, but you need not generally bother).
If you are not very good at C++, I'd recommend that you workup on that first. Like Superman said to you, STL[^] is very important and it plays a very crucial role in your day to day development. It is mainly a set of template classes that forms a library and it helps you with basic things like containers, algorithms, etc., These classes are well tested and have been around for several years.
By using STL, you will not need to worry trivial things like writing a linked list to store your data, and you could concentrate on your actual problem, while using the list class provided to you by STL. OK, I shortened it. STL is much more. I'd recommend Effectiver STL[^] to you. But to touch STL, you must understand at least the very basics of C++ and OOP.
Fabio Franco wrote: If you were me, what would you use?
I'd start C++ and STL together, and try and get a working understanding of them both. I'd then learn MFC, followed by other open source frameworks, if needed.
Fabio Franco wrote: The MFC book you recommended got me thinking... It is from 1999, and from what I remember there were no fancy looking apps back then. Will I be able to build fancy apps like the ones I can with .Net or like Office 2007? Did MFC got updates since then or it's just that old?
We had to do all the fancy stuff by owner drawing, but MS has now released the MFC Feature Pack[^], with which you could create very appealing UI (office 2007 style UI) with ribbon, and all. It introduces plenty of new controls, all visually appealing. The fact that the book was first written in 1999 doesn't matter. The basics of the framework remains the same, and it still is a very good option, and it is very powerful.
Remember: You might use this same forum for asking C++/MFC/STL queries. There are plenty of people with good expertise in 'em all. Good luck with your learning.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Thanks a lot Rajesh, you rounded it up for me.
I really don't know much of all libraries used by C++ apps.
But I do know C++ (not too deep, but I can get around). OO concepts are natural to me as I've been using C# and data structures for several years now.
Thanks again, very helpful.
Regards,
Fábio
|
|
|
|
|
You're welcome.
A good understanding of OOP would let you learn C++ faster. Knowledge of data structures is a definite bonus! But like I said in the post below, do not get lost. It is very easy to get lost, because there is aplenty to learn. So, break up everything clearly and set intermediate goals that would lead to your final achievement - becoming a proficient Windows Programmer. The first step, like I said is C++ and STL and I've given link to you to the page where you can freely download an excellent book (actually two parts).
After reading this reply of your, I have a feeling that you must be able to learn C++ and STL faster. So, MFC would be next in the pipeline, sometime soon. Good luck.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Thanks! You are right, I can get lost pretty easily. I started to look around when I bought the book Windows Via C/C++. After I started reading it I figured out that I might have jumped the gun.
My next books will be the Effective ATL and the MFC one. Then I will go back to Windows Via C/C++
In the mean time I will work with Qt, to get a feeling in case I want to develop a cross plataform app (Maybe mobile?).
I Also have to take a look at Boost (I'm already getting lost), but I will leave that to a later point.
Thank you
Regards,
Fábio
|
|
|
|