-
How can I use getdlgitem and getdc before the dialog box is created?
Who said that the text displayed by the static control cannot be dynamically refreshed, modify the id number of the static control, as long as it is not IDC static, you can use setdlgitemtext to dynamically update it, provided that it is displayed in the dialog box.
-
The first one you do: your is p=null;
Of course you can't go to p->getdc();
My thoughts in No. 2.
Mine is this kind of learning;
c***dlg* dlg=new c***dlg();Modal dialogs.
dlg->showwindow(sw_show);
dlg->upwindow();
cdc* pdc=dlg->getdc();
-
Set a member variable flag bit in c to determine whether it is a or b, such as int flag;
a, ccdlg dlg;;;
bWhen called, ccdlg dlg;;;
-
You do this by adding a flag to the category C:
class c
Then whether it's a or b, do it when domodal out of the c dialog;
true or false");It can be set to true for a and false for b.
-
afxgetmainwnd, but note that you can't access interface-related content, such as control variables in the main window.
cmainframe *)afxgetmainwnd()) variable name;
-
Get the handle to get the form via findwindow and then sendmessage closes!
-
There are many ways to do this: 1. overload onok(), 2. postmessage(window handle, wm close); 3. Call enddialog
-
Postmessage or SendMessage sends a message to the dialog box.
-
You describe that there is a problem. What you want to get is the pixel of the desktop.
cwnd* desk = getdesktopwindow();
cdc* pdc = desk->getdc();
colorref cr = pdc->getpixel(30,30);
desk->releasedc(pdc);I guess you forgot about that.
-
The modal dialog cannot execute the following statement without returning, so if lz does not need to use the modal dialog, you can use the ideasoft method, and if you insist on using the modal dialog, you can overload the oncreate function in the dialog class to complete the relevant functions.
-
In general, non-modal is used, but if you have to use modal, you can use what IdealSoft says, set a variable in the DLG to hold the function pointer (or save the pointer of the instance if you want to call the method of an instance of a class).
PS: I do this a lot, but it's a serious undermine of the aesthetics of C++ programs.
-
csheetdiadlg dlg;
m_pmainwnd = &dlg;
int_ptr nresponse = ;
if (nresponse == idok)else if (nresponse == idcancel)Here you can see the ** displayed in the main dialog, you will write a non-modal dialog, naturally you know how to change it.
But I look at your needs, this method is not good, look at MFC's cpropertysheet and cpropertypage classes, maybe you will find a better way, reference.
If you're using aspnet, he has a special function in. NET to get a computer name, IP address and current username is very simple, the following are a few methods I commonly use, if you have other good methods, you can reply and sort it out together: >>>More
int sum=0;
for(int i = 0 ;i< -1;i++) assumes that the ID of the datalist is datalist1 >>>More
Know, you can earn 42 experience points per day:
2 points for the first login, 20 points for voting, and 20 points for the first 10. >>>More
Hello! We're sorry, but our smartphones don't have root access at the moment. There are two main reasons: >>>More
2. At this time, the "New Web Query" dialog box pops up, you can type the address of the web page you want to add data in the "Address" column, and click the Go button. >>>More