Det er lib-filen for den statisk-linkbare version af MFC. Du kan prøve at linke dynamisk i stedet, det er noget lign.: Project->Settings, General, vælg "Using MFC in a shared DLL"
Synes godt om
Slettet bruger
18. marts 2004 - 11:21#5
Jeg kan desværre ikke se hvilken version det er så det er nok EE
Når jeg gør som du foreskriver får jeg nu istedet følgende fejl.:
BOOL CNamePltDlg::OnInitDialog() { // Set Paremeter m_strName.LoadString(IDS_NAME_STRING); m_strPosition.LoadString(IDS_POSITION_STRING);
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon
// Set Combobox m_cbTemplate.SetCurSel(0);
return TRUE; // return TRUE unless you set the focus to a control }
// If you add a minimize button to your dialog, you will need the code below // to draw the icon. For MFC applications using the document/view model, // this is automatically done for you by the framework.
void CNamePltDlg::OnPaint() { if (IsIconic()) { CPaintDC dc(this); // device context for painting
// Center icon in client rectangle int cxIcon = GetSystemMetrics(SM_CXICON); int cyIcon = GetSystemMetrics(SM_CYICON); CRect rect; GetClientRect(&rect); int x = (rect.Width() - cxIcon + 1) / 2; int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon dc.DrawIcon(x, y, m_hIcon); } else { CDialog::OnPaint(); } }
// The system calls this to obtain the cursor to display while the user drags // the minimized window. HCURSOR CNamePltDlg::OnQueryDragIcon() { return (HCURSOR) m_hIcon; }
"unresolved external symbol _main" betyder at der forventes en main funktion og at det dermed skulle være et console projekt! Det er det jo ikke... (Har du ikke haft den fejl før?)
Synes godt om
Slettet bruger
19. marts 2004 - 09:03#23
Hmm det kan være at de c++ filer som følger med KUN er til funktionerne også at man selv skal lave sit program, som så anvender de funktioner som ligger i disse filer!!
Kan man bare include c++ filer som man gør det med .h filer?
Jeg har ikke VC++ 6 installeret, så jeg kan ikke se præcis hvordan det skal gøres, jeg mener dog du kan skifte fra console til windows i Projekt->Settings, fanebladet ?Link?. Der hvor der står subsystem:console, skal der stå subsystem:windows
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.