|
|
Hi
All
I am doing one application in VC++,MFC in which i have to use ToolTip control with font other that default font of system.So if any body have some hint about this query then plz forward me.
Thanks
aaamm
|
|
|
|
|
hello
i'm using HRESULT GetFileDuration(Qword* duration) in win32 to get duration.
For this function i have to add "wmsdk.h and wmsdkidl.h" header files
When i add these files by giving appropriate path i'm facing errors
syntax error : identifier '__RPC__in' c:\wmsdk\wmfsdk11\include\structuredquery.h
syntax error : identifier '__RPC__out' c:\wmsdk\wmfsdk11\include\structuredquery.h ........
there are around 45 such errors
help me to solve this problem
thanks!!
|
|
|
|
|
Please use the window media format sdk 9.5. in place of 11.
"Success lies not in the result , But in the efforts !!!!!"
Amit Mistry - petlad -Gujarat-India
|
|
|
|
|
Hi all,
My Application uses RegCreateKeyEx to create a registry.This appilcation has to work in both windows XP and Vista. In windows XP it create registry successfully ,But in Vista it fails to create registry ...
How do i Solve it ....
Manjunath S
GESL
Bangalore
|
|
|
|
|
Manjunath S wrote: But in Vista it fails to create registry ...
Vista has lots of restrictions, dealing with registry. You may like to read UAC for that. Search for UAC on MSDN .
Prasad
MS MVP - VC++
|
|
|
|
|
Thanks for your reply
Any sample code available to just create a registry in windows Vista ...
Manjunath S
GESL
Bangalore
|
|
|
|
|
I faced the same problem with my application.
I used a manifest.xml in my application as a resource and it solved the problem.
Here are the contents of that manifest.xml file.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="CompanyName.ProductName.YourApp"
type="win32"
/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="highestAvailable"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
Call InitCommonControls() in the InitInstance() of ur application
BOOL CURApp::InitInstance()
{
InitCommonControls();
--------------------------
----------------------
}
U can follow these steps to include manifest.xml in ur project.
Once writing manifest.xml is completed, you will want to add the manifest.xml file to your project in the resource editor. In Visual Studio 6, hit Ctrl+R to add a new resource, select all files and double click manifest.xml to add the file. When you see the custom resource dialog, enter the number "24" as the resource type and hit OK. Once imported, right click on the resource to open the properties window and change the ID to the number "1".
Sameer Thakur
|
|
|
|
|
Thanks Sammer for ur valuable reply...
Iam using Visual studio installer to install an application.In the installer i have a custom action DLL.In this DLL before installing the application i have to check the registry whetheir any entry with name same as my application name is present,if present take the path entered there, if not create a registry entry named with my applciation name....
Any tips to do above in vista ....
Manjunath S
GESL
Bangalore
|
|
|
|
|
Logically.....
You can add that xml file as a resource in a DLL that u are using as a custom action DLL.(No need to call InitCommonControls() in that case.)
By doing that ur DLL will get elevated privileges to read/write registry entries on Vista.
Sameer Thakur
|
|
|
|
|
Hi sameer
Can u tell me what actually done in this XMl...
How it helps to edit registry
And how Custom Dll Handles it...
Manjunath S
GESL
Bangalore
|
|
|
|
|
In Vista there is a concept of User Account Control (UAC) by which it prevents any major changes in registry (though you are logged in as an Admin).
To enable registry changes, we need to provide higher privileges to the application.
To do this there is a tag in manifest.xml …
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="highestAvailable"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
Here we are granting the “highestAvailable” privilege to the application/DLL which ultimately grants the permission to ur application/DLL to access (Read/Write) registry.
Sameer Thakur
|
|
|
|
|
Thanks sameer
I will try this and udapte ...
Manjunath S
GESL
Bangalore
|
|
|
|
|
What happens on Vista? Post your code.
|
|
|
|
|
Hi guys,
I tried with embedding the manifest.xml in my Dll as posted in the previous reply to write registry entry in windows vista. But this fails to create any effect (my Dll could not create the registry entry)
Manjunath S
GESL
Bangalore
|
|
|
|
|
The XML that specifies what execution level you want only makes sense for EXEs, not DLLs, since the execution level applies to a process as a whole.
|
|
|
|
|
Hi Mike,
How can i achieve ( writing to registry ) In vista using DLL...
Manjunath S
GESL
Bangalore
|
|
|
|
|
Please refer this[^].
Regards,
Paresh.
|
|
|
|
|
HI paresh,
Any sample code to writing a registry entry In vista using DLL...
Manjunath S
GESL
Bangalore
|
|
|
|
|
Hi,
In my poject want to disable and enable ToolBar Button(save,open,new..)
at runtime using view class.
I had used following code but this code not work properly(abnormal termination error are occure)
CToolBar m_wndToolBar;
m_wndToolBar.GetToolBarCtrl().SetState(ID_FILE_NEW,TBSTATE_ENABLED);
m_wndToolBar.GetToolBarCtrl().EnableButton(ID_FILE_NEW,FALSE);
Please help me....
|
|
|
|
|
mohindar_kks wrote: m_wndToolBar.GetToolBarCtrl().SetState(ID_FILE_NEW,TBSTATE_ENABLED);
Are you sure, GetToolBarCtrl is returning some valid pointer. Probably, it is returing NULL value.
mohindar_kks wrote: (abnormal termination error are occure)
This statement leads to above guess.
Prasad
MS MVP - VC++
|
|
|
|
|
Hi,
Am also try to run the following code, here also abnormal termination error are occured
CToolBar c_oToolBar;
CToolBarCtrl & a_roCtrl = c_oToolBar.GetToolBarCtrl();
a_roCtrl.EnableButton(ID_FILE_OPEN,FALSE);
|
|
|
|
|
I am not sure about the approach that u have specified here.
But the following approach will server the purpose of enabling / disabling the tool bar controls.
You need to add a function in your view class.
For example…
Add ON_UPDATE_COMMAND_UI(ID_FILE_NEW, OnUpdateFileNew ) at location shown.
CMyView.cpp
file
=======================================================
BEGIN_MESSAGE_MAP(CMyView, CScrollView)
//{{AFX_MSG_MAP(CMyView)
other message handler functions...
ON_UPDATE_COMMAND_UI(ID_FILE_NEW, OnUpdateFileNew )
other message handler functions...
END_MESSAGE_MAP()
Void
CMyView:: OnUpdateFileNew(CCmdUI* pCmdUI)
{
if( some_Condition)
pCmdUI->Enable(true);
else
pCmdUI->Enable(false);
}
CMyView.h file
Public:
void OnUpdateFileNew (CCmdUI* pCmdUI);
Framework will keep calling OnUpdateFileNew function frequently and will keep the tool bar option enabled or disabled in a way u want.
Sameer Thakur
|
|
|
|
|
I had solve the problem from your valuable reply
|
|
|
|
|
Excellent.
Sameer Thakur
|
|
|
|