|
how i can make my programe change data with another applications for examble how i can get and give data from my programe to internet explorer or any programe by using MFC dialog Box?
|
|
|
|
|
Hai,
I'm doing a dialog based app in win32 vc++. I want to click my button using the mouse right button...how should i do this..pls help if anybody have any ideas..
|
|
|
|
|
Hello,
Just out od curiosity, why do you post the same question as M81?
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
I am the same person...
When I posted using the name M81, it said that the message cannot be posted because of duplicate name. So I changed to M66 and posted again..After when I checked I saw both of the message posted..i dont know what went on..sorry for that..I am not registered..I just peeped in and posted my question.
I am using win32..anyway i figured out a way using subclassing..
thanks a lot.
|
|
|
|
|
I need to write an app that receives video frames through my firewire port. When these frames are in my VRAM I need to set some pixels and then view this particular frame.
Is this possible on a modern PC?
What references are there for this subject? I'm not interested in the audio or any other video source, I just need Firewire..I guess this will be directshow right? I checked some examples on this site but they don't show my video directly.
|
|
|
|
|
How could I do this? I have tried the following, but I get debug assertion errors and the image does not get placed on the button.
<br />
HRESULT hResult;<br />
CImage buttonImage;<br />
hResult = buttonImage.Load("path...");<br />
if (FAILED(hResult)) {<br />
CString fmt;<br />
fmt.Format("Error loading image");<br />
AfxMessageBox(fmt);<br />
}<br />
HBITMAP imageHandle;<br />
buttonImage.Attach(imageHandle);<br />
myButton.SetBitmap(imageHandle);<br />
myButton.UpdateWindow();<br />
Any help would be appreciated. Thank you!
|
|
|
|
|
I'm not sure if I have your solution since I can't see a call stack. But I find it peculiar that you try to attach and update the myButton window even when the image fails to load. If the image doesn't load, you print an error but then you still try to attach the image to the button anyway. That should be within else {} in association with the if{FAILED(hResult)){ .... }. have you debugged and actually stepped through the code to verify whether or not the failure case is being taken? If so, have you seen the call stacks? What kind of info are you seeing in the call stack window while debugging? A lot of times, there is a useful comment in the MFC code where the ASSERT method causes the exception; if you are running in debug mode using visual studio.
Good luck!
Shawn
|
|
|
|
|
Thanks for the reply. When I copied the code over I removed some of it that wasn't really relevent, and I took out the return statement. At any rate, I have run the code through the debugger and I don't get any errors. The image loads fine, but it just does not show up on the button. I will check the call stack tomorrow when I get a chance and post my results.
|
|
|
|
|
I have a whole project in VC++ which has data being stored in binary format using the usual CArchive class. I need to have this data written in xml format without touching the present code i have. So i need to have a wraper class which would store/load data in xml format.
What would be the best way of doing this?
Need urgent help on it.
sv42
|
|
|
|
|
My first thought was to inherit from CArchive, make a CXmlArchive, but overriding the lower level
Save, Load, etc functions. But CArchive is non-virtual, so that is a dead end.
Another option is to Archive into a memory "file", or a temp file and then parse that into XML.
I assume you know the binary format?
Iain.
|
|
|
|
|
I created a class cxmlarchive inherited from CArchive, and Iam overriding most of the functionalities of CArchive. in the extraction and insertion operators, i am writing and reading from xml. Is there a problem with that?
When I write into xml, i use WriteString, but when Iam reading it back, I am not sure how I can do it. Can u help me with that?
|
|
|
|
|
Hello
i'm starting a project with a friend who work with delphi 7, and i don't know how difficult could it be to mix two languages; we decided to use dlls and a semi plugin framework to work, but for example: the way delphi data access is (at least for me) too much diferent; can i make classes in C++/MFC and use in delphi or viceversa?, could i make controls in delphi to use with C++/MFC?, etc.
Thanks in advance, i'll appreciate all your comments on this.
|
|
|
|
|
Hello,
Functions in C++ use the calling convention _cdecl (stack cleanup by caller) you should import those functions in Delphi specifing that calling convention.
For the Delphi functions, you should specify (in C++) the WINAPI calling convention (since the PASCAL calling convention is no longer supported in windows.h) when importing those functions.
From here you should know how to interface the 2 languages...
Hope this is of any help.
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
i have just only can found this
#include "win31.h"
#include "win95.h"
#include "evenmore.h"
#include "oldstuff.h"
#include "billrulz.h"
#define INSTALL = HARD
char make_prog_look_big[1600000];
void main()
{
while(!CRASHED)
{
display_copyright_message();
display_bill_rules_message();
do_nothing_loop();
if (first_time_installation)
{
make_50_megabyte_swapfile();
do_nothing_loop();
totally_screw_up_HPFS_file_system();
search_and_destroy_the_rest_of_OS/2();
hang_system();
}
write_something(anything);
display_copyright_message();
do_nothing_loop();
do_some_stuff();
if (still_not_crashed)
{
display_copyright_message();
do_nothing_loop();
basically_run_windows_3.1();
do_nothing_loop();
do_nothing_loop();
do_nothing_loop();
}
}
if (detect_cache())
disable_cache();
if (fast_cpu())
{
set_wait_states(lots);
set_mouse(speed, very_slow);
set_mouse(action, jumpy);
set_mouse(reaction, sometimes);
}
/* printf("Welcome to Windows 3.11"); */
/* printf("Welcome to Windows 95"); */
printf("Welcome to Windows 98");
if (system_ok())
{
bsod(random_err());
crash(to_dos_prompt);
}
else
system_memory = open("a:\swp0001.swp", O_CREATE);
while(something)
{
sleep(5);
get_user_input();
sleep(5);
act_on_user_input();
sleep(5);
}
create_general_protection_fault();
}
plz help , my teacher wants me to look for win98 source , and all i can find is that , so, is it source code of win98 ? and if its, plz tell me somethings about it . thanks
|
|
|
|
|
You have GOT to be kidding
Artificial intelligence is no match for natural
stupidity.
|
|
|
|
|
Oooops! Your teacher wants to crack the code and make a GNU OS Win98, yeah? I think that this code is good enough for him
Robert-Antonio
|
|
|
|
|
the_death wrote:
my teacher wants me to look for win98 source
Yeah right. No teacher would be that stupid, and if they are the should be sacked on the spot.
the_death wrote:
plz tell me somethings about it
It's a joke. A parody. Nothing more. It's been floating around on the net for years with some slight modifications for different Windows versions.
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"
|
|
|
|
|
You can find it right here at CodeProject! Almost all the sample source code at CodeProject will compile on Win98. And WinME, W2K and even XP!
Heck, some of it may even compile under Unix.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi,
There are some differences in Windows DLL & Unix Shared Lib .so .
Unix supports dangling references, but Windows DLL doesn't.
does anybody know how to handle dangling references?
Regards,
Praks.
|
|
|
|
|
What do you mean by dangling reference? Define that terminology please. Show me an example of what you mean. To me; dangling reference is a situation where dynamically allocated memory or resource is released, and yet other parts of the program still have pointers or handles to the freed resource.
Is that what you mean? Provide an example? How does UNIX support dangling references?
|
|
|
|
|
Hi
Thanks for reply.
Please refer following link for information regarding dangling refernces.
" Windows vs. Unix: Linking dynamic load modules " http://cphoenix.best.vwh.net/winvunix.html
I have written one Application which is attached to one shared memory.
Pointer " dp " points to that shared memory.
Also I have written one DLL which provides some functions. These functions refers shared memory thr' dp ptr.
Since DLL cann't access ' dp ' (though it is Global pointer ) directly , I have written one more function init_dp_dll_ptr in DLL like below.
static void *dp_dll;//This is local ptr of DLL.
__declspec (dllexport) init_dp_dll_ptr (void *dp_ptr)
{
dp_dll = dp_ptr;
}
But when I call init_dp_dll_ptr() from Main Application, I got segmentation fault at line " dp_dll = dp_ptr; "
I am not a VC progrmmer expert. Please let me know what wrong i have done.
Regards,
Praks
|
|
|
|
|
The concept of what you are doing is fine. I'm a little perplexed. I can't find anything on "segmentation fault" in the MSDN library. Here are some tips in case you haven't thought to try this.
I assume dp_dll is a pointer to a data structure or object. I assume you are using visual studio to setup your projects and Dlls. We do something very similar in our application here at work. We have one main MFC application which contains the GUI and many DLLs that contain some other levels of functionality. one of our Dlls, we call CommonDll and this is where set setup any global pointers that need to be available to all. So common utility functions are exported, the same way you have done so. Of course there are other interface functions that allow other Dlls to get a copy of the pointer. If your app is multithreaded, don't forget to use a CriticalSection or mutex to prevent threads from getting the pointer while it is being initialized.
First, check your project properties. Ensure that C/C++ / Code Generation / Struct member alignment is the same for all of your projects. We ran into major run time problems with this.
What kind of DLL have you setup? We seem to be able to do what you are doing (initialize a global pointer with an exported func within a Dll), very easily with an MFC extension Dll. Regular Dlls are different and have some special requirements for setting up your functions. You're function appears to be setup for an extension Dll so hopefully that is how you have set up your Dll. If not, recreate the Dll project as an MFC extension dll. By default, my visual studio .net selects regular dll and then I have to specifically remember to change this while walking through the project creation wizard.
There is plenty of documentation on dlls within the MSDN library if you need more to read. Just search on regular dll or extension dll.
Hope some of that points you in the right direction.
|
|
|
|
|
How can i exit Windows in StandBy
and in Suspend to Disk ?
The ExitWindowsEX didn't have a flag for it !
Thanxs
rajesh
|
|
|
|
|
Narf!
The SetSystemPowerState function suspends the system by shutting power down. Depending on the ForceFlag parameter, the function either suspends operation immediately or requests permission from all applications and device drivers before doing so.
The SetSuspendState function suspends the system by shutting power down. Depending on the Hibernate parameter, the system either enters a suspend (sleep) state or hibernation (S4).
|
|
|
|
|
Please Help!!!!!!
i just cannot Handle any mouse movements on the status area icon that i created using Shell_NotifyIcon
Seejoy Jose
|
|
|
|