|
All,
I am working on a simple application, using the WTL. The only child of the main window is a subclassed CEdit control. I have handled the WM_NCCALCSIZE message in the CEdit control to lock its size to 80 characters by 24 characters.
The problem that I need help with is that that main frame is always the "windows default" size. I would like the client area of the main frame to be the exact size of the child window. I tried to handle WM_NCCALCSIZE in the main frame class, but alas, it is called before WM_NCCALCSIZE and WM_CREATE in the child window.
The effect that I am trying to achieve is simliar to the appearance of the GVim program, if that is of any help.
Thanks!
--
Paul
"I drank... WHAT?"
|
|
|
|
|
Look at the implementation of CScrollView::ResizeParentToFit (at <VisualStudio>\vc\mfc\src\viewscrl.cpp ), maybe you can copy and paste that code to your project to achieve a similar effect.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
If i want to learn how i could do an application in vc++ which will be used in excel; for example my application need to catch data in excel, so for that it has to read into an array of value to catch input parameters for member method. I have heard that if i want to use regular dll i won't be able to use c++ functions. is it true?
And in a last time if i use dlls, must i use "export" method or some method which call the function defined in vc++ from vba?
so i would like to know if i could find help and samples in books or if someone could show me how to do?
thanks in advance for your answers
gerald
|
|
|
|
|
CUJ had an article about a year ago on doing this through COM, you essentially create a COM object which manipulates an Excel table. I can't remember the details, but it's probably online at www.cuj.com
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
|
i don't want to automate excel i would like to use excel as you could use it with vb for application in the sense that from a cell you could call the function you need which have been initially implemented in vc++.
So do you think that i could information and samples for my application?
thanks
gerald
|
|
|
|
|
You can call a DOS program using the VBA Shell statement in sync or async.
An application can be called using the VBA AppActivate statement.
So you can implement your automation functions in VC++ apps.
Hope it helps...
Atul
Sonork ID : 100.13714
|
|
|
|
|
If anyone know where i can find some guides or tutorials
about ucing vc6.0++ (windows messages,tree controls DAO,..);
plese ,contact me.
nikola
|
|
|
|
|
This question is puzzling. The Code Project is just what answers your question.
Just type http://www.codeproject.com/index.asp into your IE 6 address bar and wait for it to load. That's all.
Regards
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
As Nish said, The Code Project is a fantastic resource.
You can also try the MSDN Library: http://msdn.microsoft.com.
Jon Sagara
What about ?
Sonork ID: 100.9999 jonsagara
|
|
|
|
|
What steps would be required to convert a class
CSortListCtrl to a CSortListView...?
I've already done:
1) CSortListView : public CListView
2) Changed all occurances of CSortListCtrl to CSortListView
3) Add GetListCtrl()
3) Add IMPLEMENT_DYNAMIC/DELCARE_DYNAMIC..?
Am i missing anything...?
Thanx
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I know there's an article on MSDN about doing this. It involves some undocumented stuff in CControlView (the base class of CTreeView, CListView, etc.). It should be easy to find on the MSDN site.
--Mike--
"Everyone has figured out what 'service pack' really means, so they had to go and change the language. Perhaps this is what Bill was talking about in the 'security is top priority' letter."
-- Daniel Ferguson, 1/31/2002
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
I started realizing it was gonna be more work that i was willing to put effort into at the moment, so I just through the control into formview.
Hopefully this works
Thanx!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hi,
I have set a DNS name to my computer which is different from my computer name.APIs like GetHostName, GetHostByName only give the DNS names.Is there anyway of programmatically finding out my computer name?
Thank You.
Yamuna.E.
|
|
|
|
|
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/sysinfo_08f9.asp">GetComputerName</a>
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
|
Hi,
Pls help..I got the DSN names by using SQLDataSources().
How is it possible to connect to a particular DSN .
|
|
|
|
|
SQLConnect()
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
also:
SQLDriverConnect
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
Hi,
Pls help..I got the DSN names by using SQLDataSources().
|
|
|
|
|
my program runs almost fine, when i compile there are no errors.
but if i wrie one special line of code, the whole program crashes
if you want to tell me how to fix it
i will send you the code or whatever you want me to do, but i cannot post it here.
Thank you.
|
|
|
|
|
What does the program do? And what is the special line which causes a crash? What is the error it shows when it crashes?
Atul
<marquee bgcolor="yellow" direction="LEFT" behavior="SCROLL" scrolldelay="250" scrollamount="5">
Sonork ID : 100.13714
|
|
|
|
|
position = tempInvestors->binarySearch(tempInvestors->getInvestorsList(),0,9,tempSS);
*tempInvestor = tempInvestors->getInvestor(position);
tempAB = tempInvestor->getAccountBalance(); //AccountBalance Of Buyer
// Here i'm performing another binary search to look for the
// specific stock that has that same stockTicker
position = tempStocks->binarySearch(tempStocks->getMyStocks() , 0, 14, tempST);
*tempStock = tempStocks->getStock(position);//THIS LINE IS THE ERRONEOUS ONE
tempIV = tempStock->getInitialValue(); // storing the stockprice in tempStockPrice
//ok I have the same piece of code in another method and i copied just the way it is, but it works fine without if you comment ou that line only in the second method??
it never crashes if i keep it in the first method only.
Thanks
|
|
|
|
|
position = tempInvestors->binarySearch(tempInvestors->getInvestorsList(),0,9,tempSS);
*tempInvestor = tempInvestors->getInvestor(position);
tempAB = tempInvestor->getAccountBalance();
position = tempStocks->binarySearch(tempStocks->getMyStocks() , 0, 14, tempST);
*tempStock = tempStocks->getStock(position);
tempIV = tempStock->getInitialValue();
Do you mean that the above code when pasted into another member function causes the crash? What is the error message?
Atul
Sonork ID : 100.13714
|
|
|
|
|
can i send you the code?
i mean to your email!
|
|
|
|