|
... like ShowWindow(SW_HIDE) on the CMainFrame based class.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Hi,
In my application. I have a combobox.
But some items names are too long to be completly displayed.
Is it a way to display the full string, regardless of the CombBox width ?
I mean the drop down window should be greater than the width of the combobox itself.
Thanks,
Stephane
Stephane
www.exotk.org
|
|
|
|
|
Find the width of the longest string in pixels. Add the width of the borders (use GetSystemMetrics(SM_CXEDGE)*2 ) & then use SetDroppedWidth() (MFC) to set the dropdown width.
farewell goodnight last one out turn out the lights Smashing Pumpkins, Tales of a Scorched Earth
|
|
|
|
|
You could probably adapt one of the many Tool Tip classes to do the job.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Hi,
I am currently learning VC++ and MFC. I use Visual Studio 6 Enterprise and Sams: Teach Yourself Visual C++ 6 in 21 Days. I was wondering if it was worth it to save money and buy a standalone VC++.Net. Would I have many things that could be usefull to me, and my big question: Do the looks of the apps that you create with .Net look like Office XP Automatically.
// JS Paquet
cout << "Thank you all" << endl;
|
|
|
|
|
No, to do that you need to get a library like the Xtreme Toolkit ( www,codejock.com ).
The good news is it works with VC6 and is a LOT cheaper than .NET
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 have just installed the .net framework on my PC. I had expected it to add a project type, or controls, or something, but as yet i cannot see what the installation has done other than take up my harddrive space.
Can someone enlighten me please?
==================================================
When Your Mind Wonders...Where Does It Go???
|
|
|
|
|
Is that the free download SDK? That one is commandline only.
/moliate
|
|
|
|
|
Unless me means the runtime libraries...
Simon
"The more I learn, the more I realize I don't know" - Colin Davies
Sonork ID 100.10024
|
|
|
|
|
Framework is just the redistributable.
The SDK has your basic tools.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
It installs all required stuff to build and run .NET code.
You now have command line compilers for MC++., C# and VB. NET
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
Ive gotten this much. Its a dialog app, I dont know if that matters.
void CCursorCreatorDlg::OnFileSave()
{
CFileDialog fileDlg(FALSE, NULL, "Untitled",
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
"Some Files(*.fil)|*.fil||",
NULL );
fileDlg.m_ofn.lpstrDefExt = "cur";
if( fileDlg.DoModal()==IDOK )
{
CString fileName;
fileName = fileDlg.GetPathName();
CFile file( fileName, CFile::modeReadWrite | CFile::modeCreate );
CArchive ar( &file, CArchive::store );
Serialize( ar );
}
}
void CCursorCreatorDlg::OnFileOpen()
{
CFileDialog fileDlg(TRUE, NULL, NULL,
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
"Some Files(*.fil)|*.fil||",
NULL );
if( fileDlg.DoModal()==IDOK )
{
CString fileName;
fileName = fileDlg.GetPathName();
CFile file(fileName, CFile::modeReadWrite | CFile::modeCreate );
CArchive ar( &file, CArchive::load );
Serialize( ar );
}
}
void CCursorCreatorDlg::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
ar << someVariable;
}
else
{
ar >> someVariable;
}
}
I have the DECLARE_SERIAL and IMPLEMENT_SERIAL macros where they should be.
When I save, it seems to work fine. However, when I open, it works until it gets to the serialize function where a messagebox pops up and says "An attempt was made to access an unnamed file past its end." What's that mean and how do I fix it?
-Raffi
The truth about C++
|
|
|
|
|
Rafi,
This error occurs for two reasons:
(1) if you are sacing the file differently than loading it e.g.:
if (ar.IsStoring())
{ // storing code
ar << someVariable;
}
else
{
// loading code, is trying to read a variable that was not saved.
// So obviously you are trying to read past the file and
ar >> someVariable>>anotherVariable;
}
(2) if you are readin/loading a file that was saved by some other program then there is a strong chance that such an error will occurr (again this is related to reason (1)
(3) If you save the data using Serialize(&ar), and load/read the data using ar>> operator then you will again get the mentioned error.
I think your problem is related to category (1). Make sure you are reading exactly the same (and also in the same order) that you wrote.
Normally I simply copy the saving code in the loading block and simply change the << to >>, to avoid any mistake.
-cheers,
kashif manzoor
peace to all
|
|
|
|
|
I am not sure, but in the file open function
void CCursorCreatorDlg::OnFileOpen()
you open the files with the parameters
CFile::modeReadWrite | CFile::modeCreate.
I think, the CFile::modeCreate is wrong in this case, because you want to read the file, and the modeCreate flag resets the file length to 0.
Remove the modeCreate and try again
-Dominik
|
|
|
|
|
|
I need to make a pointer to a constant memory address, but something like this doesn't work:
int *address = &656623;
VC++ Compiler returns:
error C2101: '&' on constant
I know it is possible, but I don't have a clue how to do it... Probably there is a function of some sort that solves this problem, but I couldn't find it.
Thanks in advance
|
|
|
|
|
It'd be something like
int * address=(int *)656623; But you must know very well what you're doing in order to manage such a pointer safely.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Great!
That did the job perfectly. And it's the problem of the user if he changes wrong values...
|
|
|
|
|
How SendMessge for a particular menu click
i.e I want the the menu click on a button click
|
|
|
|
|
|
I'm wondering which class use this control:
http://digilander.iol.it/ilbanca/fuffa/saveasie.jpg
Any help will be appreciated,
Bye.
|
|
|
|
|
It is probably what is normally refered to as the "Outlook shortcut bar"
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
Thanks, this helped me much.
And it's not a so new control as I supposed
|
|
|
|
|
You could create something like that from scratch pretty easily actually. Just a standard formview (coloUred with OnCtlColor() ), with some custom-drawn flat style buttons added at runtime. Somebody has probably already done it though, so take a look around CP and related sites.
Simon
"The more I learn, the more I realize I don't know" - Colin Davies
Sonork ID 100.10024
|
|
|
|
|
Mmm... I'll give a try, thank you for the advice.
|
|
|
|