|
This is probably because the files were in Visual Source Safe or something like that...
WREY wrote:
Is there a way I can uncheck ALL the files at once (from their "Read Only" status), rather than uncheck them one by one?
Yup, in explorer select all the files (Ctrl+A) and get the properties (Alt+Enter), then uncheck the Read only box
WREY wrote:
Is there some way I can get ClassView to show the class layout of the files too?
Yup, removing the read only attribute should do this.
Hope this helps...
Dylan Kenneally
London, UK
|
|
|
|
|
Hi
I'm tying to make a program with lot's of line drawing. I've use
CClientDC dc(this);
CView::OnPrepareDC(&dc);
in my functions to draw those lines (I put metafile in the OnDraw()function). Somehow I was running out of resources when I execute the program. Is it because I've declared too many CDC object? Can somebody tell me what might be wrong here? Should I put all those line drawing in the OnDraw() function instead?
Newbies
|
|
|
|
|
Zayax wrote:
Should I put all those line drawing in the OnDraw() function instead?
Newbies
Yes. Do you use CreateSolidBrush or CreatePen or something alike? If you do, check up that you release all GDI objects (pen, brush, etc.) after painting.
|
|
|
|
|
What if i jush use a simple constructor like
CPen BluePen( PS_SOLID, 0, COLOR_BLUE) what should i do?
Newbies
|
|
|
|
|
select it into a DC, grab the pen returned when you do so, and make sure you put the old pen back into the DC before deleting it.
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
Hi I started five processes from a console program. Now i want to monitor these processes and show how many of them are still running every second. So how do i know the state of these processes? Here are my code:
[code]
while (WaitForMultipleObjects(5, proHandle, TRUE, 1000) == WAIT_TIMEOUT);
{
for(i = 0; i <5; i++)
{
if(proHandle[i] ==0)
runningProcess--;
}
printf(" %d ", runningProcess);
}
[/code]
|
|
|
|
|
Have a look at GetExitCodeProcess .
|
|
|
|
|
But it doesn't seem to work!! Does the following piece of code look alright ? Thanks
while (WaitForMultipleObjects(5, proHandle, TRUE, 1000) == WAIT_TIMEOUT);
{
for(i = 0; i <5; i++)
{
if(!GetExitCodeProcess(proHandle[i], &status[i]))
cerr << "GetExitCodeProccess Fail" << endl;
if(status[i] != STILL_ACTIVE )
runningProcess--;
}
printf(" %d ", runningProcess);
}
|
|
|
|
|
tcuong wrote:
Does the following piece of code look alright ?
No. You have a spurious semicolon after the while condition.
|
|
|
|
|
After running the SQL query, we got rewsults the ADO recordset object. How can we retrieve the total number of records present in recordset object.
|
|
|
|
|
By searching the forums maybe? This was answered just a couple of days ago...
Anyway, the record count (rs.Count) usually isn't valid until EOF has been seen,
count reports the current number of seen records.
|
|
|
|
|
If you are using static or keyset cursor then the recordset count
you get from the property 'RecordCount" is valid
else you need to go from record to record manually
and then use the property.
|
|
|
|
|
Does anyone know how to detect if a service is running ?
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
|
Hi,
I have developed a dialog based application in VC there I want to provide standard Font Control & color control...Is it possible?
Please help me.
Thanks in advance
Prateeti
|
|
|
|
|
Check your MSDN collection:
CFontDialog
CColorDialog
Have fun.
|
|
|
|
|
;m_hWnd is other application listview's handle
;I want to simulate mouse double click on the item
;But it don't work,why?
;I doubt that the parent's handle is not correct,
;But I try all its parent,it don't work too,someone can tell me why?
memset((void*)&view,0,sizeof(NMLISTVIEW));
HWND hParent=::GetParent(m_hWnd);
view.iItem=0;
view.iSubItem=0;
view.hdr.code=NM_DBLCLK;
view.hdr.hwndFrom=m_hWnd;
view.hdr.idFrom=::GetDlgCtrlID(m_hWnd);
int code;
code=::SendMessage(hParent,WM_NOTIFY,view.hdr.idFrom,(LPARAM )&view);
Hi
|
|
|
|
|
The NMLISTVIEW struct is in your process space, the other app can't see it. Use one of the APIs designed for this purpose, mouse_event or SendInput.
--Mike--
Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
I have a list box which I would like to include a CEdit control to alow easy editing of fields.
So far I have embeded(composition) a CEdit control in the CListBox class and have created it in PreSubclassWindow and made it invisible. When you double click on the item the CEdit becomes visible...and when you click else where its hidden... Easy...
However I need to capture WM_SETFOCUS && WM_KILLFOCUS && WM_KEYDOWN (Return key) of the CEdit control inorder to know when to copy the contents from the CEdit control to the list item currently indexed.
I have tried:
OnCommand
WndProc
OnParentNotify
I'm doing something wrong or this is not how this is accomplished...I thought I could subclass the CEdit control with a custom WndProc, but this would require a static or global function and I won't be able to call the GetText/SetText functions of my listbox...(It's actually a custom control i've designed from scratch, not a windows LISTBOX).
Anyways...how would I go abouts acommplishing what I want...???
Thanx
Cheers
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Use CListCtrl not CListBox, CListCtrl supports in place-editing: LVM_EDITLABEL style
VOTD: " Yet it was the Lord 's will to crush him and cause him to suffer, and though the Lord makes his life a guilt offering, he will see his offspring and prolong his days, and the will of the Lord will prosper in his hand. 11 After the suffering of his soul, he will see the light of life and be satisfied ; by his knowledge my righteous servant will justify many, and he will bear their iniquities." - Isa 53:10-11 (NIV)
|
|
|
|
|
Hello I have a problem, I created two dialogs and i want the second to appear whenever in the first a button is clicked, I know is very basic but I have searched for it and I cannot find any good example on it. I pressume is with new and ShowWindow() maybe?
Could anyone please explain?
Thank you for your time
|
|
|
|
|
Try
Declaring an instance of the window
CDialogToOpen dlgDialogToOpen;
And then show the window
dlgDialogToOpen.DoModal();
In the buttons OnBnClicked Event
|
|
|
|
|
can someone tell me what functions I should write to implement drag and drop between 2 listboxes.
thanks
|
|
|
|
|
|
When ruuning my exe, i am getting a 'syntax error in my SQL statemnt'.
Here is the code form where the error is coming??
void CMgen1View::LoadListbox()
{
CMgen1Doc* pDoc = GetDocument();
CListBox* pLB = (CListBox*) GetDlgItem(IDC_LIST1);
CMgen1Set sect(&pDoc->m_database);
sect.m_strFilter = "InstructorID = '366'";
sect.Open(NULL,
_T( "Select * from Section WHERE sect.m_strFilter" ));
pLB->ResetContent();
while(!sect.IsEOF()) {
CString str;
str.Format(_T("%d %d"),sect.m_CourseID , sect.m_SectionNo);
pLB->AddString(str);
}
}
|
|
|
|