473,472 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

OnInitDialog!?

Hi there,
I need the equivalent MFC's OnInitDialog in C#, so that I can handle any
initialization procedure there, and if something goes wrong, I could dismiss
the dialog (by returning false, or the like).

Any help would be highly appreciated,

Cheers
--
Mehdi Mousavi - Software Architect [ http://mehdi.biz ]
Nov 15 '05 #1
1 4890
In the Load event (or in the Form constructor), throw a homemade exception
(to distinguish it from system exception) in case of initializtion problem?

"Mehdi Mousavi" <me***********@msn.com> ¦b¶l¥ó
news:ej**************@TK2MSFTNGP12.phx.gbl ¤¤¼¶¼g...
Hi there,
I need the equivalent MFC's OnInitDialog in C#, so that I can handle any
initialization procedure there, and if something goes wrong, I could dismiss the dialog (by returning false, or the like).

Any help would be highly appreciated,

Cheers
--
Mehdi Mousavi - Software Architect [ http://mehdi.biz ]

Nov 15 '05 #2

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

Similar topics

11
by: Christian Wilcox | last post by:
Does anyone know of any existing Python implementations of an XForms viewer? Christian
1
by: matt | last post by:
I use the following code in OnInitDialog for a secondary window opened in the main window by hitting DoModal(): P_Icons = IDI_BACK; HICON hIcon1 = (HICON)...
18
by: Ben Hanson | last post by:
I have created an open source Notepad program for Windows in C++ that allows search and replace using regular expressions (and a few other extras). It is located at...
4
by: marco.nl | last post by:
it fails to retrieve newly intruduced data by the user. i tried this ... AfxGetApp()->WriteProfileString("Settings", "email", EDIT1); UpdateData(FALSE); and this.....
1
by: H.B. | last post by:
Hi, What is the function (event) equivalent to VC6 OnInitDialog() for VC7? Hugo
2
by: hex | last post by:
I put function OnInitDialog in child dialog wich made by class CSecond: BOOL CSecond::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here m_ed.SetFocus();...
4
by: =?Utf-8?B?am9zZXJhbW9uYnJhdm8=?= | last post by:
I use a CDialog with several controls and I want to set the focus in one of them , a CEdit, when an instance is created. The trouble is that I can get a pointer to the CEdit window, say p, but if I...
3
by: rag84dec | last post by:
Hi, I am new to this and i am trying to write a code to have a UI (MFC) to insert into database. I created a new project with datadase connected to it. But once i created the project it gave me...
0
by: AngZangGui | last post by:
I am using MFC in Visual Studio 2005. I had added a list control in my dialog and set the view property as "Icon". I declared the ImageList in the OnInitDialog of the dialog where the listview is...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.