|
i want to create a setup file for
a MFC project ,
do Visual Studio contain any such
software.
thank u
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Which Visual Studio ? Different versions have come with different solutions. I use Advanced Installer[^], it's a great solution, and the free version will probably do all you need ( although I bought it ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
what's wrong with Install Shield?
He is like a one-legged man in a bum kicking competition. -Novjot Sidhu
--[v]--
|
|
|
|
|
I've done installs with install shield. It's probably more powerful than AdvancedInstaller, but as a result, it takes a lot longer to get the same end result.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
Install shield
it is very powerful!
|
|
|
|
|
Thank you evryone for ur help
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
How can I add a dialog to Cview?
|
|
|
|
|
Create a new dialog class and make it a member variable for modeless, or create it in the scope of the function that calls it for modal dialogs.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
By that I mean embedded a modal dialog inside a SDI view.
|
|
|
|
|
Embedding in what way ? So the modal dialog is part of the CView window ? Or just so that the modal dialog is shown by the view ? If the former, you can't. If the latter, exactly as I said. In your view, create the dialog class, and call DoModal on it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
Use CFormView
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
This is an assignment and we're recommanded not to use CFormView, but somehow to mimic the CFromView ways
|
|
|
|
|
Oh. You said a 'Modal dialog'. Otherwise, I'd have said to use CFormView. CFormView gives you a dialog like view, it does NOT 'add a modal dialog to your CView'.
If you're not allowed to use CFormView, then create your own controls, and embed them into your CView in your view constructor.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
According to assignment specification, It is feasible to add modal dialog to CView, and add controls to this dialog.
|
|
|
|
|
Hmmm - perhaps you can add a dialog, but it can't possible be modal, that's not what modal means.
I'm going to have a play with this.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
OK, if you create a dialog, set it's style to be 'CHILD', and then make it a member variable and do this:
BOOL CVC6CViewView::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
{
BOOL b = CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
dlg.Create(IDD_THEDIALOG, this);
dlg.SetParent(this);
dlg.ShowWindow(SW_SHOW);
return b;
}
Then you end up with the dialog embedded in your view. The Create function is registered as a handler for the Create event, obviously.
It's still not modal. You could make it modal by ignoring the rest of the view until OK is clicked, and responding to OK by closing the dialog, but overall, I'd say that's not what's required, I can't imagine why it would be.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
How can I set the background color when I initial the view ? I want to set it black.
|
|
|
|
|
One way is to handle WM_ERASEBKGNBKD and paint the background there.
John
|
|
|
|
|
I know how to do that in visual c++ NET. But I cant use Filestream bec I am using visual C++ 6.0. I know. I know. it is so old but I have no choice. so how can I convert byte array to image(or binary) that will insert data to sql database.
HBITMAP hBitmap = (HBITMAP) ::LoadImage(AfxGetInstanceHandle(), strPath, IMAGE_BITMAP, 100,140,LR_LOADFROMFILE | LR_CREATEDIBSECTION);
CBitmap mybmp;
mybmp.Attach((HBITMAP)hBitmap);
BITMAP sBM;
mybmp.GetBitmap(&sBM);
//add new pics
BYTE* pbOldBitmapBits = new BYTE[sBM.bmWidthBytes*sBM.bmHeight];
mybmp.GetBitmapBits(sBM.bmWidthBytes*sBM.bmHeight, (LPVOID)pbOldBitmapBits);
m_Picture.SetBitmap((HBITMAP)mybmp);
char c[10];
itoa(sBM.bmWidthBytes,c,10);
CString strTemp = c;
BSTR bstrWidth = strTemp.AllocSysString();
strTemp.Empty();
itoa(sBM.bmHeight,c,10);
strTemp = c;
BSTR bstrHeight = strTemp.AllocSysString();
spIPlasmaConsumables->AddConsumablePictures(m_spIUnkConnection,"TEST1",pbOldBitmapBits,bstrHeight,bstrWidth);//add new image at sql database
pbOldBitmapBits(bytes) convert to image(binary)
Remember I cant use C++ .NET at all
use Visual c++ 6.0 only
|
|
|
|
|
If you're loading from file, load as a DIBSection, then you get a pointer to the bits. You can copy this into SQL Server, if you must, and then use it to recreate the image. I guess you'd also need to store the width, height and bit depth though.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi , i am first time working with VC++,
now i have to write my thesis report, nayone can help me with sending me thesis reports of projects done in VC++.
thanking you
|
|
|
|
|
Just out of curiosity, why would you want to write a thesis whose content uses a tool/language that you have no experience with? This would not seem like a good time to learn a new tool, especially if you have a time constraint.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
sheshidar wrote: sending me thesis reports of projects done in VC++.
HAHAHAHAHAHAHAHAHAHAHHAAHAHAHA !!!
You ARE joking, right ?
Christian Graus - Microsoft MVP - C++
|
|
|
|