Click here to Skip to main content
15,888,579 members
Everything / Dialog

Dialog

dialog

Great Reads

by Michael Chourdakis
C++, Direct2D, one function and you got a nice picker
by veen_rp
A small JavaScript module to create a modal dialog box or user input box in the familiar .NET style
by Howard 9448490
Windows Forms Print Dialog for rich text with accurate page preview and zooming
by Andy Point
Android Alert Dialog Tutorial : Working with Time Picker, Date Picker and List Dialogs In this tutorial we will discuss how to use dialogs and alerts in Android Apps. A Dialog is a small popup shown to the user to get some additional information from the user or ask him to make some decision. Alert

Latest Articles

by Member 16179004
Capture Enter key in edit control with no dialog box and no subclass.
by ToughDev
Retro68 GCC-based SDK for 68K Mac
by Roger65
How to type text into a static control, change the font used and then save it into a bitmap
by Evoluteur
A web color picker which looks like the one in Microsoft Office 2010

All Articles

Sort by Title

Dialog 

9 Dec 2010 by Member 4523525
I am trying to use the .NET OpenFileDialog to select upto 1100 files at one time (this is a requirement!).When a certain sequence of files are selected (approximately 150-200 files) and the OK button is hit, the application crashes with a "Too many files selected. Please select fewer files"...
8 Dec 2010 by User 7429338
A good alternative could be to put all file names in a text file, and then accept that text file as your program's input.
8 Dec 2010 by ARopo
I found this thread, it suggests using the windows API GetOpenFileName, which you can change the size of unlike the .NET version.http://www.dotnet247.com/247reference/msgs/17/86277.aspx[^]
9 Dec 2010 by Prerak Patel
You should allow user to pick the directory. Then you list all the files and let them select as many files, there will not be any problem.I am talking the same way as ftp clients are designed.http://screenshots.en.softonic.com/en/scrn/40000/40069/3_fireftp1.jpg[^]
18 Dec 2012 by marcel zol
How to save mixed 16 colors? When i re-open the color dialog i have to repeat selections.
18 Dec 2012 by Jibesh
use the same Instance second time. do not create new instance each time you display the color dialog.If you want to clear the selection, call the selection method of ColorDialog.
22 Apr 2011 by DannyStaten
My code hasn't changed in any significant way, but for some reason my save file dialog now flickers open, then closes and the show dialog result returned is false. It was working flawlessly for some time, but now it is doing this. Has anyone else seen something like this?internal string...
22 Apr 2011 by DannyStaten
Ok I figured out what is happening. The button that executes the show modal actions is inside a wpf popup control. I modified the popup to StaysOpen="false". So the popup hides the moment it loses focus (when the modal shows up) and thus the context that called the modal is killed so it just...
22 Apr 2011 by Sergey Alexandrovich Kryukov
A side note: Don't write return "", use string.Empty (or null if you wish). Avoid immediate constants (such as "") in all cases.—SA
2 Jun 2020 by Michael Chourdakis
C++, Direct2D, one function and you got a nice picker
26 Jul 2013 by huangwwei
Hello, i have a problem in SDI. I use the DialogBar to dock in the left side of view. There have some edit frame int dialogbar and contribute an class which named CLeftDlgBar. But when i refresh data and call SetDlgItemInt or GetDlgItemInt in CLeftDlgBar, there will pop up an error. Thereafter,...
26 Feb 2016 by Luis Oliveira 1966
How to perform CRUD operations (Entity Framework) in dialogues (jQuery UI) and process validation in my MVC application ?My problem is related to jQuery, specifically on how to show the dialog then treat the responses/data validations from the Controller.I have this code in...
23 Mar 2001 by Wolfram Steinke
An entry level tutorial on using one of the Windows Common Controls in a dialog.
18 Jun 2016 by Patrik Mlekuž
Image Control for viewing most common image formats with advanced features included (Import Image, Preview, Resize, Position, Pan, Zoom, Export Image, Extract Resource Icon).
28 Mar 2013 by unniyadan
I am trying to achive a ause functionality in javascript. I am making an asynchronous AJAX call and trying to achive synhronous functionality of AJAX. I want to pause the javascript until i receive the AJAX response for the asyn call of AJAX. Due to some reason i am not using the AJAX...
3 Mar 2014 by Joezer BH
Avoiding a cumbersome message box or input box that locks the application in WPF.
28 Mar 2017 by Shenwei Liu
Update for the modal dialog which is compatible with Angular 1.5x and TypeScript
13 Aug 2020 by Howard 9448490
Windows Forms Print Dialog for rich text with accurate page preview and zooming
13 Jun 2013 by Deepali Dhingra
This tip explains how to create a to do or Shopping List app with listview, sqlite, dialog and customadapter
18 Jul 2016 by Andy Point
Android Alert Dialog Tutorial : Working with Time Picker, Date Picker and List Dialogs In this tutorial we will discuss how to use dialogs and alerts in Android Apps. A Dialog is a small popup shown to the user to get some additional information from the user or ask him to make some decision. Alert
13 Jun 2021 by OriginalGriff
This is not a good question - we cannot work out from that little what you are trying to do. Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with. And there are so very many...
28 Sep 2010 by NaveenSoftwares
HP - Exstream(Commonly known as Dialogue)is a new tool developed by HP and is widely used by many MNC IT companies. There are no articles for this tool in almost in entire WWW.But there are many enquiries and doubts which are asked related to this tool in every company. Further new joiners...
28 Sep 2010 by OriginalGriff
This isn't really a Q&A question - if you write an article on the subject (and there is no good reason why you shouldn't if you know enough about it) then just submit it via the menu "Articles...Post and Article" and see if it gets approved.
29 Sep 2010 by Sandeep Mewara
Post the same here: CP Article writing Forum[^].Moderators keep a continous watch over there - uyou would get back exact needed reply very soon. :thumbsup:
10 Jul 2011 by Paul Marshal
Hi,Currently im in a project where we are using Exstream tool.Im new to this tool.In my project i have to import RTF(Rich Text Format) file by the method RTF Pass Through.In this im not able to view all pages of RTF in the output(both in exstream view and in PDF). Instead im getting only...
29 May 2015 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
This blog will take you through the steps to create an ASP.NET Repeater and show the details of a particular row on jQuery Dialog popup.
30 Sep 2015 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
This blog will take you through the steps to call a simple WebMethod to get the details of one record shown on a Repeater and show the retrieved details on jQuery Dialog popup.
8 Jun 2010 by Itsuki Kuo
I want to know, how to put a border on a window (such as Kaspersky Sandbox) have? Does anyone know how to get this effect?I can draw and show window in XP. But Vista and Win7 have the Aero effect.So, how can I show the same effects when I use Windows 7?Thank you very much.
10 Jun 2010 by alij_juma
Hello,Try setting your form border style to none and use a container that has a border you can manipulate e.g. panel. Dock the container to fill the window 'borderless' window.Add your controls including a close, min and max button and code them appropriately.You should have your...
29 Aug 2012 by SamHawksworth
I want to clean up the look of my dialog bar by having borderless buttons in my freeware app (www.noteliner.org). I'm using VC 2005. I tried ModifyStyle( 0, TBSTYLE_FLAT ) within the dialogbar OnCreate, and to remove the WS_BORDER style from the buttons but nothing seems to change.In VC2005...
30 Aug 2012 by JJMatthews
I am doing the exact same thing right now, I created a flat button class that draws png images (to make it look like a toolbar). I hooked up the buttons to the CmdUI handler and noticed some occasional strange behavior with the disabled state. I can post the button class here for you or email...
30 Aug 2012 by SamHawksworth
Hi, sounds like there is no easy solution. Perhaps this is something that can only be acheived using styles in later versions of Visual Studio. Thanks for the input. Sam
24 Aug 2011 by Shashidhar Kamath
I would like to host A MFC dialog (CDialog based)in a WPF application. Any sample programs on how to do that ?I looked at http://msdn.microsoft.com/en-us/library/aa970061.aspxBut that seems to be for a Win32 style dialog and not for a MFC dialog since there is reference to...
24 Aug 2011 by Sergey Alexandrovich Kryukov
I seriously doubt you can benefit from this. Didn't I already provide you detail explanation of all of the issues? See MFC Dll to be integrated into WPF application[^].Why would you re-post this question three times? It won't help you. Do you think there another truth? OK, you badly want...
24 Aug 2011 by Shashidhar Kamath
I am sorry did not mean to post it many times I was getting page load error after I hit the submit button, did not know It was already submitted. Is there a way to delete multiple posts ?I was trying to implement a sample following the article below, but seems like its not for MFC, I...
23 Aug 2012 by pramod.hegde
StreamReader/W...
31 Mar 2014 by Member 10707030
I have a custom C# application that has a print option to print an image. It uses the WPF and printdialog to show the print dialog and print the image. This works fine from a local machine. If I deploy this application in citrix, it does not show the users local printers. Other standard...
28 Mar 2014 by Dave Kreskowiak
There is no different code as far as I've ever heard of.I have run into a problem in Citrix environments where the client had to have a goofy printer setup in order for them to show up in the Citrix environment. That was about 8 years ago and I can't remember what it was I had to do to get...
12 Mar 2020 by Member 14771221
Hello, I'm working on a project. And I have a listbox in Form1 and a listbox in Form2. What I have already done is that I have a button that adds values from numericUpDown to listbox in Form1 (values from 1 to 999999). What I need help with is...
12 Mar 2020 by phil.o
You could give Form2 a constructor accepting an enumeration of integers as parameter, which you would use to populate the second listbox: public Form2() { InitializeComponent(); } public Form2(IEnumerable values) : this() { ...
12 Mar 2020 by Maciej Los
In addition to @phil.o solution, i'd suggest to read these very interesting tips/articles: Transferring information between two forms, Part 1: Parent to Child[^] Transferring information between two forms, Part 2: Child to Parent[^] Transferring...
31 May 2011 by All Time Programming
Hi, I have a form. In that I got to show a dialog (on some circumstances) with Text and a Cancel button. I want to catch the event of that button in my form Or know if that cancel button was clicked. How can this be done ? I believe this should be possible but can't make out how...
31 May 2011 by Kim Togo
You can set AcceptButton[^] and CancelButton[^] property the button in your Form that handles the default Enter and ESC action.AcceptButton and CancelButton property makes sense when used with Form.ShowDialog().Remember that just setting the AcceptButton/CancelButton is not enough. This...
18 Sep 2018 by JimB_
public void SaveToFile() { SaveFileDialog saveToFileDialog = new SaveFileDialog() { Filter = "Comma Separated Values (*.csv)|*.csv| Text File (*.txt)|*.txt ", FilterIndex = 0, RestoreDirectory = true }; if (saveToFileDialog.ShowDialog() ==...
18 Sep 2018 by OriginalGriff
The first thing to note is that your indentation is wrong - which if you are using Visual Studio probably means that your code doesn't compile. If it does, use CTRL+K, D to format the document properly so you can see what is going on: private void MainForm_FormClosing(object sender,...
28 Aug 2014 by amitbora_27
Hi,Is there any way to show dialog as tooltip on button control..I have created one button and want to show modal dialog as tooltip when I hover on button. Dialog has some fields to input data.Can you tell me how can I achieve this in C++ , using windows API?
11 Jun 2015 by bhawin parkeria
#include #include "resource.h"const char g_szClassName[] = "myWindowClass";// defining dialog box IDD_ABOUT DIALOG DISCARDABLE 0, 0, 239, 66 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "My About Box" FONT 8, "MS Sans Serif" ...
11 Jun 2015 by Stefan_Lang
The entire code block under //defining dialog box looks very odd: IDD_ABOUT DIALOG DISCARDABLE 0, 0, 239, 66 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "My About Box" FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "&OK",IDOK,174,18,50,14 ...
11 Jun 2015 by Richard Deeming
This thread on StackOverflow seems to have the answer:http://stackoverflow.com/a/19174721/124386[^]Create an include file called resource.h and add this line to it:#define IDD_ABOUT 100Then include it at the top of your .cpp and .rc files:#include "resource.h" // add this...
11 Jun 2015 by KarstenK
My first guess is that the IDD_ABOUT isnt defined in the resource.h with some number.The complete dialog template stuff belongs in a rc-file. It can be opened in a Resource View Window in Visual Studio. It may complain about other bugs.
4 Apr 2014 by AlwaysLearningNewStuff
I have a dialog box with a bitmap as background.I am trying to create transparent treeview so I need to grab the underlying bitmap from treeview's WM_PAINT handler, but I do not know how to do this.I assume that I will need ScreenToClient and ClientToScreen APIs, but I do not know how to...
4 Apr 2014 by KarstenK
you must transform with the right HWNDHWND hParent = GetParent(hwnd);ClientToScreen( hwnd, &ptTreeUL );ClientToScreen( hwnd, &ptTreeLR );//dont write such code ;-)ReleaseDC( GetParent(hwnd), pDC );tip: create the bitmap globally once to improve performance
12 Nov 2014 by AlwaysLearningNewStuff
I am trying to insert dialog boxes, as separate pages, into tab control.I have created the dialog boxes successfully in resource editor, with all necessary styles.Since my application uses visual styles, I ran into problem with transparency of the dialog's child controls ( radio button,...
12 Nov 2014 by barneyman
from some distant memory of this, try doing the adjustRect and child movewindow AFTER the insertion ... the tab control changes size ISTRBTW, you'll have to do an adjustRect, movewindow for all children after each insert (or once after a block insert), because the tabControl header resizes...
19 Mar 2014 by C3D1
Hey out there,i'm using a CCommonDlg based FileOpen Dlg.I wan't to do some stuff with the CListCtrl (for example selecting an item) after the Dialog has been created.So i add my additional functionality into my OnInitDone() function which i called this way from the OnNotify:BOOL...
19 Mar 2014 by Jochen Arndt
Google is your friend. I found this discussion: https://groups.google.com/forum/#!topic/comp.os.ms-windows.programmer.win32/r3-_zzD-ElY[^]Cite:Quote:Note that there is no listview control in the template; instead, there's alistbox control (lst1). That's a placeholder control to tell the...
15 May 2010 by vivek.chauhan2009
Hi all, I want WM_CTLCOLOR message send to dialog window with help of SendMessage. Please help me out, which parameter should I use with SendMessage(hWnd,WM_CTLCOLOR,----,----); I am just trying to change background color in window.ThanksVivek chauhan
1 Jun 2010 by Radhakrishnan G.
Is there any possibility of changing the parent of a modal dialog?I created a dialog from an application by calling DoModal() from a posted user message, But unexpectedly the parent of that dialog is not the main window of that application. Parent window is another application's...
1 Jun 2010 by Anthony Mushrow
I suppose you could use this:SetParent[^]It should do exactly what you want.
1 Mar 2012 by Shashwat Mehta
If I want my dialog box in some new shape like triangle or circle or any arbitrary shape ( except square and rectangle) then is it possible or not? If yes then please send me whole code and if no then why no?And if above question's solution is not possible in MFC then is it possible in any...
1 Mar 2012 by Chandrakantt
Yes you can make irregular dialog box with different skins.have a look at below linkhttp://www.codeguru.com/cpp/w-d/dislog/bitmapsimages/article.php/c4977[^]
1 Mar 2012 by Richard MacCutchan
The short answer is "No", as the standard for a dialog box is set in the Windows class used to create it. However, you could possibly use a standard Window of your own design and modify its shape by Window Skinning[^] to achieve what you want.
1 Mar 2012 by jk chan
you can use the SetWindowRgn API function for that.. (Also look layered windows for translucent backgrounds. may be interesting for you.)jkchanhttp://cgmath.blogspot.com
10 Aug 2012 by Dirk Bahle
This article samples a MVVM conform implementation of startup and shutdown sequences for an application and its dialogs.
5 Jul 2011 by DrBones69
I have read until my head started spinning. I can not figure out how COleDateTime works with dialogs. I can add the current date and time to my dialog, but I want to know how to manipulate the date/time (get the current date/time and set it to another date/time and then display it). How do I...
5 Jul 2011 by Christian Graus
I don't think this is the only or even necessarily the best way to encapsulate a date, but it's really straightforward from what I see.http://msdn.microsoft.com/en-US/library/by5d3kb1(v=VS.80).aspx[^]GetCurrentTime gets the current time. SetDateTime sets it. Operator +, -, +=, -=,...
6 Jul 2011 by DrBones69
I created a variable m_oleMyDate of type COleDateTime in my ...View.h file and then initialized it to (COleDateTime::GetCurrentTime()) in my View .cpp file.Next, I created three variables of type int (nYear, nMonth, nDay) and then set the variables with the current month day and year as...
2 Oct 2020 by Evoluteur
A web color picker which looks like the one in Microsoft Office 2010
11 May 2011 by novice51
I read the CprintDialogEX Class in http://msdn.microsoft.com/en-us/library/3f1ccd1t(v=vs.71).aspxI followed what it just said..I create a class(CPrinterDlg) and derive CPrintDialogEx. On another Class where CPrinterDlg is included I write thisCPrinterDlg l_PrintDlg(PD_PAGENUMS | PD_ALLPAGES...
11 May 2011 by Joan M
Take a look here... I'm sure that this article[^] from Roger Allen[^] will help you to achieve what you want.HTH & Good luck... :thumbsup:
30 Nov 2012 by Member 9646630
Create a VB.NET application displaying the use of dialog control. Include all the five dialog controls like OpenFileDialog, SaveFileDialog, FolderBrowserDialog, FontDialog, ColorDialog.
30 Nov 2012 by Member 9646630
check this for more dialog control http://fantasyaspnet.blogspot.in/2012/10/create-vbnet-application-displaying-use.html[^]
30 Nov 2012 by Krunal Rohit
Make Notepad kinda application..
30 Nov 2012 by Abhishek Pant
Hi,This will help you-Working with different dialog controls in VB.NET[^]The Open File Dialogue Box[^]The SaveFileDialog Control[^]Font Dialog in VB.NET[^]The FolderBrowserDialog Control[^] and FolderBrowserDialog[^]The ColorDialog Control[^]and more help on controls refer More...
17 Nov 2014 by payjo
I create Mahapps custom dialog message with this code. the problem is the dialog form not show close button so cant close it. how to show close button ? public async void button_Click(object sender, RoutedEventArgs e) { Button btn = (Button) sender; ...
29 May 2013 by Surendra Adhikari SA
Implimenting a message box that closes automatically using thread.
17 Jun 2012 by Apemania
C# Forms RichTextEditor with custom hyperlink with Outlook address like text entities, custom popup listbox, and a screen tip.
6 Sep 2010 by symreds
Hi everyone,I must modify the Windows default CColorDialog. I want to put a combobox instead of "define custom colors" pushbutton. I found some explanations, but I did not understand how to use the color.dlg template and CHOOSECOLOR structure.Someone could help me?Thanks
6 Sep 2010 by Richard MacCutchan
You should add the color.dlg resource to your project's resource file and add or modify the controls to meet your own requirements. Then add a callback function to handle messages raised by the new controls. The dialog operates much the same as a user defined dialog but with the additional...
7 Sep 2010 by symreds
I know what's a pointer, but I doubt this is the right way to use:CHOOSECOLOR *lpcc = new CHOOSECOLOR;ChooseColor(lpcc);Anyway, the callback function is also for MFC?
24 May 2015 by Member 4560915
Hi,Is there a way to customize the default Print Dialog on Windows Desktop, for all system users. This is not within the context of a specific application, but instead will be for all users that log in to the workstation and uses any application and issues a "Print"As part of a Green...
24 May 2015 by Duncan Edwards Jones
To add this message to all print jobs is going to require writing some print spooler dll[^] (probably a port monitor but not sure).This will have to be in a standard dll, which (most likely) means C++.
4 May 2010 by dj4400
Hi all,I would appriciate if someone can tell me how to change a dialog layout dynamically so that tabs in a tab control would be ordered from right to leftthanksdj4400
4 May 2010 by dj4400
SetWindowLong(hTabCtrl,GWL_EXSTYLE,WS_EX_LAYOUTRTL);
8 Feb 2012 by Iron-Eagle
For my application I need to create a Dialog Box without using resource.I am trying to do it with DialogBoxInderect function.The code is unbelievably ugly but somehow I succeeded to do it. The problem is that dialog, for some reason, is much bigger than I asked with much bigger...
8 Feb 2012 by Eugen Podsypalnikov
Please try to set the same (or another special) fontat the WM_INITDIALOG part of ActivateWlsMsgDialog :)
8 Feb 2012 by Richard MacCutchan
Dialog sizes in RC files are given in dialog base units, not pixels so if you are setting them dynamically you need to convert from dialog units to pixels as described here[^].
29 Jul 2011 by Claudio Ludovico Panetta
Hello everyone.I started developing an application to manage D/41Epci Dialogic cards.I'm writing it Visual C + + (and I use Visual Studio 2010 as IDE).For now it does absolutely nothing ... because I do not know how to use the libraries provided by Dialogic ..My code, for now, is the...
7 Dec 2018 by vivek.chauhan2009
Hi,how to disabled close button in a simple dialog?ThanksVivek chauhan
29 May 2010 by Nuri Ismail
Here is an example for you that will enable/disable the close button in runtime:BOOL bEnable = FALSE; // TRUE to enable and FALSE to disable//.....UINT nMenuf = bEnable ? (MF_BYCOMMAND) : (MF_BYCOMMAND | MF_GRAYED | MF_DISABLED);CMenu* pSysMenu =...
3 Jun 2010 by Anu Koshy
You can useclosebutton.EnableWindow(0);where closebutton is the variable name of the control.
7 Dec 2018 by Member 14081722
Pretty Simple WNDCLASSA WindClass = { 0 }; WindClass.hbrBackground = (HBRUSH__*)COLOR_WINDOW; WindClass.hCursor = LoadCursorA((HINSTANCE)NULL, (LPCSTR)IDC_ARROW); WindClass.hInstance = hInstance; WindClass.lpszClassName = "WindowClass"; WindClass.lpfnWndProc = WindowProcedure;...
6 Jun 2011 by Narinearraul
Hi I'm working on an SDI View Architecture MFC application and I need to display an external dialog box when the user clicks Help -> Example. So far i have my dialog box ready and I added an event handler on the Example 'button' and added void CtestSDIApp::OnHelpExample(){ rulesDlg...
8 Jun 2011 by Alan Balkany
The first step is to distinguish the case where your handler isn't being called from the case where the dialog box is malfunctioning.You can put a breakpoint in the handler and see if it's hit, or put an AfxMessageBox () in there.
8 Jun 2011 by Albert Holguin
That should work just fine given that rulesDlg is a properly defined CDialog. If you post you code for rulesDlg we can probably see if there's anything wrong there.
9 Jun 2011 by Narinearraul
Ok it actually worked, I just had to associate it with the right .cpp file which in this case was my doc, so the same code i posted about worked.Thanks for the help guys!
1 Jan 2020 by Umesh AP
I am developing application which has Index.cshtml (main pg with searching criteria & Search button), _PartialView.cshtml (partial view displaying records with update/delete links), Edit.cshtml (View for updating). After clicking Update link, popup modal dialog is opened containing Edit view...
30 Sep 2016 by RaunakGupta
you need to add this script on layout pageplace on parital view
4 Oct 2016 by RaunakGupta
put any div on myedit.cshtml.put this div in your myedit.cshtml.on success or failure of that action call.display your exception on this div.using javascrript