|
I'm still stuck on getting this very interesting code to compile. I was hoping someone would type in the missing main function for me and let me know what else I need to do to get this going.
Thanks, Dave
VC++ 6.0
|
|
|
|
|
Thanks John, I've been reading up on vector containers in the STL as you mentioned...very fascinating.
Thanks, Dave
|
|
|
|
|
Is there anyway to verify a property page is created before I called RemovePage(), and is there anyway to insert a page (like between page 2 and 3)in the property pages? Thank you!
|
|
|
|
|
skinnyreptile wrote:
Is there anyway to verify a property page is created before I called RemovePage(),
if (::IsWindow(m_pOptionsPage->m_hWnd) == TRUE)
RemovePage(GetPageIndex(m_pOptionsPage));
skinnyreptile wrote:
is there anyway to insert a page (like between page 2 and 3)in the property pages?
Not that I know of.
|
|
|
|
|
I want to open a modeless dialog from a DLL.
The DLL is a MFC DLL and contains a CWinApp
In the DLL this code is run to create the dialog
void CShowDlg::Show()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CMyDlg* pDlg = new CMyDlg();
CMyDlg->Create( IDD_MYDLG , NULL );
CMyDlg->ModifyStyleEx( 0 , WS_EX_APPWINDOW );
CMyDlg->ShowWindow( SW_SHOW );
} It Works. But the dialog is ALWAYS on top the main app. Since this dialog can be rater big it’s not good.
But if I comment out the creations of the CWinApp.
The dialog acts like any other window and can be sent to back and so.
But Then I get some other problem.
Some places in the code in the DLL is running CWaitCursor, and it is calling AfxGetApp();
Which returns NULL since theApp it out commented.
The only solution I found was to keep the CWinApp ( theApp ) and then create a new thread ( CWinThread ) and let that thread create the dialog.
Now everything works. But I got 2 extra thread just to open the dialog. And I think that one should be enough. or ?
Anyone have any ides/tips ?
|
|
|
|
|
Hi everyone,
I have a question regarding window sizes. Is there a restriction to the maximum size a window can be? I have a custom control with child windows and a zooming control. I noticed that on large zooms, my window does not show the right size. I am guessing that after 2^15 pixels, it refuses to resize it anymore. Is that true and is there a way around it?
Thanks for any help you might give me.
Without struggle, there is no progress
|
|
|
|
|
The WM_SIZE message uses the lParam to store the width and the height of the window. Since lParam is 32-bit wide (typedef unsigned long DWORD;typedef DWORD LPARAM; ), I suppose width and height shouldn't exceed 2^16-1 pixels.
We do not inherit the Earth from our ancestors, we borrow it from our children - Antoine de Saint-Exupéry (1900-1944)
|
|
|
|
|
A friend has a USB device that he wants to support under Windows without dealing with the DDK and writing a device driver. The device is a data logger and he wants to talk to it in the same way he would if it were on an RS-232 port or a TCP/IP socket. He has working code for this on MacOSX using Apple's IOKit and on Linux using libusb. Is there an equivalent API for accessing a USB port in this way under Windows?
|
|
|
|
|
No. I believe a process must communicate to a USB device through its device driver.
Kuphryn
|
|
|
|
|
That's the sense I've gotten. I have a sense that the Windows model treats the USB bus like the PCI bus with no way to talk directly to devices.
Unfortunately, there's no device driver for this unit. My friend is writing an open-source support library for it and it's been trivial to support it under MacOSX and linux without writing a device driver. I guess windows just won't make it.
|
|
|
|
|
I needed to add a tool entry in the Tools category where I need to
1 . Import certain files from a directory (SourceSafe) into my project
2 . Add an Import statement to my stdafx.h file
Is there some API method or MACRO to do this .
Please help
|
|
|
|
|
Hello,
This may seem like a weird question but I was wondering if we can produce the unsigned long from a dotted IP address? Basically the reverse of inet_ntoa.. it converts the unsigned long to a dotted ip address..
Any ideas?
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
inet_addr() on Win32
inet_aton() or inet_pton() on Unix/Linux
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
That was too easy.. THANKS!
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
You're welcome
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Anybody know of any free C or C++ libraries that deal with SSH?
Regards,
Brian Dela
|
|
|
|
|
Try freessh.org and openssh.org.
|
|
|
|
|
Thanks
Regards,
Brian Dela
|
|
|
|
|
I am creating an install program for my screensaver that I made. The problem I am having, is I want the windows screensaver dialog pop up, with MY screensaver set as the active one, displayed in front of me, like what happens when you right click on a screensaver to install. What do I do?
I looked for examples of screensavers on Code Project here, and I find screensaver source codes, but no install program source code.
I hope you know what I'm referring to, and I would appreciate any help.
|
|
|
|
|
Write to the registry: "HKEY_CURRENT_USER\Control Panel\Desktop" with the "SCRNSAVE.EXE" value name. This holds the path of your screensaver executable file.
Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Does that cause the screensaver dialog box to pop up automatically?
|
|
|
|
|
No. To do that you need to use Rundll32.exe to run the "display.cpl" control panel application opened to the screensaver page (page 3, 0-indexed) Use this command line:
rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,2
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Awesome! Thank you so much.
|
|
|
|
|
You're welcome.
I will mention that that command line string has worked since Win95, but might show the wrong page. Just change the number at the end of the string to get the correct page
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I'm very interested to know where you learned something like that ... That's not something one can discover by himself, is it ?
~RaGE();
|
|
|
|