|
jerry1211a wrote: I think it would be easier to write to the window much like a dos window
I don't know if that's a good idea (perhaps you can use a list view...), anyway, you have to override the OnPaint handler, calling the TextOut method of the supplied device context.
hope that helps...
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.
|
|
|
|
|
I want to print as a text a White happy face. On MSWord if you press Alt+ numerical 1 you will get White happy face. Please note that it is non-printable character, but as MsWord and other editors are doing, I do not know the trick. It looks to me it must have some WCHAR code to print it. Any idea?
Agha Khan
|
|
|
|
|
It's the WingDings font, I believe.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
We know that but MSWord does not use WingDings font when drawing ☺ White happy face, but there must be a way without changing any font what so ever, but I don’t know. So I do want to change my font.
Agha Khan
|
|
|
|
|
Has anyone successfully used an updated Platform SDK with VS 2003?
I have followed the instructions in the SDK and set all the paths in VS correctly.
All my projects compile with no warnings or errors.
When linking though, i get unresolved externals CWnd::SendMessage, CDC::DrawText,
and CDC::GetTextMetrics.
The problem is with MFC inlining I believe. MFC 7.10 was built with older Windows include
files. Something to do with Unicode/non-unicode (i.e. SendMessageW/SendMessageA) perhaps.
This was a known issue in the past and I'm wondering if there's a simple workaround.
I could change all the calls to direct API calls but that's kind of ridiculous
It would just be nice to use the PSDK for Windows Server 2003 R2 headers/libs on my "old" VS2003
with MFC 7.10 until I'm in a position to migrate the code to VS2005.
Thanks!
Mark
|
|
|
|
|
Hi,
if the the text line is longer than the CEdit control, how to do this:
when pointing mouse over the control, the whole line is shown in a tip like rectangle (like when pointing to an item in a listControl, the whole item text is displayed in a rectangle) ?
Thanks!
|
|
|
|
|
I believe there's an event when the text has been changed ( it's probably changed by the time WM_KEYUP fires ), so just keep setting the tooltip to the current text.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Thanks!
and, how to set the tooltip to the CEdit text?
hope there's a sample code showing it.
|
|
|
|
|
Does anyone know of any MFC API functions that allows a client to figure out the width of the dropdown arrow in dropdown buttons? Ultimately, I want to know how big MFC is going to make a button, given the text, font, bitmap, and whether or not it's a dropdown button. We can get the width of all of those, but we don't know how wide the dropdown arrow will be. Alternatively, if there's an API function that will predict for us how wide MFC will make that button, that would be even better. That is, I want to know how big the button will be before we actually create it.
|
|
|
|
|
I don't know of any system metric for the dropdown arrow size, especially before the button is
created..
Does the TB_GETITEMRECT message return the size including the arrow?
If so you could subtract the result of TB_GETBUTTONSIZE to get the arrow width...maybe
|
|
|
|
|
I've been searching for hours on a tutorial that would start me off building a Web Crawler in C++, but haven't found anything.
Anyone know of a suitable link?
Thanks.
http://www.atraeyu.org/
|
|
|
|
|
google with "Building a Web Crawler in C++" returns a number of pages that look promising.
|
|
|
|
|
Googling "Web Crawler" in 50 different ways was the second thing I tried (the first was searching through the code project articles). I searched through all the results - there were several written in Java, but I'm not familiar with Java.
http://www.atraeyu.org/
|
|
|
|
|
|
Hi,
I have a class X that instanciates many other classes that have no major relationship with it (no derivation...). However I need these classes to be able to see some members of the X instance that created them. It is not possible to use static members because they need to be specific to one instance of X.
Do you see any possibility smarter than passing a reference on class X to every instanciated class ?
Thanks.
|
|
|
|
|
Why not just create a function with which you can pass the member into.
|
|
|
|
|
No, I think that the main class may pass a reference to itself when it instantiates the other ones (and hopefully needed members are public).
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.
|
|
|
|
|
I have a Visual C++ application running in Visual Studio.net.
It will have numerous dialog windows that will display labels and data.
The labels and data will be displayed in Text Controls.
There are IDC_XXX names for the labels and data.
What I need to do is dynamically place the labels and data on the Windows dialog given X and Y coordinates.
I cant use a static dialog in my rc resource file.
QUESTION:
Can I move the controls on the dialog given X, Y coordinates?
If so, can someone tell me how this is done??...and how the X, Y system works in a dialog window.
Where is 0,0 etc...??
Thanks,
Jerry
|
|
|
|
|
jerry1211a wrote: Where is 0,0 etc...??
Just above and to the left of 1,1
Use SetWindowPos() or MoveWindow() , don't ask me for an example, ask your teacher.
|
|
|
|
|
jerry1211a wrote: Can I move the controls on the dialog given X, Y coordinates?
Are you looking for MoveWindow() or SetWindowPos() ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Actually what I have is a dialog window with no controls at this point. I want to write text, numbers, etc to the window, using X, Y coordinates. I thought I could do this but have forgotten how...
Jerry
|
|
|
|
|
The only other way I know of is with TextOut() or DrawText() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I can use that Ok, but I need to get the device context for the dialog I created.
Is there a call to get the device context?
Thanks.
Jerry
|
|
|
|
|
jerry1211a wrote: Is there a call to get the device context?
GetDC() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thank You...
Have a good day.
|
|
|
|