|
i explain:
click a .cpp file, if VC was installed, then VC pops up and displays the .cpp. if borland was installed ...
so, .cpp file is related VC or Borland.
if i develop a nodepad, how do i make .cpp etc related to my application? i guess it is something in register but ...?
thx
includeh10
|
|
|
|
|
Dunno if it is the correct key, but you might try HKEY_CLASSES_ROOT\cppfile\shell\&Open with MSDev
modified 12-Sep-18 21:01pm.
|
|
|
|
|
thx, that is right i think.
i.e. in .java i found "JCreator.java", but why jcreate.java, not jcreate.exe?
there should be more. i.e. i click my.txt (if it is related to MyApp.exe), how system passes the file name "my.txt" to MyApp.exe, from command line?
includeh10
|
|
|
|
|
First you'll need to come up with a "document name".
Something like MyFunkyAppDocType or whatever. Then
create a key under HKEY_CLASSES_ROOT by that name.
Under that key create keys Shell\open\command.
Set the default value to the command line to open
the document type. e.g. "C:\Program Files\MyFunkyApp %1"
Next, under HKEY_CLASSES_ROOT you'll see all the extensions
with associations. Just place the extension you want
associated there as a new key, and set the default value
to your document name.
But don't step on other associations without ok from the user.
i.e. check that your document name is unique. check that
the association is free or the user is willing to allow you
to overwrite it.
|
|
|
|
|
there is not WS_SYSMENU in my dialog,and the dialog app have no system icon and system menu.
how can i set the system icon or system menu?
and SetIcon() can not work.
please help me.
|
|
|
|
|
If you made this dialog in the resource editor then you have a choice of system menu which you can add.
|
|
|
|
|
|
Hi, everyone!
I have read some books about VC network programming, but in
them there are only basic samples (just to show the usage of API).
I want to know where can I get some sample codes of some more practical
samples? I want to learn socket programming.
Where can I get the codes and related explanations?
Cheers,
George
|
|
|
|
|
Try this link...there are many sample winsock apps out there, I was searching for them a few weeks ago and found hundreds of them...here is a good starting point though: http://tangentsoft.net/wskfaq/ Go to Yahoo and search winsock you will see what I am talking about.
|
|
|
|
|
Thanks, georgiek50 pal!
It is a very nice site!
Cheers,
George
|
|
|
|
|
What Windows network programming books did you read? I recommend Network Programming for Microsoft Windows, Second Edition by Anthony Jones and Jim Ohmund.
CodeProject has a network programming section with very good examples.
http://www.codeproject.com/internet/
Kuphryn
|
|
|
|
|
Thanks, Kuphryn pal!
Your recommendation is very nice!
Cheers,
George
|
|
|
|
|
When I debug my program, it says something like thread so-and-so has exited with code ######. There aren't any memory leaks but I don't know what the exit code means. Is there a list somewhere of what the codes are or does it really not tell you anything?
There's always one more bug.
|
|
|
|
|
Hi
Is there anyway to get accelerators working on a pure dialog application..
I've seen some notes about hooking into the message process but no examples of it..
I'm not using MFC.
Cheers
Chris
|
|
|
|
|
Have you tried changing your message loop to:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(hwnd, hAccel, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
I haven't actually written any apps with a pure dialog but this is what works for the other ones, and if it is a modeless dialog box then the same but you also need:
while (Getmessage...like above
{
if (hDlgModeless == 0 || !IsDialogMessage(hDlgModeless, &msg))
{
if (!Translate...like above
{
}
}
}
This is straight from Petzold's book...page 522. Hope this helps.
|
|
|
|
|
I'm a newbie in creating DLL projects and can't seem to solve this problem. I am using a similar technique to Steve Driessen's article[^].
I'm trying to create a DLL that exports a couple of classes that uses some MFC collection objects, but I keep on getting this warning:
<br />
warning C4251: 'CGifParser::m_aData' : class 'CArray<TYPE,ARG_TYPE>' needs to have dll-interface to be used by clients of class 'CGifParser'<br />
(m_aData) is a CArray that is a member of CGifParser, the class I'm trying to export).
The test program works correctly on a debug build, but not on a release build when testing the DLL.
I'm just trying to create a simple library so that I can reuse the code in other projects easier. Visual Studio .Net complicates everything! I first attempted this by trying to create a static library (.lib) but I got all these duplicate declaration errors from the standard C++ libraries. I'm use to simple command line linkers on Unix =).
Thanks.
- Anatari
|
|
|
|
|
This means the base class (CArray) was not declared to be exported. Try adding a line like:
template class __declspec(dllexport) CArray<Arraydata, Arraydata>;
Hope that will fix it..
/moliate
The corners of my eyes catch hasty, bloodless motion -
a mouse?
Well, certainly a peripheral of some kind.
Neil Gaiman - Cold Colours
|
|
|
|
|
Hi, I wrote my program using Visual Studio 6 and on Win98.
I used lots of new operator to allocate my object on heap and also to allocate a block of heap and use pointer/array that sorta thing,
everything works just fine and I never had any problem using the new []/delete[] thingy
but when I move my code to WinXP, everything is crash and burn, when I trace and debug it, sometimes my variables/member variables changed its value without any good reason. And sometimes I can't even delete my object
I've allready trace and debug it so that there are no mem. leaks and stuff, but the problem is still the same, and I've read that in WinNT(XP) it uses different dynamic heap managing method.
Is it true ?? so how do you manage your heap in your program in WinXP ??
Is there a safe way (just simple compiler/linker options) to make sure that my heap allocation runs correctly ?? without making any modifications to your code ??
|
|
|
|
|
Hi, I made a "chm" file for my application using Microsoft HTML help toolkits , it looked cool and all, the only problem was that I don't know what parameters, if any, can be used to specify(at runtime) which html page(suppose the chm file consists of multiple html pages) I want to display.
For example, my app has some CPropertyPage derived classes, pressing the "Help" button while different property page is active should display different help contents, right?
How can I do so? Thanks.
|
|
|
|
|
|
|
::ShellExecute(NULL,
"open",
"hh.exe",
"foo.chm::/bar.htm",
NULL,
SW_SHOW);
Enjoy!
|
|
|
|
|
Thank you!!!
-Dominik
|
|
|
|
|
Hey,
Probably a stupid question but how do I get a function to run after the dialog has loaded?
The situation is I'm writing a mp3->wav converter where a dialog should load up with a progress bar and a couple of static text labels. I just want it to load the dialog then run the Decompress function without any user input at all.
Putting the function call in initInstance just runs it before the dialog has loaded, and putting it in the constructor for the Dialog is causing an error in wincore.cpp.
Any ideas how to fix this silly problem? thanks guys
|
|
|
|
|
just show the dialog, don't call DoModal.
Back to real work : D-21.
|
|
|
|