|
You can use SHAddToRecentDocs for instance. Here[^] is some code.
|
|
|
|
|
THanks, althuogh from looking at it, it seems like it will suffer from the same problem I am having with IShellLink... namely, it doesn't look like it will work very well when creating shortcuts on a different machine.
I will investigate, though. Thanks for the info.
You can pick your friends, and you can pick your nose, but you can't pick your friend's nose.
|
|
|
|
|
I am writing an application to grab images from a still camera (probably USB) using Visual C++ 6.0.
Most of M$ references are to .NET and windwos XP (I use Win2k).
Any suggestions ?
Thanks.
Elaine
The tigress is here
|
|
|
|
|
time to learn about TWAIN
-c
When history comes, it always takes you by surprise.
|
|
|
|
|
But I thought never the TWAIN shall meet
Sorry and thanks for the tip
Elaine (apologetic fluffy tigress)
The tigress is here
|
|
|
|
|
|
From my Visual C++ Dialog program I need to execute a Quickwin console program, and make it close automatically (under Windows NT).
The problem is, that when the program finishes it displays a messagebox with "Program Terminated, Exit Windows?" with YES/NO buttons.
Is it possible to get this window to close without the user having to press the Yes button?
I've used 'CreateProcess' to run the progam, so that I get the process handle, and was then going to
WaitForSingleObject(process, INFINITE);
CloseHandle(process);
The problem is that whatever I try, I always get the MessageBox - I never get past the 'CreateProcess' to be able to delete the window.
Cheers
Mike
|
|
|
|
|
It sounds like your Quickwin program is doing something weird. Have you tried ShellExecute() ?
--
It's not unusual to be picked up by a klingon woman
It's not unusual to have fun with a klingon
When I see you kicking me around
It's not unusual to see me cry, I wanna die
|
|
|
|
|
Hi guys
Does anyone know how to translate this Matlab code into C++?
function a = fit_ellipse(x,y)<br />
d = [x.*x x.*y y.*y x y ones(size(x))];<br />
s = d'*d;<br />
c(6,6) = 0; c(1,3) = 2; c(2,2) = -1; c(3,1) = 2;<br />
[gevec, geval] = eig(s,c);<br />
[negr, negc] = find(geval < 0 & ~isinf(geval));<br />
a = gevec(:,negc);
i've done up until line 4 but i got stuck on solving the eigenvalue. Can somebody help me please? Thank you so much
|
|
|
|
|
See Robert's matrix c++ public domain code
http://www.robertnz.net/nm10.htm
You might also want to get a copy of "Numerical Recipies in C++" It has a really excellent discussion of various algorithms including eigenvalues/vectors.
-Marty
|
|
|
|
|
Can anyone please tell me how to use _Worksheet::PrintOut() method to print excel file.
I tried to set the printArea and print the excel file out as follow;
<br />
_Worksheet sheet;<br />
COleVariant covTrue((short)TRUE),covFalse((short)FALSE),covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);<br />
<br />
PageSetup pg = sheet.GetPageSetup();<br />
pg.SetPrintArea("$A$!:$H$25;$A$45:$H$60;$J$80:$Z$100");<br />
sheet.PrintOut(covOptional, covOptional, covOptional, covOptional, covOptional, covOptional, covOptional, covOptional);<br />
the nothing got printed..
Am I using PrintOut in wrong way??
Thank You
|
|
|
|
|
Try using the sheet.GetPageSetup() function.
It will give you the Page Setup object and you can use SetPrintArea() from there. I also had trouble getting SetPrintArea() to work from the sheet itself.
Hope this helps...
***********************
Tony Fontenot
Recreational Solutions
tony@recsolutions.com
***********************
|
|
|
|
|
How can I overwrite the drawing function of the Windows shell to customize the appearance of the desktop and its icons? I guess i should use system-wide hook but i don't know how...
|
|
|
|
|
I wondering what a class is and how you use it and what it does. Thanks
|
|
|
|
|
do you know how to declare the variables types?
for example.. int a; int is a class object or name ( in simple way to say it). You can create your own variable types like int . Your own types could be anything, blablabla, hehehe, employee, newYork, etc
<br />
class newYork<br />
{<br />
};<br />
<br />
Is that what you want to know??
|
|
|
|
|
hi
please read one c++ book atleast and then ask the questions..
CodeTheDreams();
|
|
|
|
|
|
|
It is a custom datataype in C++.
|
|
|
|
|
A class is the declaration of an object.
Let's imagine a button; a button have a color, a text, sometimes an image, and a function that gets signaled when the user clicks it...
A button is an object.
The declaration of a button would be (in easy terms) :
class CButton
{
COLORREF color;
CString csText;
CBtimap bmpImage;
void Onclick();
}
OK, now you have that class declarated, and now it's the time to use it in your code.
In your code you can instantiate (once you have your class declared you can define it everywhere where it is known).
Each time you need to use the class (the button in this case) you'll be declaring objects of that class (instantiating them) in this way:
in the Header file of your XXX dialog you could write:
...
private:
CButton m_mybutton;
...
and in your dialog initdialog function:
...
m_mybutton.color = 12344;
m_mybutton.text = "hello"
...
...
ow it's time to read a book of cpp and to learn how it really works, but this should be a good starting point...
Hope this helps.
|
|
|
|
|
I'm trying to mimick the 'arrange icons by...' as seen in explorer in my CListView based app.
I've looked up the method to implement this on msdn and have implemented my sort routine. So far so good...
The problem I have is that in mY sort function (compare function) I always receive the first record (0) of my listview to compare.
Some code snippits to explain:
void CMylistView::OnViewBydescr() <br />
{<br />
<br />
CListCtrl* m_cListCtrl;<br />
m_cListCtrl=&GetListCtrl();<br />
m_cListCtrl->SortItems(SortFunction, (LPARAM)(m_cListCtrl));<br />
}
int CALLBACK CMylistView::SortFunction(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)<br />
{<br />
CListCtrl* pListCtrl = (CListCtrl*) lParamSort;<br />
CString strItem1 = pListCtrl->GetItemText(lParam1, 0);<br />
CString strItem2 = pListCtrl->GetItemText(lParam2, 0);<br />
return strcmp(strItem1, strItem2);<br />
}
|
|
|
|
|
Solved it!
I changed
m_cListCtrl->SortItems(SortFunction, (LPARAM)(m_cListCtrl));
into
ListView_SortItemsEx(GetSafeHwnd(), SortFunction, (LPARAM) this);
But why doesn't the m_cListCtrl->SortItems doesn't work
Wim
|
|
|
|
|
Two problems. First, change
SortItems ( SortFunction, (LPARAM) m_cListCtrl ) to
SortItems ( SortFunction, (LPARAM) &m_cListCtrl )
Second, you are thinking lParam1 and lParam2 are the item indexes, but they are not, they are the lParam data associated with the two items being compared. They are always 0 because you probably don't use those data members.
--Mike--
PROCRASTINATION: Hard work often pays off after time, but laziness always pays off now.
BUY MY SOFTWARE!! (please?) RightClick-Encrypt - file encryption w/Explorer plugins | 1ClickPicGrabber - web page picture grabber for IE
My IntarWeb Homepgae!!!11
|
|
|
|
|
hi!
how can i use a c# (.net) control in mfc? is this possible?
|
|
|
|
|
Okay, I also made another version of my program... Unfortunatly it won't compile and it gives me this wierd error:
LINK : fatal error LNK1104: cannot open file "nafxcwd.lib"
I don't know why... Anyways, Im betting its because the lib file isn't linked again btu hey Ive nver seen it before...
Any help would be appreciated.
orcblood
|
|
|
|