|
Hi !
I'm showing in a metafile one string normal, or rotated 90 ( landscape).
In normal mode, it calcs all the sizes, and the output string looks a little bit shrinked, but in the "rotated" mode, the string is shown not a bit shrinked, but GetOutputTextExtent, gives me the same value... so just the end of the string it's not shown...
I call ExtTextOut in this way:
dc.ExtTextOut(textRect.left, textRect.top, ETO_CLIPPED, textRect, str.c_str(), NULL);
Do you know how can I get the right value with GetOutputTextExtent for the rotated text ?
Thanks in advance, greetings
Braulio
|
|
|
|
|
I've done something similar but I haev not used ExtTextOut, I've used DrawText...
else if (eElementTitol == ELEMENT_TITOL_EIX_VERTICAL)
{
FontTitolGeneral.CreateFont(-10,0,900,900,FW_BOLD,FALSE,FALSE,FALSE,
ANSI_CHARSET,OUT_DEFAULT_PRECIS,
CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,
DEFAULT_PITCH,"Arial");
pFontAntiga = memDC->SelectObject(&FontTitolGeneral);
RectangleCalculations...
memDC->DrawText(this->m_csTitolEixVertical, &rRectCalculatOcupatPelText, DT_BOTTOM);
memDC->SelectObject(pFontAntiga);
}
Hope this helps...
|
|
|
|
|
Hi!
I'm programming an application that sits in the systray and only becomes active when the user selects a menu item from the popup-menu when right-clicking on the icon in the systray.
Everything works fine, however a taskbar item is created for the time the window is being shown on the screen. (it disappears when the user hovers away from the dialog, and then the window and taskbar item is hidden again).
But my app has the WS_EX_TOOLWINDOW style, so why does my app have a taskbar icon?
thanks in advance
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Have you verified with a program like WinSpector, or Spy++ that the app frame does indeed have the WS_EX_TOOLWINDOW style?
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
I just checked it with Spy++ ...yes, it does have the WS_EX_TOOLWINDOW style
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I have an MDI Application that Implements the Serialize method and I read data from the disk that are pertinent to the current document .
There are two scenarios where I do not want the view to come up and want to abort the process of generating the view .
1. User selects a File from the MRU list which is not present.
Application generates an error saying that the File isnt there But crashes as it further continues to load the View . Using debug i got the following Error
Reporting file I/O exception on Save/Load with lOsError = $2.
CDocument::OnOpenDocument returned FALSE.
2. I am implementing Serialize function in my Document class that reads data from a File. There might be an error condition that I encounter while I read . In such a situation I need to prevent the View from coming up .
Both the above mentioned scenarios are targeted at preventing the View from Displaying . How do I go about this ? Please help .
|
|
|
|
|
There was a suggestion from someone that I use DestroyWindow() when I encounter an error condition .
I tried using DestroyWindow in the OnInitialUpdate Function and my application crashes .
|
|
|
|
|
I have a SDI Application, i don't know if i accidently did something wrong but now my toolbar is disabled.
Even i created a new toolbar resource and attached application with this new toolbar, but when i run my Application, this new toolbar buttons are also shown as disabled.
This is urgent, please help
|
|
|
|
|
I have noticed another thing,
Any menu items which i add under File menu option is also displayed as disabled.
What i did i just removed entries for New, Open, Save etc under the File menu option.
|
|
|
|
|
For Tool Bar or Menu Bar items for which u havent written Action handlers will stay disabled .
|
|
|
|
|
hey everyone, I need to change some win32 app code to run in console mode,
I need to fix my directory iteration routine.
basically i am looping thru a directory, and operating on the files with the following......
// Open directory for read
CFileInfoArray fia;
fia.AddDir(
m_spoolpath, // Directory
"*.*", // Filemask (all files)
TRUE, // Recurse subdirs
CFileInfoArray::AP_SORTBYNAME | CFileInfoArray::AP_SORTASCENDING,FALSE
);
// here will start the directory iteration
for (int ji=0;ji<fia.GetSize();ji++) {
// so on and so on
}
but that wont work in console mode... can someone tell me how to make either that code work in console mode ( if possible) , or provide me a snippet example that will to do the same general task, looping thru the files in a directory, giving me a filename to operate on inside the loop.....
thanks in advance
josh
|
|
|
|
|
|
well, it doesnt run as is , im experiencing that now...
its producing tons of errors i cant trace down, and Im assuming that is because its MFC code and not made for console apps.
Deleting intermediate files and output files for project 'cBoogieTest - Win32 Debug'.
--------------------Configuration: cBoogieTest - Win32 Debug--------------------
Compiling...
StdAfx.cpp
Compiling...
cBoogieTest.cpp
FileInfo.cpp
Generating Code...
Linking...
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Debug/cBoogieTest.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
Creating browse info file...
cBoogieTest.exe - 3 error(s), 0 warning(s)
thats the latest errors ive got
|
|
|
|
|
ahh, it does work
|
|
|
|
|
In project-->Settings-->General
For MFC: Use MFC in shared DLL.
Then in the start of main():
if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
{
cerr << _T("Fatal Error: MFC initialization failed") << endl;
return 1;
}
else
{
}
That should do it...
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
using C++
Ask the user to input his date of birth (dd/mm/yyyy), preform error checking for the input and if there's an error ask the user to input the date of birth again,, then calculate the 10,000 days anniversary in (AD & BC) formats then display the new date of birth on the screen.
thank you.
|
|
|
|
|
Sounds like you need to do your own homework
|
|
|
|
|
come on bro it's due tomorrow and i'm new in using C++
it's a major assignment ... plz
|
|
|
|
|
Major assignment, due tomorrow and you haven't yet started?
Get your act togeheter or please look for another field of work.
(Posts like these really pisses me off, sorry)
|
|
|
|
|
Stefan Pedersen wrote:
Major assignment, due tomorrow
If this is a major assignment, I'll have to go back to school again. I used to write this kind of code in my sleep
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|
|
LOL... his words, not mine.
|
|
|
|
|
looks like you'll have to find a sucker somewhere else.
Jason Henderson start page ; articles
henderson is coming
henderson is an opponent's worst nightmare
* googlism *
|
|
|
|
|
I have a question for you. I can write the code you need in about 15 minutes. However, if I do, what will you do when your next assignment is due, the one that assumes you learned this stuff ? Are you going to pay me to do your homework between now and graduation ? Or do you expect me to do it for free ? What about when you start your job, and you know nothing because you were too busy getting drunk to learn this (basic) stuff ? There are three possibilities here.
P1. You were too lazy to go to class/pay attention.
Solution: come clean ( or fake major illness ) and hand it in late. IF you try to do this yourself and get stuck, people here will be glad to help. We just don't 'do' homework for lazy people.
P2. You are too stupid to program computers
Solution: become a plumber
P3. Your teacher is inadequate.
Solution: If this is the case, your fellow students will be as clueless as you, so go together to the administration of the school and complain.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
You need to provide more information.
What GUI library are you using? Is it a Windows app? The input side would be straight forward using an MFC CDialog class and the DateTime picker common control. (Although it won't support BC formats as Windows is limited in its time ranges)
The COleDateTime and COleTimespan class will do the maths on the entered date for you.
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|
|
it is a win32 application using visual C++
|
|
|
|