ac2000 The drawings are getting erased when the dialog is dragged or other drawing applied afterwards I need all the drawings to stay permanently so, i can continue to draw in dialog depanding on user's response... A working code sample is appreciated //////////////////////////////////////////////////////// BOOL CFlickerFreeDlg::OnInitDialog() { CDialog::OnInitDialog(); BITMAP bm; CClientDC dc(this); m_picture.topleft.x = 0;m_picture.topleft.y = 0; m_offs.cx = 0;m_offs.cy = 0; ... |
|
How do you use MsgBox, thats pretty much exactly what im looking for It's documented on MSDN, and you could find it with a google search. I won't repeat the documentation, as that would be pointless. Actually, based on your question, I have to ask: are you even using a GUI toolkit? You do realize that C++ has no intrinsic concept ... |
|
|
Hi, I've developed a basic dialog program using the MFC foundation wizard. Upon pushing one of the buttons, a time consuming processing is invoked, during which the user cannot access the 'Cancel' pushbutton, nor can the processing in question update any fields in the dialog box. It can updated the progress bar however. In order to release the window during this ... |
Hi! I'm looking for a way to traverse all the controls on a dialog in the order of the tabstop index. Note that I use unmanaged C++, so no GetTabIndex function afaik. The ALMOST perfect function for this looks like: CWnd::GetNextDlgTabItem. BUT...this function skips controls that are disabled (WS_DISABLED), and that's a problem, because I want to traverse ALL controls. So ... |
|
Hi, I have a small application which is running in service mode. Its responsible is to provide email configuratio. If it gets a request( eg: Export a file throug email) from the user, first it will check whether any email is account is created or not, if not( here my application uses one third party .exe that is IDSMAIL.exe) it will ... |
|
|
11. New Dialog forums.devshed.comCan anyone help us out here I want to create a new Dialog from the existing base class Dialog Ive added a new Dialog to my resources and registered with class wizard but im have trouble instantiating the new form My Dialog is called CMyDialog and in doing this CMyDialog MyDlg(this); int nRetcode = MyDlg.DoModal(); The class im calling from is ... |
I need to put background images on my win32 dialogs. Is that possible? Basically I want everything to look the same, but with a an image behind it. I've tried using picture control items, but the problem is, my static text items get this huge ugly grey rectangle around the text. Setting their transparent property to true just makes them invisible. ... |
As the title describes, I was wondering if there was a way to use MoveWindow() to "pull" the bottom edge of my dialog up in order to "cover" or "hide" two image controls I have at the bottom. Then conceptually a user could check a checkbox and I would use MoveWindow to "lower" the bottom edge of the dialog to "reveal" ... |
|
The reason is this: The Save As dialog will change the current working directory of your application to whatever directory the user picked. You are specifying a relative pathname for the CopyFile source file, the pathname is relative to the current working directory. So when the dialog changes the current dir, it messes up where you thought the source file would ... |
Hello there! I'm a VB developer (well, Excel97VBA actually, but the languages are essentially the same from my point of view), with a Win32API problem. I've posted this in the 'C' section because I'm pretty sure that my language of choice is irrelevant in this case. I've been using the SHBrowseForFolder API to allow the user to select a directory, and ... |
in my application i have a dialog which opens the other dialog using DialogBoxParam(), however i cannot make the original dialog disappear when the new one appears. ive tried putting enddialog() before and after dialogboxparam() to no avail. as far as i know i could use registerclass() and findwindow() except this requires a WNDCLASS which my dialog boxes do not have. ... |
is there anyway to show a directory dialog in win32 i've been searching through msdn and i haven't found one yet, so can you help me, and if its not too much trouble i also need to use a spincontrol too, is there anyway to get that in win32 . i'm using C not C++ and if u don't know what ... |
|
20. Dialog load forums.devshed.com |
|
|
Ok in my win32 api, in c++, using gui... I was adding another dialog box for the header manager. Usually adding a dialog is easy, I create it in Microsoft Embedded C++ (saves the time of trying to write the code and get the positioning just right, not that im not capable of writng the code by hand), and I saved ... |
#include #include "Resource.h" //--------------------------------------------------------------------------- HWND hWnd; LRESULT CALLBACK DlgProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); //--------------------------------------------------------------------------- INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { DialogBox(hInstance, MAKEINTRESOURCE(IDD_DLGFIRST), hWnd, reinterpret_cast(DlgProc)); return FALSE; } //--------------------------------------------------------------------------- LRESULT CALLBACK DlgProc(HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lParam) { switch(Msg) { case WM_INITDIALOG: return TRUE; case WM_COMMAND: switch(wParam) { case IDOK: EndDialog(hWndDlg, ... |
hi , there is some problem when i use the domodal function...when i called for the 2ndDialog, the program popup an msgbox saying " An unsupported operation was attempted."..is it in my 2ndDialog class i need to set some codes in the Begin Msg map..? im using EVC++ 3...is there a difference? regards, roy |
|
Hello, I have put a region on my dialog and made it look with rounded corners. The dialog is resizable so I can drag the edges of the dialog and resize the window. But I can't grab the rounded corners. I would like a user to be able to grab them and resize the window in both directions. Is that possible ... |
How can I use a dialog template defined in a .rc script file to create several controls (as child windows) in part of my app's main window? So I can switch between several of these by changing their visibility. I want a kind of general-purpose container window to contain other controls. The visibility is changed when an item is selected in ... |
Your first question: A modal dialog is one that "locks up" the underlying application until it closes. Any time you've seen so much as a window with a single button, where the application will not do anything until you hit "ok" or "cancel" - that was a modal dialog. They are most suitable for warnings, selections (the common file dialog, for ... |
Hello guys, I would be greatful to everybody who would give me an example how to make a skinnable dialog resizable. I am using a CDialogSK class for my dialog (thanks to the author) but the dialog should not be resiable. Now I need to make it resizable but keep the skin ( I guess I will have to resize it ... |
You gonna have to create your own I believe. Cause you can't use the ones they are providing. But you use the status bar to store data on what's going on. So when I just need something like that, I put a little EditBox in the bottom of my dialog box and that's its ! it's do the samething, just put ... |
|
since you are using MFC you don't need that global updaterhwnd. Whenever you want the dialog's hwnd just use m_hWnd public property (every window derived from CWnd has one, which includes buttons, dialogs, all controls, etc). Instead of sending a progress control messages, you could just use CProgressCtrl class methods. You will probably never have to post a message to it. ... |
Hello, I posted on here a while ago about this, and couldn't get any help. So I went out and bought a book, still to no avail. Perhaps I can try here again. First: I am using MS VC++ and the MFC libraries. I have designed two (very pretty, might I add) dialog boxes. I want it so I click okay ... |
|
|
Hi all ! Just soo plain stupid but really annoying question ! I started a new project in Visual C++ 6.0. I choosed MFC App. Wizard to create it ! I added the buttons and the RichEdit box to my Dialog Box where I wanted. But then I choosed to build the program, it's builded without error or warning (normal, I ... |
__________________ Every morning, I get up and look through the Forbes list of the richest people in America. If I'm not there, I go to work. May your Tongue stick to the Roof of your Mouth with the Force of a Thousand Caramels. To the systems programmer, users and applications serve only to provide a test load. |
39. Dialog forums.devshed.comI cant seem to find any tutorial or book that tells me how to do this, so figured I'd ask you guys. I want to know how to create an empty workspace, add an empty dialog, and make the program display the dialog and not some DOS promt. (All the books and totoarials I have read tells me how to create ... |
1. Set the "Default" property of the button that you want to "true". Then, even if the focus is on an edit field, hitting enter will automatically fire off the button's OnClick() event. 2. Go to the dialogs tab and drop an OpenDialog component on the form. Then do the following steps: (a) Set the DefaultExt property to *.txt (or whatever ... |
Hi, I have a dialog based app, and I was simulating text rollovers. I'm making static text change color using the ON_CTLCOLOR messages which is working ok but I also wanted to change the font of the text so it becomes bold on a rollover. It looks like I could do this with ON_SETFONT but - vc++ doesn't give me the ... |
|
43. SDM Dialogs forums.devshed.comDoes anyone know anything about SDM dialogs, are there any helper dlls out there. All I know is that Microsoft always does something to make my job harder!! Normal Win32 API's dont work on this type of dialog, any help comments or suggestions would be appreciated I know that accessibility functions will work on the SDM dialogs just wanted to know ... |
Hi, I have a Dialog box using MFC. I added to edit boxes to the field and one selection box. I have a "Reset" button that is diabled/greyed when the form is created. When either the edit boxes or selection boxes are changed I would like to enable the reset button. I am not sure what message handeler to use to ... |
Hi, I'm trying to add a custom dialog to my MFC based project which has a Slider control on it. I have a member variable for the dialog which lets me access controls on the dialog, but when I run the program and try to access the slider control I get a debug assertion failed error in file 'afxcmn.inl', although if ... |
46. New Dialog forums.devshed.com__________________ Every morning, I get up and look through the Forbes list of the richest people in America. If I'm not there, I go to work. May your Tongue stick to the Roof of your Mouth with the Force of a Thousand Caramels. To the systems programmer, users and applications serve only to provide a test load. |
Hi iam very confused...I've got a Diolog Box with just 3-4 simple controls on it 2 buttons 1 Listbox in a Groupbox if the programm runs and i click on Maximize at the dialog the buttons still there where they've been positioned What i want is. If i press on maximize for example the ok and cancel button should move also ... |
Short Answer: Yes I Do Long Answer: You haven't specified what platform/environment you're using, so I'll assume Visual C++ on Windoze. 1. Go to the Resources Tab for your project. Right click on the resources and select Import... Select Files of type as "All Files" and select the BMP file that you wish to use for your dialog. You should then ... |
#include #include "digitron_h.h" /* Declare Windows procedure */ LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM); INT_PTR CALLBACK DialogProc(HWND,UINT ,WPARAM ,LPARAM ); /* Make the class name into a global variable */ char szClassName[ ] = "WindowsApp"; HWND Dialog=NULL; int WINAPI WinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nFunsterStil) { HWND hwnd; /* This is the handle for our window ... |
Hi there. I want to create a dialog, with a menu ( file, help, edit etc.), and with tabs on the dialog. Basically like the display properties dialog that you get when you right click on your windows desktop, just with a menu added. Also, I want to add dialogs as the tabs, dialogs that I created separately. Now if I ... |
|
i read this and within two seconds tried it in my code, fully expecting to fix the problem :P. No, it did not occur to me at all that it would not return immediately. However, surprisingly, i got the exact same behavior, tenacious little dialog, and access violation. Which befuddled me more cause, at the very least, that would have made ... |
EnableWindow(FALSE)of dialog disable only dialog, Not its Control, To disable control you have individually disable each button. To make an single call to disable and enable function you can make list of control in dialog in CList as all control derive from CWnd, you can save in list and iterate list for enable and disable Control's in a single call.... Like.. ... |
If the problem is as mbue suggests, you can probably overcome the problem by detecting the OS at run-time, for XP and older, draw off screen then use bitblt to create smoother graphics. This method should also work for Vista and Win7 though, so maybe you can just use this technique all the time. |
|
|
|
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 follows: nYear = m_oleMyDate.GetYear(); nMonth = m_oleMyDate.GetMonth(); nDay = m_oleMyDate.GetDay(); ... |
|
|
|
|
Hi, i have tried this one only .. it worked but my custom looks different than minimize, maximize, context help buttons .. different in the sense if i click custom button it goes down and again i have to click make the button up exactly unlike context help buttons. And also i dont know the hander for the custom button click ... |
Hi, it would help you could clarify your question, what do you mean by 'is to display these buttons at random'? Do you mean one at a time at random, or in a random order or random positions? I think it would help if you could explain a bit better what you are stuck with. Regards, Ali :) |
|
Hey buddy!!! this is not special open window.... Every operating system SDK provides you with some default open/save/print etc. dialog which you will normally find in another applications too... in that you can do some minor changes by sub-classing them... But as in your image this look and feel is operating system dependent and can be used ... |
|
|
|
This seems rather odd for an UI. If you just want to show a read only dialog there, you may not need to embed a dialog. Instead use custom drawing/painting to show all the data you want to, and make it look like a dialog. On the other hand if you want to get an editable dialog in there, ... |
|
|
|
A dialog box needs a dialog procedure in which it processes message to draw its child controls. In MFC this is handled by the dialog class. The way you're creating is to crate it and immediately destroy it after sleeping for some time. You're not giving MFC a chance to draw the controls. What you have to do is ... |
|
|
Hi Hari, no, I would not write that this crash is quite normal... You could build a Debug version and start it by F5, then, after an exception or an failed assertion is shown, press "Retry" - to see the crash line (it could be a MFC or even OS DLL line), then - select ... |
Thanks Hans. I found the same "answer" over the weekend. You are absolutely correct. I think this is a bug in the wizard generator that puts the #ifdef _UNICODE. It should not be there at all. Removing it allows me to compile in MBCS, UNICODE and "not set" Thanks |
i have write these in my main.cpp HBRUSH g_hbrBackground = CreateSolidBrush(RGB(0, 0, 0)); char c; switch(c) { case "WM_CTLCOLORDLG": return (LONG)g_hbrBackground; case "WM_CTLCOLORSTATIC": { HDC hdcStatic = (HDC)wParam; SetTextColor(hdcStatic, RGB(255, 255, 255)); SetBkMode(hdcStatic, TRANSPARENT); return (LONG)g_hbrBackground; } break; } and write these in that dialoge which i want in color c=WM_CTLCOLORDLG; c=WM_CTLCOLORSTATIC; but got tooo many errors. plz see Pallini, what's ... |
|
|
|
|
Either send a custom windows message to the hWnd of the second and have a message handler for it in the second, or have the first call a public method of the CDialog derived object of the second. However, if I recall correctly from a previous question of yours, you are starting the second dialog as a modal dialog ... |
|
|