|
Hi,
sorry for my stupid question, but how can i
"use that class on your list control" ?
i have a created a new Class with modified OnSetCursor(), and then... ?
Marco
|
|
|
|
|
Hi,
i will try the "Using the Header Control" Stuff first.
The magic word is "subclassing".
Marco
|
|
|
|
|
Is there an easy way to add a Splash Screen in VC 6
|
|
|
|
|
Project menu | Add to Project | Components and Controls | Visual C++ Components | Splash Screen
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Yes.
Follow this path:
Project->Add to project->Components and controls->wait....->visual C++ components->splash screen.
You will get standard implementation of Splash screen.
|
|
|
|
|
One caveat with the answers given so far - they don't work with dialogue based apps.
Mike Mullikin - People demand freedom of speech as a compensation for the freedom of thought which they seldom use.
Soren Kierkegaard
|
|
|
|
|
Hi!
Can anyone give me some example code that shows how I can use the "NetMessageBufferSend" function?
Thank you!
Dirk
|
|
|
|
|
Hallo,
if i open a file in the menu and the OnOpenDocument() routine is done,
then InitialUpdateFrame() is called from inside the MFC. Then my
(maximized) App shrinks to normal size and is moving to the upper left
corner of the screen.
I would like that the App is stay in its size and position.
What make i wrong ?
Marco
|
|
|
|
|
|
|
BOOL CMyDlg::PreTranslateMessage(MSG* pMsg)
{
if ((pMsg->message == WM_KEYDOWN))
{
if (pMsg->wParam == VK_RETURN)
{
return TRUE;
}
}
return CDialog::PreTranslateMessage(pMsg);
}
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Hi,
I'm new to STL, and got into some problem with it.
I need to use multimap, where "Key" is of type "long" while the "Data type"
is a "structure", which contains 3 items, including the "Key".
And later on will add insert/remove/... items from the map depending upon
the value of "Key" and a comaprision function.
I'm not able to do so, while inserting an item into map using "pair" it is
giving error: -
pair<int,struct mytest="">::pair<int,struct mytest="">' : none of the 2 overloads
can convert parameter 2 from type 'const int'
The syntax I'm using is something like this: -
typedef struct mytest{
int size;
int index;
int value;
};
...
multimap <int, mytest="">mymap;
mymap.insert(pair<int, mytest=""> (200, (200, 13, 868)));
...
Any help on this will be greatlly appreciated.
Thanks in advance!!
regards,
|
|
|
|
|
You need to create an instance of the struct and pass it in, what you are trying to do cannot work. What if you had three classes that all took three numbers in the constructor - how is C++ to know which one you want ? I dunno if mymap[200] = mymytest; will work for a multimap, but it's much neater for maps, that's for sure.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
Thanks a lot Christian for help!!
I'll do it straight away.
thanks once again!!!
regards,
|
|
|
|
|
Hi !
I'm working on a Visual Studio .NET addin written in C++. At the momment, the addin creates a new solution, adds a blank project to this solution, and adds folders to this project.
The problem is that when I try to add some files in one of the project folders, they are always added at the root of the project, and not in the specified folder.
Does anyone had the same problem ?
Is there a way to bypass it ?
Thanks a lot,
Jean-Paul
|
|
|
|
|
|
Thanks for your help, I can see that this forum is really useless...
|
|
|
|
|
I have :
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CMDIFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
cs.cy = ::GetSystemMetrics(SM_CYSCREEN) / 3; //600;//
cs.cx =::GetSystemMetrics(SM_CXSCREEN) / 3; // 800;//
This worked fine, till I changed the following (I wanted the CFormView to fit my dialog resource:
void CTrain1View::OnInitialUpdate()
{
//CFormView::OnInitialUpdate();
// ResizeParentToFit();
CFormView::OnInitialUpdate();
if( TRUE )
{
// 2 - Resize parent frame to fit our Form View
GetParentFrame()->RecalcLayout();
ResizeParentToFit( FALSE );
ResizeParentToFit( TRUE );
}
Now the app comes up full screen!!!
I need to have the form fitting behavior but also want to control the size of my app through PreCReate. Please help!
|
|
|
|
|
I have SwitchView routine presently written as a member of the CMAInFrame class. I need to access this function from a view class. I cannot figure out how to call this function from CMYView:
I tried AfxGetWnd()->SwitchView but thats not right.
If theres no way to get to the function (I dont believe that!), then I'd like to modify it so that it becomes a member of the view class. This step woud really be very instructive for me, since I'm new and just now getting a feel for all these classes in the doc/view architecture.
Here is the function:
BOOL CMainFrame::SwitchView(CMultiDocTemplate *pTemplate, CRuntimeClass *pViewClass)
{
CMDIChildWnd* pChild = (CMDIChildWnd*) MDIGetActive();
if ( pChild == NULL ) return FALSE;
CDocument* pDoc = pChild->GetActiveDocument();
if ( pDoc == NULL ) return FALSE;
CView* pView;
POSITION pos;
pos = pDoc->GetFirstViewPosition();
while( pos != NULL )
{
pView = pDoc->GetNextView( pos );
if( pView->IsKindOf( pViewClass ) )
{
pView->GetParentFrame()->ActivateFrame();
return TRUE;
}
}
pChild = (CMDIChildWnd*) pTemplate->CreateNewFrame(pDoc, NULL ); //error here ERROR: Dialog with IDD 0x0082 must have the child style.
if( pChild == NULL ) return FALSE;
pChild->MDIActivate();
pTemplate->InitialUpdateFrame( pChild, pDoc);
return TRUE;
}
|
|
|
|
|
((CMainFrame*)AfxGetMainWnd())->SwitchView(...);
|
|
|
|
|
Thanks very much. Works like a charm!
|
|
|
|
|
Is somebody can help me and tell me how to modify caption in a property page.
|
|
|
|
|
|
|
You are welcome, I hope you have seen my lovely article about property sheet with status bar, toolbar, menu and tool tips
|
|
|
|