|
code_discuss wrote: I need to know which HWND the current key down message is sent to.
will GetFocus help?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Please ignore my last post, correct api would be GetForegroundWindow ..
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
All dear users,
I want to write an application which will identify wether particular port is blocked or unblocked? If it is blocked then I have to identify that is by antivirus or by user.
Please help and reply
Thanks,
CraZyToLearn
|
|
|
|
|
I used to use Inno Setup to create a single setup file for an application I developed using MFC 7 under Visual Studio 2003. There is no .NET dependencies for this application, but just some MFC and MSVC DLLs.
Now I want to migrate this application to MFC 8, however, I couldn't find a way to create a single setup file for it. I used the Setup and Deployment project and it created setup.exe and AppNameSetup.msi.
Since the application is a shareware, so I'd like to have my users download only one setup file rather than two.
Is there any way that I can achive this? Or is there any inexpensive installation tool (WiseInstall or InstallShield are too expensive) that I can use?
BTW, what is contained in the setup.exe anyway? Why is it needed? Can't we use the msi file directly by invoking msiexec.exe?
Thanks,
Jason
|
|
|
|
|
Take a look in NSIS (NullSoft Installation System)
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
i am the beginner in Visual C++, i usually using borland c, i confuse how to make new form in Visual C++, and how to open file from it, like in Visual Basic 6?
thanx
|
|
|
|
|
Do you want to make a dialog with CreateWindow or CreateWindowEx? you can insert CDialog class to your project after insert it you have a dialog with two files cpp and h file for it,after make it you can use of ShowWindow(SW_HIDE or SW_SHOW) for visible it or hide(also you can use of property of window) for open a file it depends to your purpose if you want to open a graphic file you can use of CImage class or for text files you can use of CFile class,...
|
|
|
|
|
You can do it programatically, or using the Wizard (if u are begginer I recommend you the wizard).
Go to resources editor, add a dialog. If you are not wanting complicated things a dialog will be enough, If you are planning more difficult functionality you may want to use CFormView (expand the + when selecting the dialog to be added).
Then you can put the controls in the dialog like you do in BC++.
If you make a double click, the wizard will ask you for a class to be related with the dialog. Choose a name.
After that you will have a *.cpp and a *.h in the files tab.
In this point... up to you and your code, what the dialog / formview will be able to do.
BTW, search a tutorial, or take a look into the begginers section here in the site. There are very good explanations and examples that will help you a lot.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Hi.
I have the same problem with u, since I am also a beginner.
Can u send me your email so we can change information each other.
(U can reply this posted, so it will send directly to my email)
|
|
|
|
|
Hello everyone,
For a native unmanaged C/C++ Application/DLL/static lib, are there any practical usage of manifest file? If I am not building .NET Assembly.
From the MSDN document, I can not find too much use. Could anyone share some experiences please?
http://msdn2.microsoft.com/en-us/library/ms235542(vs.80).aspx
thanks in advance,
George
|
|
|
|
|
Yes. If you have a need to use Microsoft.Windows.Common-Controls Version 6.0.0.0 for example you want a ListView control with Tiles. Thats all I have found so far but I am sure there are others.
|
|
|
|
|
Hi Roger,
How to use the manifest file to specify current application dependent on a specific version of Windows Control component? Could you provide a sample or some link to learning resource please?
regards,
George
|
|
|
|
|
Please look here[^] for more details.
Regards,
Paresh.
|
|
|
|
|
Thanks Paresh!
Good article.
regards,
George
|
|
|
|
|
an XML file with the name "myapplication.exe.manifest" placed in the same directory as "myapplication.exe"
<?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"
processorArchetectiture="x86"
name="Microsoft.Windows.plugin"
type="win32"
/>
<description>insert 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>
</assembly>
as to what that all means I leave that to you as an exercise
PS: thanks for the linkage Paresh
|
|
|
|
|
Thanks Roger,
Your sample is very helpful. Great! I am just curious, why do you need to be dependent on a specific version of Windows Control component? You want to have some special Visual effect? Or you hard code something in your code which needs the specific version component?
How about if the runtime (customer environment) does not have the specific version of component?
regards,
George
|
|
|
|
|
If you need adminstrator privileges to run your program you can (and have to) specify it in the manifest.
Greetings from Germany
|
|
|
|
|
Thanks KarstenK,
It should be a good usage scenario. Do you have more detailed steps about how to write a manifest file to only let administrator run it?
regards,
George
|
|
|
|
|
Hello.....all's
I am making an application in vc++ amd i used MySQL as database. I make a login section for user and admin also, but i am unable to make it case sensitive ( Mense "TEST" and "test" both are same thing for it. )
Can any one told me how can do it case sensitive. So that user can chosse his user name and password according to his choice.
Regard's
Kaushik
|
|
|
|
|
Y_Kaushik wrote: am making an application in vc++ amd i used MySQL as database. I make a login section for user and admin also, but i am unable to make it case sensitive ( Mense "TEST" and "test" both are same thing for it. )
Do you mean by case insensitive ?
If you are using CString then use
CString::CompareNoCase(LPCTSTR lpsz);
Regards,
Paresh.
|
|
|
|
|
Thanks for help
Regard's
Kaushik
|
|
|
|
|
I have a big structure(NAME_INFO) of strings that needs to be filled up by using the ResourceID.
typedef struct _NAME_INFO<br />
{<br />
char* strTagName;<br />
BOOL bAlwaysCreate;<br />
} NAME_INFO;
Initialization:
NAME_INFO NamesTable[] =<br />
{<br />
{ConvertResIdToChar(IDS_PRIYA),true},<br />
{ConvertResIdToChar(IDS_NISHA),true},<br />
{ConvertResIdToChar(IDS_RAM),true},<br />
{ConvertResIdToChar(IDS_RAJ),true},<br />
{ConvertResIdToChar(IDS_RAHUL),true},<br />
};
At present the function i have is:
char* CNewDialog::ConvertResIdToChar(UINT uResString)<br />
{<br />
CString strTemp;<br />
strTemp.LoadString(uResString); <br />
char* str = strTemp.GetBuffer(strTemp.GetLength());<br />
<br />
return (str);<br />
}<br />
I am not able to fill the 'NamesTable' with the required strings...
Please help!!
Priya Sundar
|
|
|
|
|
You're returning a pointer to the buffer of a CString on the stack that will go out of scope when the fucntion returns.
|
|
|
|
|
Then how could i modify the function??
Any suggestions??
Priya Sundar
|
|
|
|
|
Change the function return type and the string member of the struct to CString
|
|
|
|