473,231 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

Adding a DilaogBox?

I tried to add DialogBox to my WindowsForms application; i get
following compilation error.

"fatal error C1189: #error : Building MFC application with /MD[d] (CRT
dll version) requires MFC shared dll version. Please #define _AFXDLL or
do not use /MD[d]"
Here is the code snippet...

================================================== ================
#pragma once
#include <afxwin.h>
///////// TestDlg.h
#pragma once
// TestDlg dialog
class TestDlg : public CDialog

TestDlg(CWnd* pParent = NULL); // standard constructor
virtual ~TestDlg();

// Dialog Data
enum { IDD = IDD_DIALOG1 };

virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support

#include "stdafx.h"
#include "TestDlg.h"

TestDlg::TestDlg(CWnd* pParent /*=NULL*/)
: CDialog(TestDlg::IDD, pParent)


void TestDlg::DoDataExchange(CDataExchange* pDX)
================================================== =============

I tried moving #include <afxwin.h> to TestDlg.h and it did not help.
Please let me know how ro achieve this.
It's bit dissapoonting that .Net does not have its own Dialog object.


Feb 8 '06 #1
2 2224
> "fatal error C1189: #error : Building MFC application with /MD[d] (CRT
dll version) requires MFC shared dll version. Please #define _AFXDLL or
do not use /MD[d]" If you decide to add MFC to a project,
you also need to make sure the project configuration (preprocessor macros,
MFC library etc.) are compatible with a real MFC project.
It's bit dissapoonting that .Net does not have its own Dialog object.

A form is a Dialog. Why don't you just add another Form to your .NET
project? I see no reason why you should add an MFC dialog in a windows forms
simply add a new form in the designer.
is there a specific reason you want to use MFC?


Kind regards,
Remove only "_nos_pam"
Feb 8 '06 #2
I was looking for FORM under resource conext menu.
Now I found it under project context menu.
It worked.

Thanks for your advise

Feb 8 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Jamie Fryatt | last post by:
Hi everyone, here's what id like to do. I have a table with 2 fields, name and value I need to be able to add multiple records quickly, for example I need to add name value abc 1...
by: sp0 | last post by:
Is there a reason why to make mix numbers improper when adding? It seems when subtracting and adding, adding a subtracting the whole numbers and fraction parts should be sufficient? what'ch think
by: hzgt9b | last post by:
When adding my VB .NET solution (with two sub-projects) the folder structure in VSS gets an extra level of folders... For example, here's the structure of the solution on my C:\...
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
by: Robin Thomas | last post by:
I am fairly new to ASP.NET so I think I am missing something fundamental. Anyway, quite often I am pulling data from a database, but then I need to use that data to produce more data. A simple...
by: Sileesh | last post by:
Hi I have html table and a Button in an Aspx page. I am adding one row with some textboxes to Html table each time i click on the Button thru Javascript. Now problem is when when i try to...
by: seanmayhew | last post by:
I have a form page that that while editing saves the data to an xml doc before submitting to db. On each page unload it saves the xmldoc as the user can add multiple items to the company like...
by: vb | last post by:
Hi, I am new to .Net. I am using a Combo Box in my windows forms. I am adding the items by creating the instances and adding the same to the list. My questions/doubts are: 1. If I have 25 to...
by: Kadett | last post by:
Hi all, I have following problem: I'm creating a ListView (Details) control at run-time and filling it with some records (let's say 10 000). This operation seems to be quite fast, but when I call...
by: AndyL69 | last post by:
Hello I've got a very strange Problem. When im adding a new ACE entry to a UNC Direcotry the inherented ACL's will be lost. When I'm adding a new ACE to a directory / file in this UNC path the...
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.