|
What do you mean by "Show Desktop from all options." ?
|
|
|
|
|
I mean all options those are use in Window to show desktop.
Like Wnd+D,Show desktop shortcut,Show desktop shortuct in Quick launch,Show desktop option of Taskbar Menu.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: Like Wnd+D,Show desktop shortcut,Show desktop shortuct in Quick launch,Show desktop option of Taskbar Menu.
All these functions are going to call the same function that iterates through every window handle & minimize them right? Just a ShowWindow(MIN) would do that right? What extra functionality do you think a "show desktop" is doing other than minimizing all windows?
|
|
|
|
|
Ok,Please tell me how can i know when any one of this is called.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
|
Please tell me how can i use it in VC++.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
#define MIN_ALL 419
#define MIN_ALL_UNDO 416 //the other option.
void minAll()
{
HWND lHwnd = FindWindow(L"Shell_TrayWnd",NULL);
SendMessage(lHwnd,WM_COMMAND,MIN_ALL,0);
}
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
Please can u explain me this code and tell me where i can use this,and how can know the all windows are minimzed or not in my application.
please help me for this.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
VuNic wrote: #define MIN_ALL 419#define MIN_ALL_UNDO 416 //the other option.void minAll(){HWND lHwnd = FindWindow(L"Shell_TrayWnd",NULL);SendMessage(lHwnd,WM_COMMAND,MIN_ALL,0);}
i have try this code,this use to minimize all windows.
but i want if all windows are minimized than i do sumthing like Show messagebox.
my aim not to minimize all windows,i want to catch the message when all windows are minimized.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
If you watch the messages to the Progman window (using Spy++), you can see that WM_USER+83 is sent during this action. If you could track this, I think you will get what you are seeking.
- ns ami -
|
|
|
|
|
I have no idea of Spy++ can u please explain me with any example or exaplain me step by step how can i use this.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Spy++ is available with Visual Studio Tools. You will get it from "Start Menu\Programs\Microsoft Visual Studio 6.0\Microsoft Visual Studio 6.0 Tools". Using the Spy++ is documented in its Help.
- ns ami -
|
|
|
|
|
You've asked about Spy++ before.
1/ Find it in the IDE's menu.
2/ Run it.
3/ Play with it.
4/ Remember results of the playing.
This is called learning, and is very useful.
More seriously, it is a very useful tool to know, and you should make working with it a priority.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Hi All
How can i filter text file?I have a file Test.txt which have some data like this.
abc
abc
12121
12121
12
12
133
133
133
Now i want to show data on Button click like this
abc
12121
12
133
Plz help me...
|
|
|
|
|
One alternative is to put the read string into a map. Once you do this, go and read the next string from the file. If this string exists in the map ignore it and do not put it in the map and so on. While displaying, display only the elements present in the map.
Hope it helps
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Read line by line into an STL list class and call the unique method.
Call the sort method before unique if the data is not already sorted.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
can you give me example.Plz
|
|
|
|
|
He needs you do his homework... I guess.
- ns ami -
|
|
|
|
|
Hello rdop,
You can use std::set to remove duplicate entries. This link will be useful - link[^].
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
BOOL flag;
flag=FALSE;
CStdioFile file;
CString str,str2;
str=str2=_T("");
file.Open(_T("G:\\Test.txt"),CFile::modeRead |CFile::typeText ,0);
while(file.end)
{
file.ReadString(str);
if(!str.Trim().IsEmpty())
{
if(flag==FALSE)
{
CStdioFile file1;
file1.Open(_T("G:\\final.txt"),CFile::modeCreate|CFile::modeWrite|CFile::typeText ,0);
file1.Seek(0,CFile::end);
file1.WriteString(str);
file1.WriteString(_T("\n"));
file1.Close();
flag=TRUE;
}
if(file_read_write(str)==FALSE)
{
CStdioFile file2;
file2.Open(_T("G:\\final.txt"),CFile::modeWrite|CFile::typeText ,0);
file2.Seek(0,CFile::end);
file2.WriteString(str);
file2.WriteString(_T("\n"));
file2.Close();
}
}
else if(str.Trim().IsEmpty())
{
break;
}
}
file.Close();
ShellExecute(NULL,_T("open"),_T("G:\\final.txt"),NULL,NULL,SW_SHOW);
BOOL file_read_write(CString string);
BOOL Ctest::file_read_write(CString string)
{
BOOL flag=FALSE;
CStdioFile file;
CString str1;
str1=_T("");
file.Open(_T("G:\\final.txt"),CFile::modeRead |CFile::typeText ,0);
while(file.end)
{
file.ReadString(str1);
if(!str1.Trim().IsEmpty())
{
if(_tcscmp(string,str1)==0)
{
flag=TRUE;
break;
}
}
else
{
break;
}
}
file.Close();
if(flag==TRUE)
{
return TRUE;
}
else
{
return FALSE;
}
}
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Hi All,
im working on a dialog based application in vc6.0.
My project consists of 15 files in which i need to convert 4 files
in to a library.
Is it really possible to convert only part of code in to a library, by keeping rest of the code as it is??
Or do i need to remove those 4 files and built them in to a separate work space as
library and add it to the complete project?
If I can do it, please give me the steps to do it.
Regards,
Sunil Kumar
|
|
|
|
|
2 words : design, architecture
given you've told us diddly squat about what your dialog app is doing, its a bit hard - but the answer could be 'yes'
15 files ? it really depends on the functionality - whats in the '4' files that makes them special ?
If its a data processing/reformatting app for example, you may be able to seperate out the number crunching or string reformatting into a library/dll. You could even put your MFC stuff in an MFC Extension ...
But likely you are going to need to do some 'refactoring' so
sunilkumar.d wrote: Or do i need to remove those 4 files and built them in to a separate work space as
library and add it to the complete project?
is also going to have to happen
So, suggestions ...
Isolate your functions ? in 4 files into a seperate project, build a dll
build a test harness for the dll and test it
then IN A COPY of your dialog app, graft in the dll
test test test
next time, think about the design a bit harder ..
thats still going to be a bit of work, but if for example you will want to use those functions again/elsewhere, you've done the hard bits ...
'g'
|
|
|
|
|
Thanks Garth for your valuable suggestions.
Actually I need to hide those files when I am giving the source code to client.
Thats why I need to make them in to library.
Anyway I think i need to redesign my Code for this to happen.
Regards,
Sunil Kumar
|
|
|
|
|
sunilkumar.d wrote: My project consists of 15 files in which i need to convert 4 files
in to a library.
That should be doable. So long as the files are in separate source files, you should be able to put them in a static library that you link into the application (it's not particularly different from just linking in the object files directly).
sunilkumar.d wrote: Or do i need to remove those 4 files and built them in to a separate work space as
library and add it to the complete project?
I'd remove those source files from the original project, add a new static library project to the solution and add the source files to that.
Remember that you'll still need to ship the header files that declare the items defined in the source files.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Visual C++ and Microsoft Excel
I am working on a project at the moment and have an issue with reading MS Excel 97 ~ 2003 spreadsheets.
My problem relates to the Excel field format of any given field in the spreadsheet, if a field is formatted in Excel to anything other than Text, then I cannot read the data from that field. for example if column A1 is formatted in excel to Text (good data returned) if A2 is formated to a number (a null is returned) if A3 is text (good data is returned), and so on.
The problem seems to be getting my code to understand the format of any particular field, Here is a snipped of my code;
1) I am using the CRecordset class to open and read the Excel spreadsheet. The spreadsheet has
defined name ranges and generally all works just fine (Provided the fields are text formatted).
2)If i use this line of code to first attempt to read what type of data is in a NUMBER field
"recset.GetODBCFieldInfo( m_csaColumnNames.GetAt(i), fieldinfo );"
I get a positive response when i try the different data types
"if(fieldinfo.m_nSQLType == SQL_VARCHAR){AfxMessageBox("SQL_VARCHAR");}"
suggesting its a data type SQL_VARCHAR data type
3) If i then call GetFieldValue to get the info from a field with a switch command
CDBVariant variant;
recset.GetFieldValue( m_csaColumnNames.GetAt(i), variant);
switch(variant.m_dwType)
{
case DBVT_SHORT:{ szValue.Format("%d", variant.m_iVal);
break;
}
case DBVT_LONG:{ szValue.Format("%d", variant.m_lVal);
break;
}
case DBVT_SINGLE:{ if ( variant.m_fltVal == 0.0 )
szValue = "Verify";
else
szValue.Format("%.1f", variant.m_fltVal);
break;
}
case DBVT_DOUBLE:{ if ( variant.m_dblVal == 0.0 )
szValue = "Verify";
else
szValue.Format("%.1f", variant.m_dblVal);
break;
}
case DBVT_DATE:{
szValue.Format("%B %d, %Y",variant.m_pdate );
break;
}
case DBVT_STRING:{ szValue = *variant.m_pstring; //szValue = V_BSTRT( &varValue );//convert BSTR to CString
break;
}
case DBVT_BOOL:{ if(variant.m_boolVal)
szValue = "TRUE";
else
szValue = "FALSE";
break;
}
case DBVT_UCHAR:{ szValue = (char*)variant.m_chVal;
break;
}
case DBVT_NULL:{
szValue = "Error Null"; AfxMessageBox(szValue);
break;
}
default:{
szValue = "\0";
break;
}
}//switch
RESULTS
All fields which are text, return a valid value which is exactly as per the Excel Spreadsheet, all fields which contains numbers or I even tried date formats in excel return DBVT_NULL which is totally useless because the cell has a number in it or a date.
SUMMARY
I have tried to read the data using GetODBCFieldInfo only and then calling the m_ member depending on the type returned which i know to be in the field, but that does not give me anything other than an unsigned short with random values that bear no resemblance to what is in the actual field.
Any help that anyone can offer in regards to solving this problem would be much appreciated and I I can get the entire class working properly I have happy to post it here for all to use.
Thanks in advance for any assistance.
|
|
|
|
|