|
LeeeNN wrote: But I also want dynamically delete a pane, how to do this?
Use CSplitterWnd::DeleteView() for this.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
Hey,
I have form derived from CFormView. On the form I placed a tabcontrol. Now I want to paint a line on the tabcontrol (in my CFormView::OnPaint) and not in the tabcontrol (derived) class!
My problem is that the tab overwrites my graphic... Is there any solution?
|
|
|
|
|
Anyone using good alternatives to WinHTTP and SoapToolkit?
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|
|
install a service on a host OS such as Win2K or XP? I mean the binary executable file. Should it go into the System32 directory? I see that under System32 there is a Drivers sub-dir but nothing for services.
I realize that I can deliver the service with my runtime deliverables and place it into my runtime directory but prefer not to since I may want to leave the service even though my program has been uninstalled or deleted accidentally.
Clarification: I have a program that I will be installing in addition to the service (a RFC-868 Time Server) I will be installing. When my program is uninstalled or the directory is accidentally deleted, I still want my service to run and am looking for the (Windows) conventional directory location that it should be stored in.
-- modified at 11:19 Thursday 26th January, 2006
|
|
|
|
|
Just going down through the list of services on my XP machine, I see that a lot of them reside in the System32 folder.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
Hi I need to determine, if possible using VC++, the size and date information relating to the current logged in user's profile.
I can get who is logged in, their Domain and SID value, but struggling to find how to find out details as to if the user's profile is roaming, local etc and then the size/quota, date etc information.
Any help would be greatly appreciated, thanks in advance.
Phil
|
|
|
|
|
P Gibson wrote: ...but struggling to find how to find out details as to if the user's profile is roaming, local etc...
Can you use LoadUserProfile() for this?
P Gibson wrote: and then the size/quota, date etc information.
In what context are you looking for? You might be able to get quota information, although it is not profile related, from here.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
Hello All,
is it possible to show an CMDIFrameWnd as or in an ActiveX.
The background is that i have an comm dll with this frame inside.
Now i will create an ActiveX which shows this frame.
|
|
|
|
|
|
Hi Friends
Yesterday also I have posted the same question but I didn't get any reply.
I have my dialog based application which shows one form and it contains one button. When I press the button I create new desktop and then use switch to the new desktop. Now I want to show one more dialog form in this newly created desktop. But I am unable to do it. is there a way to do same?
Or is there a way to give parent window or attaching it to other desktop?
I am pating my little code here so that you can have exact idea what I am doing.
//My CPP file
HDESK hOriginalThread;
HDESK hOriginalInput;
HDESK hNewDesktop;
// Save original ...
hOriginalThread = GetThreadDesktop(GetCurrentThreadId());
hOriginalInput = OpenInputDesktop(0, FALSE, DESKTOP_SWITCHDESKTOP);
// Create a new Desktop and switch to it
hNewDesktop = CreateDesktop("MYDesktop", NULL, NULL, 0, GENERIC_ALL, NULL);
SetThreadDesktop(hNewDesktop);
SwitchDesktop(hNewDesktop);
// Here I want to show my new dialog form
CMyDlg objDlg;
objDlg.DoModal(); or objDlg.ShowWindow(SW_SHOW);
// Restore original ...
SwitchDesktop(hOriginalInput);
SetThreadDesktop(hOriginalThread);
// Close the Desktop
CloseDesktop(hNewDesktop);
return 0;
Any idea how to achieve...
Regards
Mahesh
|
|
|
|
|
Hi,
I had a look to your problem yesterday, but could not find any satisfying answer to it.
Some questions:
Amarelia wrote: CMyDlg objDlg;
objDlg.DoModal(); or objDlg.ShowWindow(SW_SHOW);
Is CMyDlg your main dialog ? Do you want to create another instance of your main dialog in the new desktop ? or is it an instance of another child dialog ?
Other question : Do all SomehtingDesktop() functions you use in the provided code snippet return TRUE ?
~RaGE();
|
|
|
|
|
Hi Rage
First of all my heart felt thankx that you give some time to look into my question.
No CMyDlg is not my main dialog. It's another dialog whose any instance is yet not created. You can say it's another child dialog. Even if it's possible to show another instance of the same dialog in other desktop then also I will be little bit happy.
Yes my all SomethingDesktop functions execute perfectly and give TRUE value.
Anything else you want to know...I'll be glad to answer u'r questions...
Hope to see some positive answers
Mahesh
|
|
|
|
|
|
Hi,
I never used different desktops, but why not try ...
I've paste youre code into a test project and used the CAabout to show in the other desktop.
could used a warning that everithing would hang.
In my case the function SetThreadDesktop(hNewDesktop); fails giving me an
error code 170: meaning, requested rescource is busy.
When continueing the function SwitchDesktop(hNewDesktop); works switching the desktop.
But the main thread is still located running at the original desktop.
Sorry , don't know anything else to test. Will test some more
codito ergo sum
|
|
|
|
|
Hi, i would like to ask, if there is a way to add this controls for dynamically added CEDit.
i make do for example this :
my_CEdit = new CEdit();
DWORD dwStyle = WS_CHILD | WS_VISIBLE|WS_TABSTOP | ES_AUTOHSCROLL;
CRect rect(380,201,445,224);
my_CEdit->CreateEx(WS_EX_CLIENTEDGE,_T("EDIT"),"Test",dwStyle,rect,this,0,0);
But i don't know what how to apply DDV and DDX to this CEdit in DoDataExchange(CDataExchange* pDX) method.
|
|
|
|
|
I do not think this is possible, but I am not 100% positive about that. What do you want to achieve exactely ? Trap messages for a dynamically created CEdit ?
~RaGE();
|
|
|
|
|
You have to emulate what the DDX and DDV do in yur own code within the DoDataExchange function.
First, examine the pDX->m_bSaveAndValidate
To handle the 'ddx' part of your control, you could do something like this in code:
To properly handl the DDV, you should give your edit control an identifier.
my_CEdit->CreateEx(WS_EX_CLIENTEDGE,_T("EDIT"),"Test",dwStyle,rect,this,MY_EDIT_IDENTIFIER,0);
// transfer data to or from control and member variable
if( m_bSaveAndValidate ){
CString csTemp;
// prepare data exchange in case of abort
pDX->PrepareEditCtrl(MY_EDIT_IDENTIFIER);
my_CEdit->GetWindowText(csTemp);
// do some validation on the contents of the string
if( contents of string are 'bad' ){
// abort if it is bad data
pDX->Fail();
} else {
// data was good, so transfer to member variable
m_MyStringVariable = csTemp;
}
} else {
// transfer from member variable to control
my_CEdit->SetWindowText(m_MyStringVariable);
}
Okay so I winged this one, if there are syntax errors, fix them yourself
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|
|
Hi guys
I'm trying to do a tricky thing with CFileDialog but I don't know how to do it.
I want that once the dialog is opened, when I change the type of the file, the directory where the CFileDialog class looks for the files change for one that I decided before.
Ex:
If I choose "*.mdb" files look for files on "c:\mdb" directory
if I choose "*.txt" files go on "c:\txt" directory
Is this possible?
What I have to change?
Thanks
Doc
|
|
|
|
|
I think the best way to do it is to make your own file dialog that inherits from CFileDialog. Then you override the OnLBSelChangedNotify[^] function and in this function, you change the folder (for this part, I don't know exactly how to do it).
|
|
|
|
|
You could provide a hook procedure (see OFN_ENABLEHOOK ) and look for the WM_NOTIFY message.
On the other hand, this may not work to the extent that you desire. You can easily get the name of the selected file in the hook procedure. You could even go so far as to "click" the "Up One Level" button. You might even be able to plug a folder name into the edit control and "click" the "Open" button. Wouldn't hurt to try...
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
I am having a confusing problem, please see
double d = 34.637632;
float f;
when, i execute f = d;
it returns f = 34.6376 that's fine because float has less capacity than double so it stores as much as it can, and discards remaining ones.
Now see the real problem,
if.
float f = 34.6376;
double d;
when, i execute d = f; it returns d holding value of f but along with trainling numbers, which are different always.
d should be equal to 34.6376, but is not so, its 34.637669945068 or some thing like it.
if u closely look above number then u will find that in the begining it is 34.6376 which is f but the remaing ones are I dont know come from where or why?
what is the reason? How can i avoid this problem, i.e. double should hold the value of float, with no extra garbage?
Thanks
|
|
|
|
|
From MSDN:
Floating Conversions
An object of a floating type can be safely converted to a more precise floating
type — that is, the conversion causes no loss of significance.
For example, conversions from float to double or from double to long double are
safe, and the value is unchanged.
An object of a floating type can also be converted to a less precise type, if it
is in a range representable by that type. (See Floating Limits in Chapter 2 for
he ranges of floating types.)
If the original value cannot be represented precisely, it can be converted to
either the next higher or the next lower representable value.
If no such value exists, the result is undefined.
Consider the following example:
cout << (float)1E300 << endl;
The maximum value representable by type float is 3.402823466E38 — a much
smaller number than 1E300.
Therefore, the number is converted to infinity, and the result is 1.#INF.
What I think is that f=34.6376 is already "saved" as f=34.63759999, but you do
not see it explicitely. Try and debug-step through this:
float f=34.6376;
double d;
d=(double)f;
if (f==34.6376)
{
f=0;
}
if (d==34.6376)
{
d=0;
}
and you will see that it does not run into the if brackets.
~RaGE();
-- modified at 6:37 Thursday 26th January, 2006
|
|
|
|
|
Floating-point numbers are not stored in memory exactly as you might think. There is always a precision concern when storing a floating-point number in a binary computer. The float type only has 6-7 digits of precision, while the double type has 15-16 digits of precision. See the following MSDN articles for more: Q36068 and Q125056.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
|
Does anyone of you know what AFX stands for?
|
|
|
|