|
Thanks for all your replies.
I tried with "wb" and "rb" mode and its working fine.
|
|
|
|
|
Good news. But don't forget my comments about error checking, particularly when reading the file. Never assume that the file contents will be correct, however they were created.
|
|
|
|
|
I want to get the default value of the KEY from the registry
if( RegOpenKeyEx (HKEY_CLASSES_ROOT,
"\\AcroExch.Document\\Shell\\Open\\Command",
0,
KEY_QUERY_VALUE, &keyHandle) == ERROR_SUCCESS)
{
size1=260;
RegQueryValueEx (keyHandle,
"Default",
NULL,
&Type,
(LPBYTE)rgValue,
&size1);
sprintf (fnlRes,
"Default value your Windows system is:: %s",
rgValue);
}
I am not able to do so
|
|
|
|
|
RegQueryValueEx (keyHandle, NULL, ...);
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
I have created MFC dialog based application using VS 2008 application creation wizard.
In project settings if I use "Use Unicode Character Set" option, I cannot see winXP styles on any of the controls on the dialog,
and If I use "Use Multi-Byte Character Set" option, I can see the winXP styles.
Why this is happening? can't I use "Use Multi-Byte Character Set" option without losing WinXP styles to the control.
Some one please help me out with this issue.
Thanks in advance.
-Rajesh.
|
|
|
|
|
itsmerajesh wrote: In project settings if I use "Use Unicode Character Set" option, I cannot see winXP styles on any of the controls on the dialog,
and If I use "Use Multi-Byte Character Set" option, I can see the winXP styles.
Why this is happening? can't I use "Use Multi-Byte Character Set" option without losing WinXP styles to the control.
1. The two paragraphs are contradictory. The second one is correct. isnt it?
This is because common control version 6 supports only unicode and a dependency to comctrl version 6 is only inculded if the unicode is enabled. Check the stdafx.h you can see the following lines
#ifdef _UNICODE
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
#endif
|
|
|
|
|
Actually, if you remove the
#ifdef _UNICODE and the corresponding
#endif the common controls will still work with MBCS and give you the XP look.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
|
Hi All,
In my application I need to execute some commands. For that I am making a .bat file and execute it using Shellexecute(). It is working well for Vista32 bit, but in Vista64 bit machine Shellexecute() is not running these commands(i am running with Admin privileges also). Does ShellExecute() not support Vista64 bit?
Is there any other way for Vista64 bit.
Thanks
Madan
|
|
|
|
|
It's probably some error in your batch file.
First run the batch file manually and check if all the commands work.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Thanks for replying. Yes all the commands are correct because if I run this batch file with command prompt then it execute successfully.
Let me explain- I am running following three commands command1)- bcdedit /set {bootmgr} device boot > D:\m1.txt
command2)- bcdedit /set {default} device boot > D:\m3.txt command3)- bcdedit /set {default} osdevice boot > D\m2.txt.
These three commands clears Bootmgr of Vista.
For runnong these commands I make a batch file and execute it with ShellExecute() For seeing output I used pipe. Then after ShellExecute() if I see these m1,m2,m3 files then these are blank.
I am confused now.
|
|
|
|
|
|
Madan Chauhan wrote: ...but in Vista64 bit machine Shellexecute() is not running these commands(i am running with Admin privileges also).
What does it return?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
How can we get the acrobat path reader exe path in VC++
|
|
|
|
|
Why do you want the path?
Is it so that you can use it to launch a PDF file?
If so, you don't need to know the path.
You can simply use ShellExecute to launch it.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
«_Superman_» wrote: Why do you want the path?
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
DavidCrow wrote: See here.
It's not because of my post Mr. Crow.
I've gave him this answer after I saw his post about the exe path.
I knew that you will give him the right directions about the exe path and decided to show the OP how could he pass cmd line args to Acrobat reader in order to select given page.
Regards
Nuri Ismail
|
|
|
|
|
Hi deadlyabbas,
Did you try searching the Adobe forums[^] before asking in the C++ forum?
Best Wishes,
-David Delaune
|
|
|
|
|
Try
SearchPath[^]
Pass "AcroRd32.exe" as lpFileName to that function.
|
|
|
|
|
Use FindExecutable() .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
I am trying to widen drop-down part of combo box but keep fixed size of combo box.
For the same i used following in my code. But drop down portion of the combo box remained as it is.
No change reflected in it's size.
LRESULT OnDropDown(WORD wNCode, WORD wID, HWND hWCtl, BOOL & bH1)
{
::SendMessage(v_ComboBox->v_hWnd, CB_SETDROPPEDWIDTH, 100 , 0);
::SendMessage(v_ComboBox->v_hWnd, CB_SETHORIZONTALEXTENT , 100 , 0);
}
Please help to solve this issue..
|
|
|
|
|
CB_SETDROPPEDWIDTH is used to set the maximum allowable width and not the exact width of the drop down list.
In your case the drop down list will grow up to 100 pixel if you have lengthy strings as its items.
For fixing a large width to the drop down, you may need an owner draw combo box.
This article could be of help - FontComboBox - a font listing combo box for .NET[^]
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
«_Superman_» wrote: In your case the drop down list will grow up to 100 pixel if you have lengthy strings as its items
I guess thats not correct. To confirm I just tried the code and the width of drop down changed to 100( Provided the width of combo is less than 100 pix ).
|
|
|
|
|
Thanks for the information.
Never tried it myself.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Thanks to all for quick response.
Now my problem is solved.
MSDN itself states "Call this function to set the minimum allowable width, in pixels, of the list box of a combo box"
The problem was the very small width specified by me.
The 100 pixel size was less then the width of the combo box itself, that's why i was not able to see any change.
Thank you very much!
|
|
|
|