|
Hi Iain,
First of all, thanks for the response. To answer your question.
Iain Clarke wrote: Does the root folder name have a space in it?
Yes, it does have a space in it.
Iain Clarke wrote: Or you could download the source on that article and examine the code with your debugger as it runs.
Yip, then I will do just that, was just looking for a quick fix.
Thanks again.
Regards,
The only programmers that are better C# programmers, are those who look like this -> |
Programm3r
My Blog: ^_^
|
|
|
|
|
How do to add column into control CListCtrl?
supouse send message to Microsoft.
there are all lines uncorrects:
m_pListCtrl->InsertColumn(0, L"Heading 1",LVCFMT_LEFT, 100);
m_pListCtrl->InsertColumn(1, L"Heading 2",LVCFMT_LEFT, 100,-1);
m_pListCtrl->InsertColumn(6, L"Heading 2",LVCFMT_LEFT, 100,-1);
m_pListCtrl->InsertColumn(5, L"Heading 2",LVCFMT_LEFT, 100,-1);
|
|
|
|
|
What happens in your case arent' the columns created. try dragging the items in the header because you use the correct API.
CHIVOTIOV wrote: supouse send message to Microsoft.
CHIVOTIOV wrote: m_pListCtrl->InsertColumn(1, L"Heading 2",LVCFMT_LEFT, 100,-1);
By documentation the item above in bold is the width of the column to -1. May be therefore you are not seeing it
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
In his defense, the -1 is what MFC uses as a signal to go to default values. I had the same thought myself and peeked.
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
Iain Clarke wrote: I had the same thought myself and peeked.
Iain Clarke wrote: In his defense, the -1 is what MFC uses as a signal to go to default values
Sir, I don't have MSDN installed and net access to MSDN is prohibited to us . Also the solution was posted in URGENCY
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
So, you can play^h^h^h^hhelp on codeproject, but can't access MSDN?
Someone deserves a metaphorical kicking.
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
_AnsHUMAN_ wrote: Sir, I don't have MSDN installed and net access to MSDN is prohibited to us Laugh
You can be all over at CP, but no MSDN access? Well, that is utter nonsense. Either this is a joke or you work for some kind of morons.
_AnsHUMAN_ wrote: Also the solution was posted in URGENCY
I think that you should not be posting solutions in urgency, especially with no access to MSDN.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rajesh R Subramanian wrote: I think that you should not be posting solutions in urgency
Unless the question was URGNT PLZZZ
|
|
|
|
|
I can make a few incorrect lines too - but what didn't work with them?
Maybe you can't add column 6 without having added columns 1,2,3,4 and 5...
When I struggle with something new to me in MFC, I go back to fundamentals - HWND's and messages...
Here is a page from the REAL documentation - the Platform SDK.
Adding List-View Columns
Columns are used when a list-view control is in report view to display the items and subitems. The following example adds columns to a list-view control. The column headings are defined in the application's header file as string resources, which are numbered consecutively starting with IDS_FIRSTCOLUMN. The number of columns is defined in the header file as C_COLUMNS.
// InitListViewColumns - adds columns to a list-view control.
// Returns TRUE if successful, or FALSE otherwise.
// hWndListView - handle to the list-view control.
BOOL InitListViewColumns(HWND hWndListView)
{
char szText[256]; // temporary buffer
LVCOLUMN lvc;
int iCol;
// Initialize the LVCOLUMN structure.
// The mask specifies that the format, width, text, and subitem
// members of the structure are valid.
lvc.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;
// Add the columns.
for (iCol = 0; iCol < C_COLUMNS; iCol++)
{
lvc.iSubItem = iCol;
lvc.pszText = szText;
lvc.cx = 100; // width of column in pixels
if ( iCol < 2 )
{
lvc.fmt = LVCFMT_LEFT; // left-aligned column
}
else
{
lvc.fmt = LVCFMT_RIGHT; // right-aligned column
}
LoadString(hInst, IDS_FIRSTCOLUMN + iCol,
szText, sizeof(szText));
if (ListView_InsertColumn(hWndListView, iCol, &lvc) == -1)
return FALSE;
}
return TRUE;
}
You can adapt this for your purposes if you wish - I certainly wouldn't stay with the code as is, but it might start you on the right road.
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
hey,
I am trying to divide the property sheet into parts. It will be a dialog based application. The first half will have only one dialog box and the second half will have tab structure.
Please help me out.
|
|
|
|
|
I'm a bit confused what you're trying to do.
If the property sheet is not in wizard mode, then you will have two tabs - one for each dialog.
There's nothing stopping an individual page / dialog from having tabs on it. Just go ahead and write it just like a normal dialog box.
So, I'm not sure how to answer other than: "Go ahead and write it! Good luck!"
If you can expand on your question, I may be able to help more. Have you tried writing this yet? Did you have any trouble?
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
Hi All,
Problem:-
Using MFC,Dialog Based applications.
I have created one class which is derived from CDialog. In that iam doing some customizations such as drawings and all. And i have overrided PostNCDestroy() in the class. In that function, i am destroying the this ptr such that more than one thread can make use of it. I have created one testapp to run this class. In the dlg class iam newing the object(local) of the class and calling its functions. My problem is after closing the maindialog One heap assertion coming stating not a valid heapptr like that.. What will be the reason?? please give me some solutions..
Regards,
Spk 521
|
|
|
|
|
Essentially, it is not safe to do things with MFc from more than one thread. The mapping from real windows things (like window handles) to MFC thingies (like CWnd's) "live" in the main thread.
I am going from your sentence:
S p k 521 wrote: In that function, i am destroying the this ptr such that more than one thread can make use of it
In my big fat app, I use MFC in the main thread, and occasional use of things like m_pSomeWnd->PostMessage (wm_blah) to talk back from threads.
So I suspect the multithreaded dialogs are shooting you in the foot, and you're getting lovely race conditions.
I don't know what to recommend other than redesign of you app. Or maybe going pure Win32 old school if you must have dialogs running in different threads...
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
S p k 521 wrote: And i have overrided PostNCDestroy() in the class. In that function, i am destroying the this ptr...
Is this a modeless dialog?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Yes it is a modeless dialog.
|
|
|
|
|
I hav 2implement distributed mutual exclusion in c....can any1 help me to implement this algo in c...or any other programming language...
|
|
|
|
|
Please reformat your post, SMS style is not encouraged here.
A good idea would be reading this [^], before posting.
BTW What have you done, so far? Have you, at least, choosen one algorithm [^]?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hello guys,
I've got a problem with a MFC project on Visual Studio 2008.
Whenever I want to Compile it, it Rebuilds. Whenever I clean, it Rebuilds. When I want to Launch Debug after having compiled, it Rebuilds and then starts debugging.
In other words, it seems that the project never gets updated.
Is there some setting that I can change to avoid this stupid behaviour, or is it a bug?
If you need more info, please ask me, I can even submit the .vcproj.
Thanks a lot
E.R.
|
|
|
|
|
Check the file dates and times of your source/include files. There's probably one or more file dates that are set in the future.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Hi,
I looked for files with a date in the future, but I couldn't find them.
Now I moved the project to sourcesafe 2005 and when I made "get latest version" the files result created today ( in the past, anyway ).
So now I think that's not the problem...
any other ideas?
Thanks
E.
|
|
|
|
|
Hi.
When I encountered the problem, it has always been due to corrupt file dates.
If that's not the case, I would recommend that you run the Make-command manually, usually there are a debug/verbose switch that you can use to find out the reason for your eternal rebuilds.
Good luck.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Solved!
Me stupid! My clock was one month behind... wrong date.
Thanks a lot.
|
|
|
|
|
That was a new cause of the problem (for me)!
But of course, it can give the same results.
I'm glad to be able to assist you.
Have a Happy easter, in case you celebrate it. Else, have a nice spring.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Hi all
How to get the total time of a wav file.
Please help me
|
|
|
|
|
Perhaps looking through the WAV format[^] would be of help, or maybe a quick search[^].
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|