|
I have several problems with my code you can see here
.
.
.
void CProjectSoftwareDlg::OnStart()
{
if(WinExec("iexplore -k index.html",SW_SHOWNOACTIVATE)>31)
{
OnOK();
}
else
{
MessageBox("Damn...");
}
}
.
.
.
.
1. Problem: The ie doesn't even run. I always get "damn" back...
2. Problem: I am not able to set index.html to "index.html" because of those "'s
3. Problem: I have to get a local pathfile into the IE is this possible or do i have to get the filesystem.
At all i get no warning or error back while compiling.
I hope you are able to help me
sleater
|
|
|
|
|
Use ShellExecute() instead of WinExec()
Like
ShellExecute(handle, "open", "http://www.codeproject.com/", NULL, NULL, SW_SHOWNORMAL);
if you want to open a webpage, or
ShellExecute(handle, "open", file:///c:\test.htm, NULL, NULL, SW_SHOWNORMAL);
to open a local file...
And yes, there are 3 "/" in file:///, it's not a typo
Hope it helps...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
thanks a lot
sleater
|
|
|
|
|
But there's still a problem two "//"'s are interpretet as an comment...
sleater
|
|
|
|
|
They should be fine as long as they're within the double quotes.
Regards,
Alvaro
|
|
|
|
|
Exactly, I just forgot the double quotes.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Can somebody tell me how I can convert centimeters into pixels?
e.g. I have given the value 25cm (centimeters, an european, or at least german unit of measurement ) and want to know the value in pixels.
I nee to draw some object very accurate onto the screen.
Any code is greatly appreciated
regards
|
|
|
|
|
I'm sorry to inform you that an answer will only be possible if every monitor in the world is the same size and runs the same resolution. You can find out the resolution from Windows, I know of no way to find out the size of the monitor with accuracy, let alone the fact that you can control from the front panel how much of the screen is used.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
You probably didn't unerstand my question
I.e I just found out that 100 pixel are equal to 3,571 centimeters.
Now I need to convert Pixels into Centimeters an vice versa.
How can I do this using c++?
|
|
|
|
|
What Chris was trying to make clear was that 100 pixels may equal 3.571 centimeters on your monitor, but on mine it could be 4.672 cm (just an example). How is c++ supposed to know the size of your monitor? And even if it knew it was a 17'' monitor, how is it supposed to know how big the screen's display area has been set to by means of the buttons on the front of the monitor?
There are som DC functions you can use to get an *estimate*. Set your mapping mode to one of the fixed-size ones (MM_TWIPS, MM_LOENGLISH, MM_HIENGLISH etc) an use the LPToDP and DPToLP functions. But there's no satisfaction guarantee!
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Use CDC::GetDeviceCaps(LOGPIXELSX) or CDC::GetDeviceCaps(LOGPIXELSY). These calls will return the number of logical pixels per inch. Having this, calculating centimeters into pixels should be easy - just remember that one inch is 2.54 centimeters.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thanks! I will try this.
Erm...I need to get the DeviceContext (DC) from my monitor fist, right?
How do I do this?
|
|
|
|
|
Not exactly. If you're using MFC, you'll have DC passed to OnDraw. If you're playing on Win32 API level, your DC will come out from BeginPaint.
However, you'll sometimes need to create your own display DC - for example, during processing of mouse messages. In such case, use GetDC(NULL) or CreateDC("DISPLAY", NULL, NULL, NULL). You can also use CreateIC instead of CreateDC when DC will be used only to retrieve the attributes, like LOGPIXELSX.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
How I can import Flash animation in my Doc/View project?
Ivan Eryshov.
|
|
|
|
|
There is a Flash SDK on the web, and newsgroups for Flash developers. Look up David Mitchie in google and see what you find.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
How I can print unicode symbols using SetWindowText or ReplaceSel function?
Ivan Eryshov.
|
|
|
|
|
hi I've developed an application it seems to be somehow dependent on SHLWAPI.dll and i'm unable to locate why it is dependent on this can anyone help me out
|
|
|
|
|
Run Dependency Viewer on your EXE. The left-hand tree will show all the DLLs it links with. Click shlwapi.dll in the tree, and Depends will show you which functions you're calling in that DLL.
--Mike--
http://home.inreach.com/mdunn/
Ford: How would you react if I said that I'm not from Guildford after all, but from a small planet somewhere in the vicinity of Betelguese?
Arthur: I don't know. Why, do you think it's the sort of thing you're likely to say?
|
|
|
|
|
|
(ex: code runs faster because it's in the same namespace? less memory used? etc...)
Nope, namespaces are just a way to localize class/object names, and are handled at compile time. Grouping stuff in namespaces has no impact on the binaries.
--Mike--
http://home.inreach.com/mdunn/
Ford: How would you react if I said that I'm not from Guildford after all, but from a small planet somewhere in the vicinity of Betelguese?
Arthur: I don't know. Why, do you think it's the sort of thing you're likely to say?
|
|
|
|
|
Hello. I have programmed several applications with MFC. For my next program, I would like to get text from a window in another program to use within my own program. I have looked at the window in spy++, but that really hasn't helped any. Can someone point me in the right direction? Thanks.
|
|
|
|
|
Have a look at WM_GETTEXT.
|
|
|
|
|
Hello, the codegurus around the world.;)
Currently, I'm working to check the version number of Windows XP.
On RC1, Windows XP's the major number is 5 as Windows 2000 does.
And, the minor version number of XP is 1, but that of Windows 2000 is 0.
Recently, my friend got Windows XP evaluation version at the computer show in Atlanta, GA, and its version number is 2002?
Does anybody get the true information of Windows XP version number?
Thank you in advance.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
Windows XP = Windows NT 5.1
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Hi,
I have a CDisplay class (CWnd), and I want to programatically add a configurable menu to it, ie, no class wizard junk. Problem is, that I want to support 3-4 instances of this object in one app while maintaining system-wide resource ID integrity and the ability to relay UI msg's when the user clicks the menu. Any creative suggestions?
|
|
|
|