|
Thanks but that isn't going to be much good to me because later in Dialog1 I need to .AddString() to the ComboBox.
I guess what I'll have to do is write the items that need to be put into the ComboBox to a file in Dialog1 and then read them from the file when Dialog2 is opened and put them into the ComboBox.
Thanks for your help anyway.
Aoife
|
|
|
|
|
...or use a CStringArray member in Dialog2, which you fill from dlg1. In Dialog2::OnInitDialog, fill your combo from the array.
|
|
|
|
|
Hi,
I want to learn Device Drivers under Windows..
I know DDK is used.. Can neone tell me what should
i start with.. I mean the simplest driver of all.
Please provide some resources also.
Thanx
Sameer
|
|
|
|
|
That is probably the RAW print driver.
Happy programming!!
|
|
|
|
|
I use WebBrowser ActiveX Control in simple dialog based application, and I want to ensure, that this control is installed on user's system. I tried to handle CDialog::DoModal return value (-1 if unable to create the dialog), but some strange thing happens... After failing dialog creating MessageBox() doesn't dispalyed (sorry, if my english is wrong). I can't understand the reason, may be there are some other simple methods to detect that IE ActiveX presents?
|
|
|
|
|
Check the registry - IE stores it's version there, something like HKLM/software/Microsoft/IE/versions.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
hi
what would the code be for me to write text to a file and also being able to open the file by clicking on a button
thanks
|
|
|
|
|
To write something to file:
void CTest03Dlg::OnButton1()
{
CString s("Hello test....\n\n");
std::ofstream f("MyText.txt", std::ios::app | std::ios::out);
f.write(s.operator LPCTSTR(), s.GetLength());
f.close();
}
To open the file:
void CTest03Dlg::OnButton2()
{
WinExec("Notepad MyText.txt", SW_SHOW);
}
Maxwell Chen
People say "No news is good news". Then, no code is good code!?
|
|
|
|
|
do i need to include anything else to this? as im getting lots of errors
|
|
|
|
|
Yes, class fstream is of C++ Standard Library, you have to include <fstream>.
Maxwell Chen
People say "No news is good news". Then, no code is good code!?
|
|
|
|
|
Hi,
How can i get the Used System Memory and
System Memory Free..
Thanx
Sameer
|
|
|
|
|
If using PSAPI (Win NT/2k/XP) try GetProcessMemoryInfo
On the NT archetecture memory information is mapped to a memory object in the registry. Check "Performance Objects and Counters" in MSDN and WINPERF.H.
/moliate
|
|
|
|
|
Hi,
I want to get the size of a specified folder like this :
HANDLE hDir = CreateFile ("C:\\MyFolder",
GENERIC_READ,
FILE_SHARE_READ|FILE_SHARE_DELETE,
NULL,
OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS,
NULL
);
Then i pass a directory handle to the GetFileSize function
DWORD isize = GetFileSize(hDir, NULL /*lpfilesize*/ );
This code don't work. I try this second function :
PLARGE_INTEGER lpFileSize;
GetFileSizeEx( hDir, lpFileSize );
It don't work
Can anybody help me.
Thanks in advance
|
|
|
|
|
ummm a folder doesn't have a size as such ... its the sum of the sizes of all the files / folders in the folder
do a recursive filesize thing and add them all together
"... and so i said to him ... if it can't dance and you can't eat it either f**k it or throw it away" 8028finder.com
|
|
|
|
|
No, you need to get the size of each file in the folder...;)
Best Reagards...
Carlos Antollini.
www.wanakostudios.com
Sonork ID 100.10529 cantollini
|
|
|
|
|
please help me, I need to create one class have (button, static text, edit box..). How to write code???
|
|
|
|
|
Do you want create derived class from button, static etc...?
Eugene Pustovoyt
|
|
|
|
|
This is maybe a silly question. I thought it would as easy as adding an IDR_MAINFRAME menu to my dialog resource, but the miracle didn't occur
Should I create a CMenu and associate it to my dialog or is there a clever MFC mean ?
Thanks
Yarp
|
|
|
|
|
right click on the dialog and open properties. look there, u will find a combo box for choosing the menu
|
|
|
|
|
Hi Ganesh, this was obviously a silly question. I feel stupid but it doesn't matter I got it now. I spent 2 hours this morning trying to append my menu to the dialog. I thought many things but I could never figure it would be as simple.
Thanks a lot.
Yarp
|
|
|
|
|
Yarp
I have sent you a direct email with a sample project containing a dialog with a menu. Haven't looked at it in a while so won't make any comments here on how to do from my feeble memory.
Michael Martin
Australia
mjm68@tpg.com.au
"He orginally got the Tweezers of Destruction through the scanners but then popped back outside for a smoke."
- Chris Maunder 26/03/2002
|
|
|
|
|
Hi Michael, another way to create a menu. The way I was looking for and as there's also a status bar this is twice interesting for me. I compiled the project with VC6, it is still workable.
I'm doing an MFC dialog embedded in a dll with no MFC in the root program, so I emulate a CView behaving dialog from a CDialog class.
Thank a lot for the .zip file, CodeProject is really a cool C++ forum.
Yarp
|
|
|
|
|
Hi,
Can i pass a string in PostMessage parameters..
WPARAM or LPARAM..
Sameer
|
|
|
|
|
Sameer Maggon wrote:
Can i pass a string in PostMessage parameters..
WPARAM or LPARAM..
Yes you can, but remember, PostMessage just places the message in the message queue of the window in question, so you have to make sure that the string does not go out of scope or get deleted before the message is handled.
---
CPUA 0x5041
Sonork 100.11743 Chicken Little
If a man is standing in the middle of the forest speaking and there is no woman around to hear him...is he still wrong?
|
|
|
|
|
Have you tried (WPARAM)szString?
I think you should try it only for windows from the same process.
rechi
|
|
|
|