|
Thanks - that works a treat. Next question though, how can I create an OnClick Event Handler for this button that will distinguish between the different Buttons I have created from the original Button object?
|
|
|
|
|
blinkered wrote:
m_Button.Create("My button", WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,
CRect(10,10,100,30), this, 1);
it working fine here in my test project,what ASSERTION notice are you getting.Second put a valid ID of button instead of Putting ID=1
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
I have an mFC dll into which I want to use mysql. So in the projrct settings c++ tab in project options i put:
"C:\mysql\mysql-noinstall-4.1.10-win32\mysql-4.1.10-win32\include" /
but the compiler says:
Command line warning D4002 : ignoring unknown option '/'<br />
Command line warning D4024 : unrecognized source file type 'C:\mysql\mysql-noinstall-4.1.10-win32\mysql-4.1.10-win32\include', object file assumed<br />
Command line warning D4027 : source file 'C:\mysql\mysql-noinstall-4.1.10-win32\mysql-4.1.10-win32\include' ignored
Project options now look like:
/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_MBCS" /D "_USRDLL" /Fo"Release/" /Fd"Release/" /FD / "C:\mysql\mysql-noinstall-4.1.10-win32\mysql-4.1.10-win32\include" /c
used to look like the foll before i put in mysql, and it compiled fine
Thanks for helping,
sb
/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_MBCS" /D "_USRDLL" /Fo"Release/" /Fd"Release/" /FD /c
|
|
|
|
|
ns wrote:
"C:\mysql\mysql-noinstall-4.1.10-win32\mysql-4.1.10-win32\include" /
The compiler will attempt to interpret this as a parameter. Since there is no flag before the path name, it assumes it is a file that it needs to compile. The '/' by itself will be interpreted as an invalid parameter. If your intention is to add a folder to the list of folders to search for header files in, use:
/I"C:\mysql\mysql-noinstall-4.1.10-win32\mysql-4.1.10-win32\include"
or add the folder to the include folder list in the program options.
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"
|
|
|
|
|
Hi, i have a control on my dialog which implements the IWebBrowser interface, but im having great difficulty getting dragging or copying to work from any page! As a test, im trying to drag the main google image from "www.google.co.uk". I have an example from http://www.codeguru.com/Cpp/I-N/internet/browsercontrol/article.php/c3379/[^] and that example works fine, you can drag to images to the desktop etc. The only difference i can see is that the example is in a View, and my code is in a Dialog.
Any help on the subject much appreciated!
Skute
|
|
|
|
|
How can I determine the folder where the .exe file is saved?
I must do this without the registry due to goofy security
restrictions on the PC where this app will run.
|
|
|
|
|
<br />
TCHAR lpszPath[MAX_PATH] = {0};<br />
DWORD dwResult = ::GetModuleFileName(AfxGetInstanceHandle(), lpszPath, MAX_PATH);<br />
|
|
|
|
|
Thank you!!!
That does exactly what I need.
|
|
|
|
|
You're asking for two different things there. I take "startup folder" to mean the "current directory" of the process, which doesn't have to be the same as the dir where the EXE is. If you want the current directory, call GetCurrentDirectory() .
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
|
I develope a DLL that is loaded with every instance of Internet Explorer. In the DLL, I want to handle something like "BeforeNavigate" event to get the URL user enter in the Adress Bar.
I've written this DLL before in C#. And in C#, handle this event is quite easy, just write something like:
WebBrowser browser;
browser.BeforeNavigate2 += new DWebBrowserEvents2_BeforeNavigate2EventHandle(this.BeforeNavigate);
But now, I have to write it in Visual C++ 6.0. How can I handle this event in Visual C++ 6.0?
Hope to see your replies soon.
Thanks.
|
|
|
|
|
|
Hi,
I have a windows which accepts file names being dragged in (Drag AcceptFiles, OnDropFile..).
Everything works as intended when a file name is dropped from the explorer window or another window which has list of files/folders. However, when the user drags an image from a website, or an attachment from an e-mail and drops it on the Window, OnDropFile is called and a temporary folder/file name is given to the window. I need to recognize when this happens and alert the user - how can I recognize the folder as a temporary one - The location of the TEMP folder is dependent on the OS, but also seems to depend on the application - e.g. Outlook has its own temp folder, the browser uses another etc.
Thanks in advance for any help
|
|
|
|
|
I am not sure there is ANY way to tell whatsoever, but a first good guess, assuming an application followed the proper API would be to call GetFileAttributes and check for this bit set : FILE_ATTRIBUTE_TEMPORARY
Now, granted, I have never checked for this bit, and it would be curious to see if any 'temporary' files actually have it set or not.
|
|
|
|
|
Thanks.
I will try and see what I find.
|
|
|
|
|
I've downloaded and made the lib files of the CxImage library but I can't seem to make it work. I put the .lib in the object/library modules of the link tab in the general and input category but it still doesn't recognise the the CxImage object. Can anyone help me?
Should I write anything else in the code?
|
|
|
|
|
Why do you ask this here? CxImage has it's own article forum for these questions.
Don't try it, just do it!
|
|
|
|
|
Hi Friends
I am developing an application in VC++,wherein i want that if the system remains idle for an X amount of time then some event should be generated
But for that can somebody help me in knowing how to trap System idle time IN MFC
Thanks in Advance
VC++
|
|
|
|
|
Check out GetLastInputInfo() . There's also the idle triggers when working with scheduled tasks.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
You could retrieve the cpu times with a timer function and check what percentage of the increment was for the idle process.
The API for NT/2k/XP is NtQuerySystemInformation.
Don't try it, just do it!
|
|
|
|
|
I have got an application, which changes the resolution of the computer(may sound like spyware etc... but it's just used internally).
The problem is that the Taskbar keeps flowing around in the middle of the screen. Is there any way to get a handle to the taskbar.
With Spy++ I found out that the WndClass is "Shell_TrayWnd". Does this help ?
As I said.. it's no adware / spyware or something I like that.. I hate those programs like we all do.
All the label says is that this stuff contains chemicals "... known to the State of California to cause cancer in rats and low-income test subjects." Roger Wright http://www.codeproject.com/lounge.asp?select=965687&exp=5&fr=1#xx965687xx
|
|
|
|
|
Use FindWindow() or FindWindowEx() .
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
HWND hTB = ::FindWindow("Shell_TrayWnd", NULL);
SkyWalker
|
|
|
|
|
I want to capture video frames that is played by
Mediaplayer or other players.
Can anyone tell me how to do?
|
|
|
|
|
MCI_CAPTURE - use this command in the mciSendCommand()
this may help. just try that.
Zxczc
|
|
|
|