|
I use a bitmap for a background on my login dialogs.
I just draw it on the dialog window in response to WM_ERASEBKGND.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Thanks,I overlooked the docs."
|
|
|
|
|
Did you use of WM_ERASEBKGND for show images and also if you search on the codeproject you can find articles about your problem.
|
|
|
|
|
hi sir,
i have mp3,avi and picture files . i have to show that files into my application like preview so..
i designed one dialog based application. after that i added the media player component into my dialog box. and created one object for that component.then how can i run that component .. means what the functions to run the media player .how to pass the file to media player component.
Regards,
Srinivas
|
|
|
|
|
vasu_sri wrote: i have mp3,avi and picture files . i have to show that files into my application like preview so..
Your requirement can be met by using Windows Media Player component for playing audio/video files. Follow the below steps:
Create a dialog box application.
Select Project->Add to Project->Components and Controls.
Select Registered ActiveX Controls folder
Select Windows Media Player component
When you select, a confirm classes dialog box appears. Click "OK"
Go to your dialog resource. Windows Media Player icon would be displayed on the controls selection view.
drag drop the control onto your dlg box. Add a member variable for the control in the class wizard.
Use 'SetURL' and GetControls() methods of the media player object for controlling the audio/video files (like play, pause, stop etc.)
E.g
m_MPlayer.SetUrl("D:\\Songs\\Xyz.mp3");
m_MPlayer.GetControls().play();
FYI: I am using Windows Media Player Ver 11
Hope this helps!
Thammadi
|
|
|
|
|
it showing GetControlContainer() and GetControlSite()
like this
iam not getting proper functions ...
i want these like Play , Pause and stop functions
how can i get these functions...
Regards,
Srinivas
|
|
|
|
|
I created a test application and I am using GetControls() method, which returns an object of class CWMPControls. This class has all the control methods like play, pause, stop etc.
As I said earlier I am using WMP ver 11. I am not sure if the above class is defined for earlier versions of the WMP control.
Try to upgrade your WMP to 11 and check it out. If it doesn't work out.. I'll share my test source code then..
Thammadi
|
|
|
|
|
i made an application with database mysql
now i use following code to fetch data
GetDlgItemText(IDC_USER,user);
dt="SELECT id from login WHERE user= \'" + user + "\' ";
but problem is that when i use debugger the dt shows empty string
please solve this how can i get data in dt variable
thanks
hi
|
|
|
|
|
Do you have the valid id associated with your user ?
Regards,
Paresh.
|
|
|
|
|
Check the data type of dt.
Manish Rastogi
|
|
|
|
|
thanks sir
the data type is CString of dt
hi
|
|
|
|
|
paras_s12 wrote: but problem is that when i use debugger the dt shows empty string
At what point are you looking at dt ? If it's before the assignment, it will indeed be empty.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
when
ShowWindow(SW_SHOWMAXIMIZED);
the TaskBar can not covered.
How to cover it?
|
|
|
|
|
Right-click on the taskbar and choose properties.
Clear the "on top of other windows" box
Or maybe use auto-hide.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
|
hanlei0000000009 wrote: when
ShowWindow(SW_SHOWMAXIMIZED);
the TaskBar can not covered.
How to cover it?
You can try this[^] MSDN sample.
|
|
|
|
|
I wish that worked across multiple monitors (for visual Studio)
Mark Salsbery
Microsoft MVP - Visual C++
"Thanks,I overlooked the docs."
|
|
|
|
|
Hi all, would anyone happen to know the equivalent of comparing a string declared variable or character? Sort of like strstr or strcmp, i just cant find which one is used for C-like string. Thanx in advance!
|
|
|
|
|
To compare what kind of strings (sorry, I'm not following )?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
<br />
string somecode;<br />
strstr and strcmp does not work for string unless its declared as a char
I dont know what to search for because i've already tried Google and nothing came up that refers to what im looking for.
|
|
|
|
|
Stuff like this?
strcmp(str.c_str(), str2.c_str());
wcscmp(str.c_str(), str2.c_str());
operator== ( <string> )[^]
basic_string::compare[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
You may try the following
CString s1, s2;
if ( s1.GetLength() != s2.GetLengtth() )
// Not equal
else
{
for( int i = 0; i < s1.GetLength(); i++ )
{
if ( (Byte) s1.GetAt(i) != (BYTE) s2.GetAt(i) )
break;
}
if ( i != s1.GetLength() )
// String Not equal.
else
// String equal.
}
Hope this will help u, if ur string length is small.
Regards,
Ram
|
|
|
|
|
Why do people continue to recommend using CString methods when the OP is using a string object? It just doesn't make sense.
Furthermore, why would you not just use CString 's Compare() , CompareNoCase() , or == operator ?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Try using CString::Compare.
CString s1( "abc" );
CString s2( "abd" );
ASSERT( s1.Compare( s2 ) == -1 );
ASSERT( s1.Compare( "abe" ) == -1 );
Regards,
Paresh.
|
|
|
|
|
"string" class has overloaded "==" operator. You can directly use the == operator.
Eg:
string s1("hi");
string s2("hello");
if (s1==s2)
{
....
}
else
{
....
}
|
|
|
|
|
Hi All,
Does anybody out there know of any functionality that returns the maximum size of the recycle bin?, or is there any functionality to scale the size of the recycle bin?. Im aware of SHQueryRecycleBin, which will get me the current size information but what im after is finding out whether a file will fit into the recycle bin. In order to delete the file im using SHFileOperation but im not using and UI attached to it, nor do i want to as i would like to handle any messages by my own system.
Regards
|
|
|
|