|
Max++ wrote: Where can I find good tutorials on Hardware Programming with Visual C++ or code samples for free. There is a good site in somewhere?
Is sysinternals.com[^] of any use?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Help CRY
|
|
|
|
|
Can you be more specific
whitesky
|
|
|
|
|
WhiteSky wrote: Can you be more specific
He want to Assemble Compute
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Help CRY
|
|
|
|
|
I want to control any device using PC through someport such as serial,parallel,usb.
|
|
|
|
|
|
I am using Visual C++ 6.0 MFC. I have created a small application to automate Excel and create a wookbook. I can ouput to this workbook using a 'Range' data type but the output function is huge (several pages). I would like to break this into several more manageable smaller chunks of code. In order to do this I need to be able to pass the Range data into several functions as an argument of the function call. I can't figure out how to do this and all of the examples I have found on the internet were using Visual Basic. Does anyone know how to proceed? Also, since I may have to pass workbooks and worksheets as arguments, can these be done also?
Buck
|
|
|
|
|
I figured it out. I needed to use the keyword class in the function prototype and function header. i.e. void OutputFunction(class _Worksheet sheet).
buck
|
|
|
|
|
The class keyword shouldn't be required. Also the way you do it creates a copy of the _Wordsheet parameter. Using a reference would be better. i.e.
void OutputFunction(const _Worksheet &sheet)
You may need to remove the const depending on what operationa are performed in the function.
Steve
|
|
|
|
|
|
Hi All,
I've to create an application container that hosts different dialog
based applications. Each dialog based application should be loaded based on certain criteria. Basically combining several independent dialog based applications into one application.
Any insights would be greatly appreciated.
Thanks,
|
|
|
|
|
Why not just host multiple dialog boxs in the same app. What do you gain by creating multiple dialogs applications and duct taping them together in another application?
Anyway, you could use _spawnlp or ShellExecuteEx
|
|
|
|
|
Thanks Bob, I'll take a look at ShellExecuteEx
|
|
|
|
|
Hi all.
I'm very new to Visual C++, so I apologize in advance if I miss any important details.
I'm trying to create a unbound DataGridView object that comes with a (small) predefined number of entries and a few unmodifiable default entries. This I've been able to do just fine.
My problem comes with sorting. I'd like to allow the user to sort the entries that he's added himself when he clicks the column header:
For example, if I have 10 rows, 3 of which are predefined as "1", "apple", and "2".. and the user enters "hi", "a", and "there" into the next few rows, I'd want the following sort results:
1,apple,2,a,hi,there,(empty),...,(empty)
1,apple,2,there,hi,a,(empty),...,(empty)
when sorting in forward and reverse order, respectively.
My first attempt after looking through the MSDN docs was to create a SortCompare Event Handler, but apparently my attempts to hardcode this sort of functionality in with things like
e->SortResult = e->RowIndex1 - e->RowIndex2;
conflicts with the quicksorting algorithm the class uses, and causes all sorts of weird behavior and ArrayOutOfBounds errors.
Have I overlooked anything? What's the best strategy to approach this sort of problem?
Any suggestions are appreciated, just let me know if you need more information.
|
|
|
|
|
Hi guys,
I would appreciate if someone could tell me "How to add selected item from one listbox to another"?
I have 2 list boxes. While I execute my application, I select some items from one and some from another. Now, if one data item is not in another, I want to add that item to the list box.
Thanks in advance
C++Prog
|
|
|
|
|
like this
CString str;
m_ListBox1.GetText(m_ListBox1.GetCurSel(),str);
m_ListBox2.AddString(str);//or InsertString
whitesky
|
|
|
|
|
Thanks for your great help..but I don't know it is giving me errors like:
left of '.GetText' must have class/struct/union type
Thanks again
C++Prog
|
|
|
|
|
Preeti9 wrote: left of '.GetText' must have class/struct/union type
Which is telling you that m_ListBox1 must be a CListBox object.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
|
I've recently converted my VS6 project to 2005 and the problem I'm now getting is that my open/save dialogs aren't opening at all. ie) I have a file import dialog that was working, but is now not being displayed at all. My class is derived from CFileDialog. The section of code this seems to be failing in is:
in dlgfile.cpp
CFileDialog::DoModal()
{
...
INT_PTR nResult;
if (m_bOpenFileDialog) (true)
nResult = ::AfxCtxGetOpenFileName(&m_ofn);
...
}
from this nResult is 0. from there is returns a IDCANCEL due to nResult being 0.
I can step into this call, where it goes to:
OPENFILENAME& CFileDialog::GetOFN()
{
return *m_pOFN;
}
m_pOFN seems to be a valid structure, although most of the data seems to be defaults with some empty pointers.
Anyone have any thoughts on what might cause this to return false/0?
I can't seem to find any documentation on AfxCtxGetOpenFileName ().
Thanks for your help.
|
|
|
|
|
Hi,
How can i distinguish between Excecute Key and + Key while both having the same pMsg->wParam = 0x0000002b.
Any body having an idea pls tel me.
yours faithfully
ajeesh c v
|
|
|
|
|
Ajeesh c v wrote: How can i distinguish between Excecute Key...
What's this?
Ajeesh c v wrote: ...and + Key
Is this the VK_ADD key?
"The largest fire starts but with the smallest spark." - David Crow
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
Ajeesh c v wrote: How can i distinguish between Excecute Key and + Key while both having the same pMsg->wParam = 0x0000002b.
Any body having an idea pls tel me.
What is Execute Key, have you check the value of lParam!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Help CRY
|
|
|
|
|
I am making a custom control that can recieve some datas and verify the datas recieved.
The custom control(suppose it is named CDataVerify) is inherited from Cwnd and it contains three CEdit controls.The design is when the focus leaves the CDataVerify, it(CDataVerify) should verify the values of thethree CEdit control.
Now the problem comes, when the focus leaves the CDataVerify control,how can the CDataVerify control know the focus lose and should verify the datas?
(At first I think the onKillFocus() event maybe resolve the problem. But it can not, for the CDataVerify control never got the focus. When typing something to the contained CEdit control, the focus just belongs to the CEdit control, not the CDataVerify.)
Is there any way to let the CDataVerify control verify datas when the focus leaves?
//////////////////////////////
-- modified at 21:27 Thursday 25th May, 2006
|
|
|
|
|
willbin wrote: (At first I think the onKillFocus() event maybe resolve the problem. But it can not, for the CDataVerify control never got the focus.
But did the edit controls themselves receive the WM_KILLFOCUS message?
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
Thank you.
of course, yes. The edit controls recieve the WM_KILLFOCUS message. But the edit control recieved the WM_KILLFOCUS message only can deal with the data itself held. It do not know the value of its siblings. The Parent knows, but the parent has't the focus(Can not recieve the WM_KILLFOCUS message when the focus leaves.)
//////////////////////////////
A stranger , also a challenger
|
|
|
|