|
Add it to visual studio or in your application?
If adding to your application, it should be the same as it was in VC6 - A property sheet is a
Windows control, not a Visual Studio feature.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I want to change client area size of CFromView project in real time.
Anybody know how to do this?
Thanks
|
|
|
|
|
Client Area will change if you resize the window. you can do using SetWindowPos or MoveWindow
|
|
|
|
|
็SetWindowPos() need CWnd object of this dialog.
Please give me some idea for get this object.
|
|
|
|
|
AfxGetMainWnd()->SetWindowPos(&CWnd::wndTop, myX, myY, myWidth, myHeight, SWP_SHOWWINDOW);
--
=====
Arman
|
|
|
|
|
At what point do you want this change to occur? You can use SetWindowPos() or MoveWindow() to do the sizing.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
In fact, my problem is that I create this project on 800*600 screen resolution.
when I run this project(maximize) on this resolution it will work properly, but if I run it on 1024*768 screen resolution the client area will shrink.
How can I spread it always full screen on any screen resolution?
|
|
|
|
|
Max++ wrote: How can I spread it always full screen on any screen resolution?
How about ShowWindow(SW_SHOWMAXIMIZED) in the InitInstance() method?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Some more detail would be helpful. Perhaps the others have helped of if not perhaps the WM_NCCALCSIZE is what you're after.
Steve
|
|
|
|
|
Hi
I have to change the font of captions of mainframe window,property pages and
simple dialog boxes.I am working on a SDI application.
Please suggest me the way to do it and if possible give me the snippets of code if available.
Thanks and Regards
Neeraj Sinha
|
|
|
|
|
|
Hi again.
I came with my app to the point where I need to stage an image for CD record! But error occure once again.
I'm obviously doing something wrong in my code. Here it is:
...<br />
IStorage* pStorage = NULL;<br />
IStream* pStream;<br />
int i=0;<br />
StgCreateDocfile( NULL, STGM_DIRECT|STGM_CREATE|STGM_READWRITE|STGM_SHARE_EXCLUSIVE, NULL, &pStorage);<br />
<br />
CFile files[32];<br />
<br />
POSITION pos = filenames.GetHeadPosition(); <br />
while(pos != NULL)<br />
{<br />
CString strFilePath=filenames.GetNext(pos);<br />
<br />
int nSize = 0;<br />
CFileException e;<br />
<br />
if (filesIdea.Open(strFilePath,CFile::modeRead|CFile::typeBinary,&e))<br />
{<br />
LPWSTR lpszW = new WCHAR[255];<br />
LPTSTR lpStr = strFilePath.GetBuffer( strFilePath.GetLength() );<br />
int nLen = MultiByteToWideChar(CP_ACP, 0,lpStr, -1, NULL, NULL);<br />
int code = MultiByteToWideChar(CP_ACP, 0, strFilePath, -1, pszW,nLen);<br />
if(!code)<br />
{<br />
CString tmp = _T("'MultiByteToWideChar' returns NULL!");<br />
DWORD err = GetLastError();<br />
DisplayErrorString(tmp,err);<br />
if (lpszW)<br />
delete [] lpszW;<br />
filesIdea.Close();<br />
pDiscMaster->ClearFormatContent();<br />
return FALSE;<br />
}<br />
<br />
HRESULT res;<br />
if( (res = pStorage->CreateStream( lpszW, STGM_DIRECT|STGM_CREATE|STGM_READWRITE|STGM_SHARE_EXCLUSIVE|STGM_FAILIFTHERE, 0, 0, &pStream) ) != S_OK )<br />
{!!!HERE IT'S CRACKS SAYING "Invalid value for pwcsName." (lpszW???)<br />
ShowHRError(res);<br />
if (lpszW)<br />
delete [] lpszW;<br />
filesIdea.Close();<br />
pDiscMaster->ClearFormatContent();<br />
return FALSE;<br />
}<br />
nSize = files[i].GetLength();<br />
BYTE *pBuffer = new BYTE[nSize];<br />
if (files[i].Read(pBuffer,nSize) > 0)<br />
{<br />
pStream->Write(pBuffer,nSize,NULL);<br />
pStream->Release();<br />
}<br />
files[i].Close(); <br />
delete[] pBuffer;<br />
}<br />
<br />
...
I'm trying to find code example which works?? Or someone who can tell me where I did wrong??Why can't I create stream, what is wrong with lpszW
THX to all
|
|
|
|
|
How to uncheck all items in CListCtrl?
i have a button = m_button
CListCtrl = m_list
when i push the button i whant to uncheck all items in m_list !
How?
-- modified at 7:16 Tuesday 29th May, 2007
Bravoone
|
|
|
|
|
for (int i = 0; i < m_List.GetItemCount(); i++)
{
SetCheck(i, FALSE);
}
|
|
|
|
|
Hans Dietrich wrote: for (int i = 0; i < m_List.GetItemCount(); i++){ SetCheck(i, FALSE);}
did you mean:
for (int i = 0; i < m_List.GetItemCount(); i++)
{
m_List.SetCheck(i, FALSE);
}
didn't you?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
The code that Hans showed could have been placed in a CListCtrl -derived class.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Mirror climbing?
(in a derived class, you don't use m_List.GetItemCount() )
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hi all
In VC++ 6.0 How can make run time Combo Box
In which data come from MySQL Table.
I am writing code for it in OnInItDialog() function
but It can not work proper
Please any one told how can i make it
Regard's
Kaushik
|
|
|
|
|
Y_Kaushik wrote: How can make run time Combo Box
as follows
CComboBox* pCpmbo = new CComboBox;
pCpmbo->Create( WS_CHILD|WS_VISIBLE|CBS_DROPDOWN, CRect(0,0,100,100 ),this, 0 );
nave
|
|
|
|
|
But
How we will showing the value in it from database(MySQL)
Regard's
Kaushik
|
|
|
|
|
Connect to the database, read the strings from it and then use CComboBox::AddString to add the strings in the combo box.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I think you need to MFC and MySQL[^] (MFC classes to fill ComoBoxes & ListBoxes with MySQL data.)
|
|
|
|
|
call AddString() function to add data.
nave
|
|
|
|
|
Do you have problem with create ComboBox or Read table?
|
|
|
|
|
Its Become hard for me to showing data in Combobox
Regard's
Kaushik
|
|
|
|