|
|
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
|
|
|
|
|
|
I want to have a button with an icon and text. I used Visual Studio to create a dialog based MFC app and added this to OnInitDialog and made the OK button bigger:
// TODO: Add extra initialization here
HICON voipIcon = (HICON)::LoadImage(AfxGetResourceHandle(),
MAKEINTRESOURCE( IDR_MAINFRAME ),
IMAGE_ICON, 48, 48, LR_DEFAULTCOLOR);
::SendMessage(::GetDlgItem(m_hWnd, IDOK), BM_SETIMAGE, IMAGE_ICON, (LPARAM)voipIcon);
The icon and text appear correctly on Vista, but on XP only the text appears. Also, it only appears under Vista if the manifest has a dependency on Common Controls v6.
If I set the BS_ICON style on the button the icon appears with no text. This is expected behavior based on the MS documentation: http://msdn2.microsoft.com/en-us/library/ms673567.aspx.
Any ideas why the icon and text only appears on Vista? Why does it require Common Controls v6?
Thanks,
Ken
|
|
|
|
|
Maybe if you derived CButton you can solve this problem.
|
|
|
|
|
I'm calling some c++ functions stored in a DLL by using the matlab function calllib.
The complete set of functions is correctly loaded (I checked them by using libfunctionview) but matlab produces segmental error when I use doublePtrPtr (declared by using libpointer) as input...
error message refers to this function
void __stdcall transpose(double **x,int n){<br />
for(int i=0; i<n;i++){<br />
for(int j=0; j<i; j++){swap(x[i][j],x[j][i]) <br />
}}}
I have done many examples by using type* or type[] without have any problem..
No example about **type input are supported in the matlab calllib function reference, and this is very strange ... is there someone that can help me ?
|
|
|
|
|
Hello
Is there a way to hide a parent window of a win32 application from the windows taskbar (as in hide the little box with the window name and icon in the taskbar) and also the alt+tab window (as in the window which appears when you press alt+tab)?
Thanks for your help!
--PerspX
"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates
|
|
|
|
|
Add the WS_EX_TOOLWINDOW extended style to your top-level window.
|
|
|
|
|
Thanks, Mike
Although I would like a window without a caption or border.. Is there any way to do it like that?
Thanks for your help!
--PerspX
"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates
|
|
|
|
|
Just remove the corresponding styles - WS_CAPTION and WS_BORDER
|
|
|
|
|
Thanks again :p
You mean with SetWindowLong()? How do you remove multiple styles?
Thanks for your help!
--PerspX
"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates
|
|
|
|
|
Perspx wrote: How do you remove multiple styles?
Bit twiddling. For example, to remove the caption and border, use:
style &= ~(WS_BORDER | WS_CAPTION);
"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
|
|
|
|
|
Thanks for all of your help, guys
--PerspX
"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates
|
|
|
|
|
Do you still have to explicitly remove the WS_EX_APPWINDOW style?
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Perspx wrote: Is there a way to hide a parent window...
How about creating it as a child of a hidden window?
"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
|
|
|
|