|
Find out what's really taking the time instead of guessing (I'm willing to bet incorrectly).
Steve
|
|
|
|
|
Hi,
I am working on a project in which I have created a property sheet, I am using 3 property pages in that. Now it happens that it perfectly displays in Windows xp (72 DPI default ), but if I run it on higher DPI than 72 DPI, controls starts disturbing. Many of the controls will hide.
I have one list control and 3 buttons on that which I have created manually (Hard-coded), not created on any dialog. I am facing big problem in setting the position of that List Control and 3 buttons.
Please let me know if anyone have any suggestions about this.
Any help will be appreciated.
|
|
|
|
|
If you create the controls manually then you need to add code to calculate their positions based on the window size and DPI settings. In Dialogs this is done automatically.
Use the best guess
|
|
|
|
|
Hi,
I am working on a project in which I have created a property sheet, I am using 3 property pages in that. Now it happens that it perfectly displays in Windows xp (72 DPI default ), but if I run it on higher DPI than 72 DPI, controls starts disturbing. Many of the controls will hide.
I have one list control and 3 buttons on that which I have created manually (Hard-coded), not created on any dialog. I am facing big problem in setting the position of that List Control and 3 buttons.
Please let me know if anyone have any suggestions about this.
Any help will be appreciated.
|
|
|
|
|
Member 9903065 wrote: I have one list control and 3 buttons on that which I have created manually (Hard-coded), not created on any dialog. Any reason why you are doing this?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Hello ,
I have created a multilanguage supported application in mfc.
|
|
|
|
|
|
Hi,
i am trying to read registry key value the code is this unable to get key value whats wrong this code
LONG ret =RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Apache Software Foundation\\Tomcat\\7.0\\Tomcat7", 0, KEY_ALL_ACCESS, &hKey);
if(ret == ERROR_SUCCESS)
{
RegQueryValueEx( hKey, "Version",NULL, 0, (BYTE*)value, &size);
}
MessageBox(value);
RegCloseKey(keyHandle)
|
|
|
|
|
What is the return value for RegQueryValueEx.
You can check here[^] for the issues you can face and identify why RegQueryValueEx is failing.
Below are the failure scenarios mentioned at the above location:
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a system error code.
If the lpData buffer is too small to receive the data, the function returns ERROR_MORE_DATA.
If the lpValueName registry value does not exist, the function returns ERROR_FILE_NOT_FOUND.
You talk about Being HUMAN. I have it in my name
AnsHUMAN
|
|
|
|
|
hi,
return value ERROR_FILE_NOT_FOUND.
but path of key correct
|
|
|
|
|
venkatesh52867 wrote: but path of key correct How are you verifying this?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Then there might be an issue in the path you create or the value type you use.
You talk about Being HUMAN. I have it in my name
AnsHUMAN
|
|
|
|
|
Are you running a 64 bits version of Windows? For 32 bits versions running under 64 bits windows the HKEY_LOCAL_MACHINE\Software forks to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node, which could be what causes the file not found if you spelled it correctly (spaces and all).
|
|
|
|
|
This does not explain why RegQueryValueEx() is failing, but you are displaying a value that may be invalid, and closing a key that may not have been opened. Suggest:
if (ret == ERROR_SUCCESS)
{
if (RegQueryValueEx(hKey, "Version", NULL, 0, (BYTE *) value, &size) == ERROR_SUCCESS)
MessageBox(value);
RegCloseKey(keyHandle)
} Does HKLM\SOFTWARE\Apache Software Foundation\Tomcat\7.0\Tomcat7 exist? What type is value ?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
ret =2 that RegOpenKeyEx returns 2
LONG ret =RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Apache Software Foundation\\Tomcat\\7.0\\Tomcat7", 0, KEY_ALL_ACCESS, &hKey); this not success
|
|
|
|
|
Have you run regedit to verify the exact path of the key?
Use the best guess
|
|
|
|
|
I'm looking for a graphics library/method for drawing visio-symbols in your own DC/view.
Anybody stumbled across something like this?
Any help would be appreciated,
Thx.
|
|
|
|
|
Umm.. I thought Visio (and Office) could export documents as web pages.
The exported .vdx files can be converted to SVG with freely available converters. VDXtoSVG sourceforge
The older 2001 .vdx format schema is no longer available, but there's the 2010 schema and previous ones back to 2003, here: Visio 2010 XML Schema
I don't know of any vector to bitmap converters, but it shouldn't be too difficult to do yourself.
Q. Hey man! have you sorted out the finite soup machine?
A. Why yes, it's celery or tomato.
modified 11-Mar-13 22:11pm.
|
|
|
|
|
Thanks for your reply.
We're looking to take Visio-like symbols and draw them in our view. Would like the user to be able to select the .VSS file, select the symbol and draw it.
You're method appears to be a one-off method. Are the VSS file formats published anywhere?
|
|
|
|
|
I thought that the second schema link would help you with file format info.
There's a C++ XML parser called rapidxml if you want to try that route. But you still need the visio xml schemas.
Otherwise you'll have to download vdx converter source code Saxon (it's Java) also on sourceforge, vdx2svg has a dependency on it.
I have the Pro version of Visio (2002) and it has the developer reference. I will take a look and see if there's more info for you in that.
Q. Hey man! have you sorted out the finite soup machine?
A. Why yes, it's celery or tomato.
modified 13-Mar-13 13:47pm.
|
|
|
|
|
How I can pass arguments to .exe file in MFC Dialog based application. I have used ShellExecute to call .exe file to my program now i wand to give 2 filenames as an arguments to .exe file.
Thank You.
|
|
|
|
|
Pass them with the lpFile or lpParameters parameters of the ShellExecute() function:
ShellExecute(NULL, _T("open"), _T("myfile.exe \"file 1\" \"file 2\""), NULL, NULL, SW_SHOWNORMAL);
ShellExecute(NULL, _T("open"), _T("myfile.exe"), _T("\"file 1\" \"file 2\""), NULL, SW_SHOWNORMAL);
Note that i have quoted the file name in the parameters using escaped quote characters. This is necessary when the file names and the executable contain spaces.
|
|
|
|
|
I have 2 tabs in my program on first tab i have 10 MFCEDitBrowse control
and on second tab I have calculate button when ever
i clicked on calculate button it should called .exe file and input for .exe file is
selected files in mfceditbrowse control on (tab1).
selected files are not fixed it is between 1 to 10.
Please help me out I dont understand how i can give filename(with path) from mfceditbrowse
(dlg1) to .exe file (dlg2)
|
|
|
|
|
I don't understand where the problem is. Just create a string with the file names from your browse controls and pass this string as parameters to ShellExecute() . When creating the string, separate the file names by spaces and quote them using double quotes when they contain spaces:
void CMyClass::AppendFileName(CString& str, LPCTSTR lpszFileName) const
{
bool bMustQuote = _tcschr(lpszFileName, _T(' ')) != NULL;
if (!str.IsEmpty())
str += _T(' ');
if (bMustQuote)
str += _T('"');
str += lpszFileName;
if (bMustQuote)
str += _T('"');
}
void CMyClass::ShellExecute()
{
CString strParameters;
CString strFileName;
strFileName = GetNameFromBrowseControl1();
AppendFileName(strParameters, strFileName.GetString());
ShellExecute(NULL, _T("open"), _T("myfile.exe"), strParameters.GetString(), NULL, SW_SHOWNORMAL);
}
|
|
|
|
|
peoria123 wrote: Please help me out I dont understand how i can give filename(with path) from mfceditbrowse (dlg1) to .exe file (dlg2) Separate your problem into two smaller problems. First get the filenames from the various controls. Once you have successfully done that, then worry about passing those names to the EXE.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|