|
I have just got visual basic C++ and all of the tutorials that i have read and have tried the stuff that they have writen in it says that there are errors and none of the stuff they have work.
can any one help me with this problem
|
|
|
|
|
sure - read the tutorials again.
Seriously, you've not given us much to go on. What errors ? What are you trying to do ? It's bound to be a mistake with your interpretation, it's doubtful that all the tutorials you've found are broken.
Whats 'visual basic C++' ???
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Maybe 'visual cafe delphi' ...
Maxwell Chen
|
|
|
|
|
i want to know how to transform bmp file to jpg file, and jpg file to bmp. Can you give me some information and source code about these? thank you.
|
|
|
|
|
GDI+ will do this for you. Otherwise, the source code is way too big to post here. Download paintlib or something if you must.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
BMP to JPG:-
Graphics graphics(hdc);
Image image(L"Mosaic.bmp");
graphics.DrawImage(&image, 10, 10);
CLSID pngClsid;
GetEncoderClsid(L"image/jpg", &pngClsid);
image.Save(L"pubudu.jpg", &pngClsid, NULL);
|
|
|
|
|
There is no direct method to do it in VC++. U can easily do it using GDI+.
Instead that if u want to do it in VC++ itself, then go for Intel Graphics Library. Add it to ur project. This is one of the way we have to do that.
http://developer.intel.com/software/products/perflib/ijl/
and u can check this in CP also
http://www.codeproject.com/bitmap/CXImage.asp#options
and other freeimage libraries can be helpfull to u.
ComputerNewton
|
|
|
|
|
I am trying to determine the classname for a program since the program's title changes depending on what file is open. I have MSVS and tried Spy++ but that classname didnt work for some reason. I am trying to do something like this (set for calculator for test purposes)
HWND hWnd1;
hWnd1 = FindWindow("SciCalc", NULL);
SendMessage(hWnd1, WM_CLOSE,0,0);
Now SciCalc is the classname Spy++ shows but it wont even shut down calculator, whereas if I put the application name as "Calculator" then it will close the program.
So I guess my question is how can I determine a classname to use with FindWindow.
|
|
|
|
|
IronMaiden420 wrote:
So I guess my question is how can I determine a classname to use with FindWindow.
FindWindow has 2 inputs ,classname and windowtitle....
So you should know either of them.
Generally in mfc application where you want to lookup an window you "custom" register a class and give that classname in precreatewindow event.
this way you are sure which window you are looking for as you know the class name.
God is Real, unless declared Integer.
|
|
|
|
|
I'm aware of that but if its a program that I didn't create then how can I find out the class name?
|
|
|
|
|
(Sorry about my earlier answer, my brain was still asleep from lunch)
You should still use spy++ though.
BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam )
{
TCHAR szText[MAX_PATH] = {0};
if ( !GetClassName(hwnd, szText, MAX_PATH - 1) )
return TRUE;
if ( _tcsicmp(szText, TEXT("SciCalc")) == 0 )
{
MessageBox(0, "Calc is running", "Test", 0);
return FALSE;
}
return TRUE;
}
void look_for_calc()
{
EnumWindows(EnumWindowsProc, 0);
}
---
"Man will never be free until the last king is strangled with the entrails of the last priest". -- Denis Diderot
|
|
|
|
|
Dear all,
This is not MFC problem.
I used a program in the lab.
The program was written by Win32 and multiple document interface.
In my debugging, I found some unreliable problem.
I used both WM_MOUSEMOVE and WM_LBUTTONDBCKL in the child window procedure.
The double clicking mouse button and WM_MOUSEMOVE was sent to the procedure. Sometimes(quite often), WM_MOUSEMOVE was not sent to the window so my procedure was not executed even in the debugging mode(by entering breakline in line by line).
I would like to know the standard usage of WM_MOUSEMOVE in the MDI.
Does anyone know that what situation in my program?
Thank you in advance.
Lee
?
|
|
|
|
|
Make sure the window has the input focus and is above the other windows.
John
|
|
|
|
|
I am trying to programmatically start the Search Assistant from my code. I need a method that will work on Win 9x/Me/NT4/2000/XP/2003.
Any ideas ?
I use C and Win32 API.
Thanks
|
|
|
|
|
hain i can give you login only try using FindFileFirst And FindFileNExt api this will rather help u in creating you r own search routine
Alok Gupta
'I Think It Work'
visit me at http://alok.stormpages.com
|
|
|
|
|
Hi,
I am working on a very complex C++ application where I need to implement a custom ListView window control that has fairly large bitmaps (124x98) instead of icons. I can't use MFC or .NET and the application has to be able to run on platforms as old as Windows95. Has anyone ever tried to do anything like this and if so, would you have a code snippet or advice for me? I'm having some trouble getting the CustomDraw functionality to work in the manner I have described.
|
|
|
|
|
i am just wondering regarding visual studio 2002, with mfc 7.0
is it compatible with all Windows clients from 95 to XP.
Do the mfc runtime dlls support Windows 95 ?
If not, whats the recommended workaround,
re-compile the application under mfc 6 ?
|
|
|
|
|
It's just a dll, so my guess would be that it's fine. BUT Microsoft don't support Windows 9x anymore, so if it doesn't work, you're on your own.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Hello, i was wondering if it is possible to to convert a DWORD _stdcall to a void pointer-to-function?
-Ryan M.
|
|
|
|
|
<font style="color:blue;">typedef long int </font>DWORD;
there is no pointer in that expression, and less "pointer-to-funtion"... what do you mean ?
TOXCCT >>> GEII power
|
|
|
|
|
sorry, i didn't see the _stdcall.
use :
<font style="color:blue;">reinterpret_cast</font><<font style="color:blue;">void</font>>(your_expression)
even if i don't imagine my you'd need such...
could you help me ?
TOXCCT >>> GEII power
|
|
|
|
|
In general no.
The reason is that when you cast things such as this, you run a great risk of changing the calling convention and thus trashing your stack.
However, there are a few cases where this works. But in general, it is very bad idea.
Why would you want to do this?
(The reason I ask is because 9 times out of 10, when someone asks this question it is because they can't get their code to compile because they aren't doing something right.)
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
There once was an article by Shaun Miller titled "Generating and Deploying Debug Symbols with Microsoft Visual C++ 6.0" that described how to generate executables and debug symbols that could be transferred to another machine for debugging. As with all things Microsoft, sometimes it worked and sometimes it didn't. At least when it didn't, a message box usually gave some indication of what it thought the problem was: it couldn't locate the PDB file, it couldn't locate information for the module in the PDB file, etc.
The information in that article doesn't apply to .NET. Here is the email that I received from MSDN Online when I contacted them about problems debugging on a system other than the one used to build:
>>Hello,
>>
>>Thank you for your patience in waiting for our reply.
>>The topic in question is not intended to work with Visual Studio .NET;
>>as in the title, it is specific to Visual C++ 6.0.
>>Hope this clears up the issue. Thanks again!
>>Liezel
>>MSDN
>>http://msdn.microsoft.com/
(It should have added: "P.S. F--k you!)
VC++ .NET doesn't believe in messages. The developer is given as little information as possible. Instead of a message box, attempting to set a breakpoint simply displays the familiar red dot with an oh-so-cute question mark in it. Tracing into the function displays assembly code. The context menu has "Go to source" grayed out. No explanation. No message. No help. No option. F--k you.
The DLL and its PDB file were built together on a different system than the one used to debug (this is a necessity when you develop systems with many different configurations of hardware that control physical devices such as lights, cameras, moving parts, etc.) The DLL and its PDB file are in the same folder on the system used to debug. Other DLLs and their PDB files are in the folder with the problem one, yet they don't exhibit the problem.
How does one generate and deploy C++ .NET executables and associated debug symbols to another system? How does one determine the source of the problem when a breakpoint displays a question mark or the "Go to source" menu item is grayed out?
|
|
|
|
|
Hello.Can anybody explain to me how can obtain the names of imported functions in a process if the originalfirstthunk is set to zero? .If can put an example, better.Thanks all;)
|
|
|
|
|
I wonder if anyone can help about a very general question that I have about parsing.
I would like to know if anyone knows of any articales or techniques for an elegant parsing method where the parsing is based on a dynamic parsing template.
The type of parsing that I am interested in is one that does not involve the usual gramatical or precedent type of parse that you might find in a stack based or recusive descent parser.
I am looking for a parsing technique where it is possible to specify a template comprising the specification of ints, strings and or possibly a stack of keywords that may or may not be present, of which one might be default ... etc and that kind of thing.
As I say, my question is very broad as I do not have very much expertise in designing this type of parsing mechanism.
In short, the idea is that a number of different functions must be able to provide a text based argument, that can be parsed by a common parser for a specific ( but dynamic ) pattern.
Thanks in advance.
Anyone who may have any pointers or ideas of articales that might help, would be very much appreciated.
Best regards.
James
|
|
|
|