|
to write to an usb port....the application should know tye existence of the usb driver....
for that u should have written the inf file for the driver which gives the detailz abt the driver.....ofcourse u can avoid that if u r using the windows builtin drivers.....
check out this link.....
http://www.lvr.com/usb.htm [^]
hope that helpz.....
cherrz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
Hi,
I've got a project where for some reason unicode support is turned on in the code, I've come to this conclusion because it is using the "W" versions of certain functions. I've done a search for #define UNICODE but didn't find in the code. I don't see an option for this in the Visual Studio Preferences either. Is there another way to turn it off?
Thanks
Hua-Ying
|
|
|
|
|
Did you search for both UNICODE and _UNICODE in the .h, .cpp and .dsp files?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Yes I searched for both UNICODE and _UNICODE.
|
|
|
|
|
I found it!!
My project was generated by another program and it set the Preprocessor define UNICODE in the project. So it was in the Project Properites setting under C/C++ > Preprocessor > Preprocessor Definitions. This is the reason it didn't show up when I searched the code for #define UNICODE.
Thanks for the help!!
Hua-ying
|
|
|
|
|
I am trying to display an avi file in Aniomate control.
The frames are not displayed right. Bottom ( aroung 1 cm ) is getting clipped and displayed at top and the right ( about 1 cm )is displayed on the left. Could some one help me with this.
I want to copy the frame and put it on the clipboard. I don't know how to do that.
Appreciate any help. Chunk of code would be great.
Meena
|
|
|
|
|
try editing the dialog view.....(if itz a dialog based application nad if u have derived ur own static control from the CStatic)u get the avi clipped maybe becoz u have got the static frame smaller in diamension.....
dunno if u hacve done the sam eway.....hope thiz helpz.....
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
Hello , i want to count the no. ofwindows opened on my computer , with their names , 4 that i am using EnumWindows and EnumWindowProc ,but i am getting the following error , i had tried my hints but the condition remain same
error C2440: 'type cast' : cannot convert from '' to 'int (__stdcall *)(struct HWND__ *,long)'
what 2 do ??
Thx
Rahul Agarwal
|
|
|
|
|
You EnumWindowsProc function is declared wrong. It has to be either a global function
BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam) or a static class member
static BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
this little piece of code will help you.
BOOL EnumVisibleWindows(CStringArray *arWindowsName,CPtrArray *arhWnd)
{
HWND hWnd,hWnd1=NULL;
CString Str;
char lpString[201];
hWnd=::GetDesktopWindow();
do
{
hWnd1=::FindWindowEx(hWnd,hWnd1,NULL,NULL);
::GetWindowText(hWnd1,lpString,200);
Str.Format(\"%s\",lpString);
//select only visible desktop window
If((::IsWindowVisible(hWnd1)==TRUE)&&(Str!=\"\"))
{
arhWnd->Add((HWND)hWnd1);
arWindowsName->Add(Str);
}
}while(hWnd1!=NULL);
return TRUE;
}
"I Think this Will Help"
[Vote One Here,.....]
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
I've been reseaching Property Sheets for a couple of days now and I'm starting to get the hang of them. I have created a Property Sheet with 5 Property pages; each page contains some controls for displaying and manipulating data.
What I'm wondering is how do I go about adding buttons and a menu to the Property Sheet, not the Property Page? I've read a few things here and other places, but nothing seems to fit (or work) with what I'm working on.
Any help would be appreciated.
|
|
|
|
|
Everything is done in your propertysheet's OnCreate() member function.
For a menu, add a CMenu variable (m_Menu) to your property sheet class. In OnCreate call
m_Menu.LoadMenu(IDR_MENU1);
SetMenu(&m_Menu);
For buttons, add CButton members to your property sheet class. In OnCreate call m_Button.Create(...) for each button.
You can handle the commands from the menu and buttons using regular MFC message mapping.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Thank you. I was expecting some long, drawn-out ordeal. Once again, I was over-thinking the whole process.
|
|
|
|
|
Hi,
I'm new to Win32 programming, and I have to add dialog resource and management in a static lib in order to be used by other application.
I've added dialog resource in lib project and include all ATL stuff inside lib.
Everything compile ok but ATL create dialog function failed with 1812 error, complaining that no resource are present in exe image.
The base application is a classic win32 project without MFC.
What should I check ?
Thanks
Fabrice
|
|
|
|
|
Resources go into Dynamic Link Libraies or executables. They do not go into static link libraries.
|
|
|
|
|
Hi everyone.
I would like to connect to an sql database using MDAC. Can anyone give me a piece of code that shows how to create the connection object and what headers/other file I have to use ?
THANKZ.
|
|
|
|
|
|
Thankz ... I have found there the clues I needed
|
|
|
|
|
How do you open another form when you click on a command button.
I tried looking up the information using the forum search etc but it comes up with no results.
Thank you
|
|
|
|
|
BritishEmpire wrote:
How do you open another form when you click on a command button.
This sounds like VB syntax, or have the terms "form" and "command button" been moved into VC++ .Net also? What exactly is it that you are trying to do?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I am trying to open another dialog when you click on a button. For example when a user clicks on a button called eg Payment I want it to open the dialog called payment.
Thanks
|
|
|
|
|
See here for an example of a modal dialog.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hiho@ll
i'm using the Visual Studio .Net 2003 Setup Wizard Project
to create a Install Shield for my Application
during creation of the setup files i get an error and a warning:
Error: urlmon.dll must be excluded because the source file c:\windows\system32\urlmon.dll is under the windows system file protection.
Warning: iphlpapi.dll must be excluded because the source file c:\windows\system32\iphlpapi.dll is under the windows system file protection.
i'm running WinXP service pack 2 using the Administration account
for MFC71D.DLL it works, but it's also in the windows\system32 directory!
what's the difference between mfc71d.dll and urlmon.dll, iphlpapi.dll
(excuse for my bad english)
thx@ll
|
|
|
|
|
MFC71D.DLL is the Debug version of the MFC runtime. The redist.txt file supplied with VS.NET 2003, which lists the files you're allowed to redistribute, does not list this file. You should build a Release version of your project and include the vc_user_mfc71_rtl_x86_---.msm merge module in your package. If you have not yet built and tested a release version read Surviving the Release Version[^].
urlmon.dll is part of Internet Explorer and must not be redistributed. If you require a particular version of this component you should ask your users to install that version of IE.
iphlpapi.dll is part of Windows and must not be redistributed separately.
Redistributing components that are part of Windows is a major cause of "DLL Hell"[^]. This was precisely why Windows File Protection was added to Windows: to prevent this kind of erroneous redistribution of OS components.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
wow
thx for your reply!
didn't know this
thx
|
|
|
|