|
|
Thank you for your help it works now
Regards
DarkMarine
|
|
|
|
|
i've written a up/download monitor and i want to include a feature that allows be to monitor routers, has anybody an idea how to do that ?
Thanks
Mario
|
|
|
|
|
I never did something like that, but probably I would look how to use the SNMP (Simple Network Management Protocol) that is supported by the majority of routers, or maybe for home devices the new UPnP stuff can also provide some info.
Hope I'm right and it helps you a bit to find the way
|
|
|
|
|
Hi all,
I have developed a Dialog based application in VC6.0
As you all know the first dialog is a modal dialog.
I have created another dialog resource and called it as a modeless dialog from the main dialog window.
Now the problem is the modeless dialog won't minimize like the main dialog, rather it minimzes above the taskbar.
What I want is to minimize the modeless dialog like normal applications in the taskbar.
Please someone helpe me in this regard.
The Phantom.
|
|
|
|
|
Interesting. What do you mean above the taskbar?
Kuphryn
|
|
|
|
|
Hi,
Its a nice idea to reproduce the same problem yourself.
Make a dialog based application and then create a modeless dialog inside that dialog by calling Create(), then checkout what happen.
If you are interested then solve me this problem.
Thanks.
The Phantom.
|
|
|
|
|
hello guys
there's this program skinmagic toolkit for designing skins
it has the extention .smf , i'd like 2 know how 2 apply this skins 2 my writtin vc++ programs,is this file (.smf)
some kind of library that should be included,or i don't know i started the visual stuff only 2 weeks ago,thanx previously..
hail 2 all metal listeners...
|
|
|
|
|
This is a commercial application which I assume comes with comprehensive documentation. I suggest you start there.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Hi,
In my SDI application in a FormView I use two dialogs (multi-form application) one of them is dynamically selected at runtime.
So, I can't add any variables of the controls on the second dialog to my view class because it gives error at runtime as it can't associate that variable with the first dialog, because of the way the variables are defined, like as follows:
public:
//{{AFX_DATA(CFormTestView)
enum { IDD = IDD_DIALOG1 };
CEdit m_EditCtrl;
//}}AFX_DATA
Now my problem is: in the second dialog I have a list control and I want track dbl-click and rt-click messages from that control. So, I have a class CMyListCtrl which is subclassed from CListCtrl. As I can't have a variable of my List Control, how can I associate the List Control to CMyListCtrl so that I can handle the different Events?
Please advise
|
|
|
|
|
I don't want to change my design and make multiple views. Please help me on this:
I can't have a variable of a List Control (I know the resource ID), I want it to be an object of CMyListCtrl which is a class derived from CListCtrl.
Now, I have written handlers like the following:
void CMyListCtrl::OnEndLabelEdit(NMHDR* pNMHDR, LRESULT* pResult)
{
*pResult = TRUE;
}
How do I associate my Control to CMyListCtrl, so that these handlers are invoked? Please help, I'm stuck here
Thanks
|
|
|
|
|
<b)hi
i="" want="" to="" reproduce="" a="" wm_keydown="" manualy.
how="" can="" i="" do="" that.<="" b="">
|
|
|
|
|
Look at PostMessage().
"Sucks less" isn't progress - Kent Beck [^]
Awasu 1.1.1 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Hi All!
I need to handle a pressing keyboard event(hot key)when my application is inactive and let the current active application to handle it too.
How can I do that?
|
|
|
|
|
look at Win32 Hooks ... WH_KEYBOARD .. SetWindowsHookEx
you can capture any type of user command (at any time)
|
|
|
|
|
Thanks a lot for your help.
Could you please introduce me a good sample cod for that.
Best Regards,
Minoo
|
|
|
|
|
http://support.microsoft.com/default.aspx?scid=kb;en-us;66989
|
|
|
|
|
Probably you guys already know that but in case someone does not...
As we all know, while Win9x can only display the old-school "File Open/Save/Save As" dialogs, Win2000/XP are capable of displaying new style ones, of which there are 5 buttons located on the left side pane:
"History", "Desktop", "My Documents", "My Computer" and "My Network Places"
This new style CFileDialog not only looks nicer, but also provides much more convenience to the users, so why don't we all use it if the user's OS is Win2000 or WinXP? Well, the answer is how.
MFC does not seem to offer a way to display the new style CFileDialog , it always displays the old style regardless of the flags we specify, is that true? No.
In fact, MFC can display the new style, but for some reason it did not explicitly tell us how to, or maybe it did somewhere but who the hell could find the hints... Anyway, after some deep digging I finally found out that, it prbably will disappoint you, all we need to do is to add one single line of code into our project and voila! We have it ---- the pretty nice beautiful neat sexy new style dialog. Here is the code:
CFileDialog dlg(TRUE);
if (::GetVersion() < 0x80000000) dlg.m_ofn.lStructSize = 88;
dlg.DoModal();
So is that simple?
----------------------------------------
I saw a man saw a saw with a saw.
|
|
|
|
|
There are different versions of the OPENFILESTRUCT in different OSes. Changing that member is not safe - you're changing the "size of struct" value, but you don't actually have a larger struct like you're claiming to have. Good luck, hope it doesn't crash on your customers' systems.
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Ericahist updated (again) Sep 6!
|
|
|
|
|
First of all, I must apologize for the lack of detailed explanation in my original post,it was not an article but some little piece of information so I was trying to keep things as simple as possible, but as a result it may confuse or mislead the readers due to the over-simplicity.
So, while having a good point on "safety emphasis", Dear Michael Dunn, your comments were not entirely correct, here's why.
When we use a CFileDialog , an important step is to initialize its member data m_ofn , which is a instance of OPENFILENAME struct, whose definition is as below:
typedef struct tagOFN {
DWORD lStructSize;
DWORD Flags;
#if (_WIN32_WINNT >= 0x0500)
void * pvReserved;
DWORD dwReserved;
DWORD FlagsEx;
#endif // (_WIN32_WINNT >= 0x0500)
} OPENFILENAME, *LPOPENFILENAME;
The Flags is where we specify dialog styles and lStructSize is where we specify the struct instance size. The total size of data member before #if (_WIN32_WINNT >= 0x0500) is 76 bytes, of data reserved for Win2000/XP is 12 bytes (4 bytes* 3), so total size of each instance of OPENFILENAME is 88 bytes in Win2000/XP, and 76 bytes otherwise.
In my original post, before I actually changing the m_ofn size, I did carefully verify the OS version using ::GetVersion , I change the size to 88 if and only if the OS is Win2000/XP, so I don't see why my code would crash my customer's system.
|
|
|
|
|
(I'm assuming we're talking about MFC 6 here, btw)
No, when you create a CFileDialog variable, it contains an OPENFILENAME member. The size of this struct does not change because the code to create it is compiled into the MFC LIB or DLL. The value of lStructSize that you read is exactly the size of the contained struct. Changing your _WIN32_WINNT define doesn't recompile the MFC code, so it has no effect on that member.
So now look at what you have, m_ofn is a struct whose real, actual size is X bytes. You reset lStructSize to X+12 bytes, which is you saying that the struct is now 12 bytes larger and the data in those 12 bytes is usable. However, you have not changed the size of the struct in memory. The OS will go ahead and treat the struct as if it were larger, since it assumes you set lStructSize right. Who knows what is in those 12 bytes... you never initialized them (and you can't, because the struct isn't that big) so the result will be unpredictable.
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Ericahist updated (again) Sep 6!
|
|
|
|
|
Thanks for your comments and criticism, now I got one question, how do we show the new dialog style without setting lStructSize to 88?
|
|
|
|
|
It's too bad that your post will get buried in the bowels of history because this is a neat little tidbit of information. Even though it is only a little code snippet, maybe you could consider an article? Then this info will be easier to find when someone needs it.
CP really needs a code snippets section.
[edit]after reading Mike Dunn's post, I think he is right, but there must be a way to get it to work. Maybe deriving a class from CFileDialog, and substituting your own OPENFILENAME struct depending on the OS.[/edit]
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Hi,
In my SDI application I have a ListBox (NOT a ListControl) in one of the dialogs. I want to make this ListBox editable depending on the selection from a contextmenu. How do I make my ListBox editable?
Please help
|
|
|
|
|
From memory there is no in-place editing capabilities in ListBox. You could create an edit control and position it over the list item. You should find code here on CP to do that. Or switch to using a CListCtrl.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|