|
eh, u see, i've already been there, a FEW times lol. Booo @ M$ they used to give it for download for free now u have to freckin order it. I cliked order once and it said 0$ so i thought hey this might not be so bad afterall, but then i got to checkout and turns out i would need to pay 25$ for shipping costs since i'm in Belgium.
So i ran a search for an alternative (read 'illegal') download location of the Win98 DDK. And i found one! like the third search result or something lead me to a non-MS page and it had a download link on it directly to the MS server where u could STILL download the Win98 DDK!!! I mean.. how freaky is that, they take it off and make u order a CD with the new DDK but they just leave the file there, handy..
Anyways, so i downloaded it, and when i installed it said it was for Driver development with Win98 and Win2000 (and NT4). But if its compatible with Win2000, isn't it compatible with XP too?? or is there a difference between XP and 2000 i'm missing...
Thanks!
Kuniva
--------------------------------------------
|
|
|
|
|
Hi ,
i have a Dialog box which has a combobox and which on clicking a button retrieves the index of the selected item and stores in a integer variable, now how do I access this variable from another dialog box?..
for example:
void CMyprogDlg::OnOK()
{
int com = m_com1.GetCurSel();
}
How do I access the integer variable 'com'from another dialog box? It would be great if someone sends some example source codes.
Thanks,
Deepak Samuel
|
|
|
|
|
You can't. It's a local variable.
You have to expose the value in the dialog class, globally or send the value via a message to another thread/window.
Since you are setting it with OnOK, the traditional way would be to create a member in CMyprogDlg. The function that created the dialog would then read the value if the dialog returned successfully. It would then either store it its own data member or locally, if the new dialog would be created right away.
|
|
|
|
|
how do the follow in c++???
dim srvobj
dim vdo
set srvobj = GetObject("IIS://LocalHost/MSFTPSVC/1/Root")
set vdo = srvobj.create("IIsFtpVirtualDir", "mydir")
'set vdo = srvobj.getobject("IIsFtpVirtualDir", "mydir")
vdo.setinfo
vdo.AccessRead = True
vdo.Put "Path", "c:\tmp"
vdo.SetInfo
thanks and regard!
|
|
|
|
|
class CLogin : public CFormView<br />
{<br />
protected:<br />
CLogin(); <br />
DECLARE_DYNCREATE(CLogin)<br />
public:<br />
enum { IDD = IDD_DIALOG1 };<br />
................<br />
};<br />
class CChangePassword : public CFormView<br />
{<br />
protected:<br />
CChangePassword(); <br />
DECLARE_DYNCREATE(CChangePassword)<br />
public:<br />
enum { IDD = IDD_DIALOG2 };<br />
................<br />
};<br />
BOOL CQLBHApp::InitInstance()<br />
{<br />
.................<br />
AddDocTemplate(new CNewMultiDocTemplate(<br />
IDR_QLBHTYPE,<br />
RUNTIME_CLASS(CQLBHDoc),<br />
RUNTIME_CLASS(CChildFrame),
RUNTIME_CLASS(CLogin)));<br />
<br />
AddDocTemplate(new CNewMultiDocTemplate(<br />
IDR_QLBHTYPE,<br />
RUNTIME_CLASS(CQLBHDoc),<br />
RUNTIME_CLASS(CChildFrame),
RUNTIME_CLASS(CChangePassword)));<br />
....................<br />
}<br />
I defined 2 Document Templates in my MDI App......
But I dont know how to call MDIChildWnd of CLogin (or MDIChildWnd of CChangePassword)
I mean:
When user select menu "Login" (ID_LOGIN) => Show Login MDIChildWindow
When user select menu "Change Password" (ID_CHANGE_PASSWORD) => Show Password MDIChildWindow
Could you help me ?
And ...... Login Window, ChangePassword Window have only one instance in my MDI app .......... so that I think I don't need use
Document Template. Is that right ?
Important: my MDI Child Windows must be dialog-base window(I will design controls in these dialogs by Dialog Editor)
please help me .......and a little sample code if possible (I have read MSDN but dont find what I need)
Thank a lot!
|
|
|
|
|
hi,
When I compile the following code:
DISPID dispid;
DISPPARAMS dispParams;
OLECHAR FAR* szMember =_T("updateList");
...
hresult = lpList->GetIDsOfNames(IID_NULL, &szMember,1,LOCALE_USER_DEFAULT, &dispid); //IHTMLSelectElement *lpList=NULL; lpList is initialized before
I always get this error:
error C2440: 'initializing' : cannot convert from 'char [11]' to 'unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
I can't get any answer from Microsoft, please help solve the problem!!!
Thx.
Alan
|
|
|
|
|
This is just an offhand guess
stick this at the top of the cpp file
#include <atlconv.h>
Here is the conversion
DISPID dispid;
DISPPARAMS dispParams;
char* tmpstr =_T("updateList");
USES_CONVERSION;
LPOLESTR szMember = A2OLE(tmpstr);
hresult = lpList->GetIDsOfNames(IID_NULL, &szMember,1,LOCALE_USER_DEFAULT, &dispid); //IHTMLSelectElement
|
|
|
|
|
It doesn't work, I got the same error.
Do u know other way to solve it?
Thanks
Alan Shen
|
|
|
|
|
"OLECHAR FAR* szMember =_T("updateList");"
how could you have possibly got the same error, the line above was the line that caused the error, and in the code I posted, that whole line is gone. OLECHAR FAR* wasn't even the right datatype for the param.
Maybe your object file is old, try rebuild all.
Here is the conversion again.
stick this at the top of the cpp file
#include <atlconv.h>
Here is the conversion
DISPID dispid;
DISPPARAMS dispParams;
char* tmpstr =_T("updateList");
USES_CONVERSION;
LPOLESTR szMember = A2OLE(tmpstr);
hresult = lpList->GetIDsOfNames(IID_NULL, &szMember,1,LOCALE_USER_DEFAULT, &dispid); //IHTMLSelectElement
|
|
|
|
|
that is the error:
error C2440: 'initializing' : cannot convert from 'char [11]' to 'unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
|
|
|
|
|
To declare a wide char constant, use L"updateList" ( _T("foo") evaluates to L"foo" in unicode, and "foo" in MBCS/ANSI builds)
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|
|
|
Hi, all
I was wondering how to lock (not disable) an edit box during runtime, so the content (the text) in the control can still be selected but not modified/edited. I am using regular Windows API (no MFC) and I also want to be able to unlock the edit box.
Thanks in advance
Aidman » over and out
We haven't inherited Earth from our parents, instead we have borrowed her from our children; an old Indian saying.
|
|
|
|
|
if you want to do this easily, you'll probably want to use CRichEditCtrl with the read only property enabled instead of CEdit
|
|
|
|
|
|
doesn't setting read only on an Edit gray the box by default? If so, and I can remember it doing that, you'd have to subclass and override.
That's why I suggested the rich edit instead.
|
|
|
|
|
yes it does - (I thought that would be ok with the asker)
However, there's a message you can override in the dialog to proivde a different background brush.
Peter
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|
|
Either use the ES_READONLY style when you create it, or the EM_SETREADONLY message (CEdit::SetReadOnly if you use MFC) at any time after creatign the control
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|
|
As others have mentioned, you use the EM_SETREADONLY message. However, this will cause the edit box to be grayed out. You can still select the text, copy it, etc..
If you want the control to look like a normal edit control, but be read-only, then you need to catch WM_CONTROLCOLOR and look for the controls window handle and return a brush that's the same as the users color preferences.
I'd advise against that, though. It confuses users when a control looks editable, but really isn't.
--
Where are we going? And why am I in this handbasket?
|
|
|
|
|
I'm not new to programming but new to progress bars and I would like to know how to use it (using the default class for it) not some other class. I would appreciate it if anyone replied
[It is possible to represent everything in this universe by using 0 and 1]
I'm going to live forever or die trying.
|
|
|
|
|
Do you use MFC oder plain API? I case of MFC:
Drag a progress bar from the controls toolsbot to your dialog to place it there. Next, create a variable for the CProgressCtrl e.g. using the Class Wizard.
If your variable is named e.g. "m_ctlProgress", you need to set some attributes, you can do this in OnInitDialog() :
m_ctlProgress.SetRange(0, 100)
m_ctlProgress.SetRange(1, 255)
you can then set the postion of the blue bar with
m_ctlProgress.SetPos(128);
see MSDN for more information.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Can anyone tell me how to save from a dialog not a SDI or MDI but Dialog.
You know like putting a variable into it or several into a specified external file and opening it. Need Details since I'm kinda new to saving/serializing
[It is possible to represent everything in this universe by using 0 and 1]
I'm going to live forever or die trying.
|
|
|
|
|
//Serialize Save Int
CFileException e;
CFile theFile;
if (!(theFile.Open(filename, CFile::modeWrite | CFile::modeCreate, &e))) { TRACE("can not open file for writing"); return; }
CArchive ar(&theFile, CArchive::store);
int p = 1
ar << p;
//Serialize Load Int
CFileException e;
CFile theFile;
if (!(theFile.Open(filename, CFile::modeRead, &e))) { TRACE("can not open file for reading"); return; }
CArchive ar(&theFile, CArchive::load);
int num;
ar >> num;
Repeat this for everything/datatypes you want to serialize. Can't remember whether you have to close the file after or if MFC takes care of that for you when you serialize, so I left it off.
|
|
|
|
|
The destructor of CFile closes it for you! If you create the CFile object on the heap, you have to close it manually.
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
Is hyperthreading anything to get excited about.
XP is meant to support it, so I was wondering if in future apps that I make that are CPU intensive should I consider an architecture that can be modified to use it?
If so, I guess I'm on another learning curve.
Regardz
Colin J Davies
* WARNING * This could be addictive The minion's version of "Catch "
It's a real shame that people as stupid as you can work out how to use a computer. said by Christian Graus in the Soapbox
|
|
|
|