|
Hello,
I want to TextOut values on a bitmap, but coordinates for one view does not corespond to coordinates on other views and resolutions. What can I do ? For example pDC->TextOut(100,100,myvalue) -> 100,100 is good just for one view and that's the one I start with. I tried some formulas of conversion but still my application depends on the starting resolution. If the computer I launch my application on doesn't have the same resolution as the one I made my app on then I'm screwed.
All I want is to match the values I take from a file with cities on the map. The DrawText() method can't be given values that I want and I wasn't able to find any class the helps with that.
Can anyone help me ? I'm really out of ideas.
|
|
|
|
|
Use specific mapping mode. That should solve your problem
as they are independant of the resolutions of a moniter.
And then yuo can use the foll. fns
DPtoHIMETRIC Converts device units into HIMETRIC units.
DPtoLP Converts device units into logical units.
HIMETRICtoDP Converts HIMETRIC units into device units.
HIMETRICtoLP Converts HIMETRIC units into logical units.
LPtoDP Converts logical units into device units.
LPtoHIMETRIC Converts logical units into HIMETRIC units.
|
|
|
|
|
I am not completely sure what your problem is, but you can get the current size of a window/view by calling its GetClientRect() method, and if you need the current screen resolution take a look at ::GetSystemMetrics().
--
Dana Holt
Xenos Software
|
|
|
|
|
Hi everyone,
How can I detect what microsoft softwares are installed on a machine using a VC++ code .. I have tried using APIs like "MsiGetProductInfo" & "MsiEnumProducts",but no luck,it dint give wheter IIS,IE etc is installed or not ..Please let me know if anyone knows an answer to this
Prasad
|
|
|
|
|
scanning the registry I suggest.
|
|
|
|
|
I always scan for registry keys that the software I am interested in makes. There is also a function, FindTarget seems to ring a bell, that will take a file name and give you the application that handles it.
--
Dana Holt
Xenos Software
|
|
|
|
|
How do I get a second dialog to redraw/repaint to show changes they are taking place to the buttons on the page.
The buttons are set and change color according to the input read by the dialog. I have been doing all this using a timer, but it only redraws when the mouse leaves that window and then returns.
Any ideas on how to get this to keep up with the data?
thanks
|
|
|
|
|
You can force a redraw on any window by
using
Invalidate() ;
UpdateWindow() ;
|
|
|
|
|
Prem,
Though this solution works the flickering it creates is unbearable.
I really just need for the buttons to show there "new" state.
Thanks.
|
|
|
|
|
You need to reduce the amt of times the button is getting updated.
Look at the code and see if you can reduce the amt of times you are updating
and actually allow updation when you actually changed the color
or length of the drawing.(you save the state and compare or
you will call the update only when the state changes)
|
|
|
|
|
I need some help getting a printout of the class view. I'm trying to work through someone else's code, and would like a hard copy list of classes, member functions, variables, etc.
If I can't do this through VS, is there any easy means of getting the info. It doesn't have to look pretty.
Thanks, Brian Welsch
{insert witty/thought-provoking saying here}
|
|
|
|
|
Hi Brian,
I think instead of printing classes you might find this tool better:
http://sources.redhat.com/sourcenav
And it supports printing 'class view' as well.
Martin
|
|
|
|
|
Hi,
I dont know of any way we can do it thru VS ,
but there is another tool which can basically create
class listings, cross refernces in the form of html
pages(it actually almost equal to Browse Info)
and you can take a print out of the html pages.
Here is the link.
http://www.stack.nl/~dimitri/doxygen/download.html
|
|
|
|
|
Has anyone seen this before!
I have an MFC project which when the release EXE is ran, it's fine. But when its ran through the VC++ IDE generate exceptions.
Cheers
Rich
|
|
|
|
|
are you shure that it's not just that the exceptions are caught by the MFC ??
check your IDE settings for stop always, if you set it to stop if unhandled you might get your 'normal' behaviour back
regards
Rutger
|
|
|
|
|
~~~~~~ Bizzare, As you said it. ~~~~
|
|
|
|
|
Hum , I known , this behaviour, it's a VC6++ bug , the remedy is even more bizarre , it have to do with the registry !!! Unfortunately I don't remember how I solved it .
If you don't have SP5 , try to install it .
Cheers,
Joao Vaz
A person who is nice to you, but rude to the waiter, is not a nice person - Natalie Portman (Padme/Amidala of Star Wars)
|
|
|
|
|
Hi
I'm trying to create a simple program that will format a ftp url..
Example:
ftp://user:pass@11.11.11.11:21/dir
Will be converted to:
IP:11.11.11.11
PORT:21
PATH:/dir
USERNAME:user
PASSWORD:pass
How could I do this? What functions might be usefull ??
Thanks
|
|
|
|
|
Use strtok, or you could just parse it yourself
reading character by character, i think most of us would
prefer pasring ourselves since it is pretty straight forward.
|
|
|
|
|
Take a look at the AfxParseURLEx function in the MFC. If you don't want to use MFC, take a look in the source of this function.
Martin
|
|
|
|
|
FYI,
Even if you don't want to use MFC, the ATL class CUrl (VS .NET Only AFAIK) may come handy
Regards,
R.
|
|
|
|
|
You may also want to take a look at the InternetCrackUrl function.
|
|
|
|
|
Hi,
I want to make use of a class derived form CWinapp in my mfc extension dll.Do i need have some write some message loop,If so where it should be written?
Regards
Neha
|
|
|
|
|
Actually, since you are trying to derive from CWinApp
I dont think you need to provide a message loop unless
you want to do any customization.
Of course the Run will be called only if the CWinApp object
is instantiated.
|
|
|
|
|
I have a MFC dialog-based application.
It fails sometimes between OnOK's end and the end of the global DoModal execution:
// code from App::InitInstance
int nResponse = dlg.DoModal();
// fails before reaching this line
if (nResponse == IDOK)
{
}
else if (nResponse == IDCANCEL)
{
}
The error is about reading from a wrong address in memory.
Do you know how should i debug the application to catch the error point?
rechi
|
|
|
|