|
KRowe wrote:
I suppose I would be able to output this to a temp file...
Yes, as long as it has a .reg extension.
KRowe wrote:
Do you know how I would go about merging it into the registry without the messagebox that says "Are you sure you want to add this to the registry?" appearing?
What's wrong with that message? In any case, you could update the registry via code using the registry API, or the CRegKey class?
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Now that I think about it...I guess there is nothing wrong with that. It will work fairly nicely like that. I was wanting to give a more descriptive message but that should be good enough. The registry API looks like it is a huge hassle to work with IMO so I am trying to avoid it or find it already encapsulated. I have found a few MFC classes but apparently nobody uses straight C++ for Windows programming anymore. Ohh well, thanks for the help.
|
|
|
|
|
KRowe wrote:
...apparently nobody uses straight C++ for Windows programming anymore.
Perhaps you meant that nobody uses straight C for Windows programming anymore. Technically, C++ knows nothing of Windows, so it is because of things like MFC, ATL, and WTL that Windows development is so much easier.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I'm not exactly sure what you are trying to say. If you are trying to say that technically MFC is C++ then yes you are correct but the MFC library is I think about 1.5 megs that I really have no use for until this little problem. So by straight C++ I meant C++ without additional huge libraries (I know that my includes add some extra baggage but it is still far less than MFC and I'm trying to minimize them as well). I guess that does sound a little too much like the common term "straight C" that is used to differentiate C from C++ but that is not what I meant.
I would have to argue with you about weather MFC would have made it much easier to do what I am doing however. All my program does is read a file and output it to the screen with some additional formating that requires me to output a single character at a time. This make the CString class almost useless for this. Additionally, I have no controls and only 2 very simple dialogs in the app (plus a Common Dialog). I guess it's what you're used to but, aside from the CString class and couple other handy features, MFC seems to be more of a hastle than it is worth. I can't tell you how much time I have spent trying to get MFC to not do something or other. True, it is the way to go for medium to very large apps, but for the smaller stuff (like my little text viewer) I prefer not to use it.
|
|
|
|
|
KRowe wrote:
I'm not exactly sure what you are trying to say.
It's a common misconception that C++ knows about things such as input/output, files, Windows, etc. I was simply clarifying that without extra packages such as STL, WTL, ATL, or MFC, what you are after is not possible.
KRowe wrote:
(I know that my includes add some extra baggage but it is still far less than MFC and I'm trying to minimize them as well).
Unless the code will be running on a cell phone or an older PDA, trying to optimize for size is not a worthy exercise. Thinking about "how big" the code is almost always leads to a lot of effort that produces no payback whatsoever. What matters is how big the data is. This goes back to the days when programmers were taught that "smaller is better."
KRowe wrote:
I would have to argue with you about weather MFC would have made it much easier to do what I am doing however. All my program does is read a file and output it to the screen with some additional formating that requires me to output a single character at a time.
With what you've described so far, I'm seeing a dozen lines of code, maybe two.
KRowe wrote:
This make the CString class almost useless for this.
I've never known CString to be useless for much of anything. Do you have an example?
KRowe wrote:
Additionally, I have no controls and only 2 very simple dialogs in the app
How can you have a dialog without any controls?
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
How to obtain a CWnd* pointer for every control on a window?
|
|
|
|
|
First you have to enumerate all top-level windows with the EnumWindows() function.
Then you can use the EnumChildWindows() function to iterate through the top-level windows to get the window controls.
Hope it will help you...
Regards, mYkel
|
|
|
|
|
Thank you.
|
|
|
|
|
mYkel wrote:
First you have to enumerate all top-level windows with the EnumWindows() function.
Then you can use the EnumChildWindows() function to iterate through the top-level windows...
Both functions iterate through the top-level windows??
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Use EnumWindows() to get all top-level windows. Then use EnumChildWindows() to iterate through all childs of every top-level window...
Regards, mYkel
|
|
|
|
|
Or you loop through FindWindow and FindWindowEx which provide same functioality like EnumWindows and EnumChildWindows
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
I am using _asm{...} inside a member function of a class. within the _asm{..} I am not able to access the member variables. The compiler generates an error "variable referenced but not defined".
Why is this happening?
USING INTEL COMPILER
CODE:
/////////////////////////////////////////
#include <xmmintrin.h>
#define A16 __declspec(align(16))
class SomeVar
{
public:
SomeVar();
~SomeVar(){};
A16 float xx[4]; A16 float yy[4]; A16 float ww[4];
void Update();
};
SomeVar::SomeVar()
{
for(int i = 0; i < 4; i++)
{
xx[i] = 1.0; yy[i] = 1.1; ww[i] = 0.0;
}
}
void SomeVar::Update()
{
__asm
{
movaps xmm0, xx
movaps xmm1, yy
addps xmm0, xmm1
movaps [ww], xmm0
}
printf("\n%f %f %f %f\n\n",ww[0],ww[1],ww[2],ww[3]);
}
SomeVar sv;
int main(int argc, char* argv[])
{
printf("XmmTest\n");
sv.Update();
return 0;
}
/* Generates error:
Compiling...
Xmm.cpp
D:\Cool\Xmm\Xmm.cpp(37): error: label "xx" was referenced but not defined
movaps xmm0, xx
^
D:\Cool\Xmm\Xmm.cpp(38): error: label "yy" was referenced but not defined
movaps xmm1, yy
^
D:\Cool\Xmm\Xmm.cpp(40): error: label "ww" was referenced but not defined
movaps [ww], xmm0
^
compilation aborted for D:\Cool\Xmm\Xmm.cpp (code 2)
Error executing xicl6.exe.
Xmm.exe - 3 error(s), 0 warning(s)
*/
-- Manohar
Scientist, Defence R&D.
INDIA
|
|
|
|
|
Inside of the Update() method, declare three local variables that hold the contents of the member variables. Then in the __asm block, reference the local variables.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
What is the efficient manner of maintaining an auto restart facility for an application. I have seen articles in net for running a windows service. But all the functionalities in those were from .NET. I want this feature using vc++ and MFC.
Thanks in advance
U Live And Let Others Live
|
|
|
|
|
hi all,
I want to disable all other Applications in the Screen when I open the MFC Dialog..(very much similar to shut down screen in the Windows)
How do I do that?...If any one know that ,please send a reply...
thanks.......
|
|
|
|
|
Hi,
Have a look @ this article
http://www.codeguru.com/Cpp/W-P/system/keyboard/article.php/c2891/
This may help you
Sujan
|
|
|
|
|
I think you are referring to a system-model dialog box.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi,
I want to install latest Platform SDK for Windows 2000.I'm using VC++ 6.0/SP5 .
In this link: http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
It show as "Windows Server 2003 PSDK Full Download with Local Install".
Is this the right one for Windows 2000.
Pls help if any other link specific for Windows 2000 is there?
Thanks in advace
Ram
|
|
|
|
|
hi,
download the SDK from http://www.microsoft.com/msdownload/platformsdk/sdkupdate/default.htm
Follow Core SDK-->Install this SDK-->Continue-->Accept..and then install the
SDK.
|
|
|
|
|
Hi,
Thanks for the reply.
This link ultimately takes to the link which i mentioned.
There are only 2 links in this:
For Server2003 3790.0 RTM:
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
For XPSP2 2600.2180 RTM:
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/XPSP2FULLInstall.htm
where is the Core SDK??
not found in your mentoned link.
Pls help
Thnaks
Ram
|
|
|
|
|
The name is misleading. It is the SDK you want for Windows 2000.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi David,
I'm developing an application in VC++.OS is Windows2000.
So i need Platform SDK installed.
The link :http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
says its a windows server 2003 platform SDK?
So is this the right one?
Thanks
Ram
|
|
|
|
|
What part of "The name is misleading. It is the SDK you want for Windows 2000." was unclear.
Download it. Install it. Enjoy!
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
How to use Different font sizes in a VC++ Dialog Box
|
|
|
|
|
Right click on dialog select properties; from the general tab select the font size you want.
|
|
|
|