|
Is not saving my information, why?
|
|
|
|
|
CosmoS2k wrote:
Problems with ReleaseDC
ReleaseDC? In MC++?
Nish
The posting stats are now in PDF:-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
Updated - May 04th, Saturday
|
|
|
|
|
In VC++ 7, i'm only having this problem under VC++ 7.
|
|
|
|
|
Hello guys
If you are using IJW in a windows GUI application with a WinMain instead of a main, do not run the program from the VS.NET environment. Run the exe from the command line or using explorer. The VC++.NET debugger seems to be confused by the combined use of native types and managed types.
This has been my sad experience over the past 2-3 hours
Regards
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
I guess the problem lay elsewhere. I had the same problem with a C# project I tried and also a win32 console program I tried. Seems, something has gone wrong with my VS .NET
I am thinking of doing a re-install on top of the existing install.
Any suggestions?
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
No suggestions but I know how you feel I had to install everything again. My windows 2000 is dead, I am installing XP right now!
Al
|
|
|
|
|
My problems were caused due to one of the services that Zone Alarm installs. If I stop that service, then all is well.
Nish
The posting stats are now in PDF:-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
Updated - May 04th, Saturday
|
|
|
|
|
Windows XP has a good firewall, why are you using Zone Alarm? Do you think I need that?
Thanks
Al
|
|
|
|
|
Albert Pascual wrote:
Windows XP has a good firewall, why are you using Zone Alarm? Do you think I need that?
I am thinking of uninstalling zonealarm.
But what's this XP firewall everyone talks about?
I can't seem to find it anywhere!
Nish
The posting stats are now in PDF:-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
Updated - May 04th, Saturday
|
|
|
|
|
Steps to find it!!
Open Control Panel
Switch to classic view
Network connections
Properties of the network you are using
Advance TAB
Settings
Did you find it?
Al
|
|
|
|
|
|
Hello
If you use main or _tmain then your code will be basically a console app. Even if you use Application::Run to bring up a form, the ugly console will lurk behind.
The solution is to use WinMain() instead of _tmain(). This was all very fine till I started using IJW. I need to #include <windows.h>
But the moment I #include <windows.h> I get the compile error that says :-
d:\Projects\Capture01\Capture01.cpp(22): error C2731: 'WinMain' : function cannot be overloaded
( (
Can anyone offer a solution?
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
Blast.
I didn't think properly I guess.
Problem solved.
Used dummy args
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
Well just go to linker options and add the following line to the command line /subsystem:windows, you will have a windows application with _tmain, or you can also try the reverse with /subsystem:console
|
|
|
|
|
Rama Krishna wrote:
Well just go to linker options and add the following line to the command line /subsystem:windows, you will have a windows application with _tmain, or you can also try the reverse with /subsystem:console
Thanks Rama,
I didn't know that worked on C++ too Thought that was a C# thing
Nish
The posting stats are now in PDF:-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
Updated - May 04th, Saturday
|
|
|
|
|
Rama Krishna wrote:
add the following line to the command line /subsystem:windows, you will have a windows application with _tmain
This didnt work on VS .NET academic and VS .NET beta 2.
If you use the linker option - /subsystem:windows, it expects to find a WinMain.
Nish
The posting stats are now in PDF:-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
Updated - May 04th, Saturday
|
|
|
|
|
I have been doing this for quite sometime. Can you mail me the project
|
|
|
|
|
There is nothing special needed Rama.
Just create a new MC++ project. And #include windows.h
The default one would do.
Now add /subsystem:windows to the linker command line options.
The MC++ program should have only a _tmain() and not a WinMain().
The linker would say that, WinMain is missing.
The problem is basically with #including windows.h
For normal programs, what you say might work. But for MC++ programs that use IJW, your technique won't work
Nish
The posting stats are now in PDF:-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
Updated - May 04th, Saturday
|
|
|
|
|
I came to office just to check this out Just kidding I came here to complete my screen saver. Anyway you are right about /subsystem but the work around for that is to add the following two settings
/substem:windows /entry:mainCRTStartup
this would fix the problems.
I wanted to write an article about compiler and linker settings since the days of CodeGuru but never got a chance.
|
|
|
|
|
|
Not that I know of, you can use the same technique you use in GDI though.
BTW, congrats on having post #100
James
Simplicity Rules!
|
|
|
|
|
James T. Johnson wrote:
Not that I know of, you can use the same technique you use in GDI though
As if I know how to do that with GDI
James T. Johnson wrote:
BTW, congrats on having post #100
I guess no one would believe me if I said that it was entirely accidental
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
Nish [BusterBoy] wrote:
As if I know how to do that with GDI
Ask (ok imply) and ye shall receive
Courtesy of MSDN
hdcScreen = CreateDC("DISPLAY", NULL, NULL, NULL);
hdcCompatible = CreateCompatibleDC(hdcScreen);
hbmScreen = CreateCompatibleBitmap(hdcScreen,
GetDeviceCaps(hdcScreen, HORZRES),
GetDeviceCaps(hdcScreen, VERTRES));
if (hbmScreen == 0)
errhandler("hbmScreen", hwnd);
if (!SelectObject(hdcCompatible, hbmScreen))
errhandler("Compatible Bitmap Selection", hwnd);
ShowWindow(hwnd, SW_HIDE);
if (!BitBlt(hdcCompatible,
0,0,
bmp.bmWidth, bmp.bmHeight,
hdcScreen,
0,0,
SRCCOPY))
errhandler("Screen to Compat Blt Failed", hwnd);
ShowWindow(hwnd, SW_SHOW); James
Simplicity Rules!
[Edit: You obviously won't need the calls to ShowWindow, you can just call Show and Hide on the form ]
|
|
|
|
|
James T. Johnson wrote:
Copy color data for the entire display into a bitmap that is selected into a compatible DC.
Bit confusing there. What's a bitmap object. Later I see that it is an object because you use two members, bmWidth and bmHeight. And how do I select it into a compatible DC?
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
I don't know, like i said it was just a copy/paste of code in MSDN, I suppose you could replace bmp.bmWidth with GetDeviceCaps(hdcScreen, HORZRES); and bmp.bmHeight with GetDeviceCaps(hdcScreen, VERTRES);
James
Simplicity Rules!
|
|
|
|