|
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.
|
|
|
|
|
If you want to do it at run time, override the virtual function DoModal();
#include <afxpriv.h>
int CMyDlg::DoModal()
{
CDialogTemplate dlt;
if (!dlt.Load(MAKEINTRESOURCE(CMyDlg::IDD)))
{
return -1;
}
WORD nFontSize = 10;
TCHAR chFaceName[100] = "Courier New";
if (GetNewFontSize(....))
{
nFontSize = newsize;
}
if (GetNewFaceName(....))
{
lstrcpy(chFaceName, newfacename);
}
dlt.SetFont(chFaceName, (WORD)nFontSize);
LPSTR pData = (LPSTR)GlobalLock(dlt.m_hTemplate);
if (pData == NULL)
{
return -1;
}
m_lpszTemplateName = NULL;
InitModalIndirect(pData);
INT nResult = CDialog::DoModal();
GlobalUnlock(dlt.m_hTemplate);
return nResult;
}
|
|
|
|
|
I use a method similar to this with a highres app and it works great. On a highres monitor (2048 x 2560) I use 15pt font and on the second (1024x768) I use 10pt...
John
|
|
|
|
|
Hi all,
I'm new to C++ and am trying to write a kind of predictive text program where the text from a file will attempt to be predicted by the program. Atm I'm trying to get started by reading the text from the file a character at a time and having each character be displayed to the screen after a press of a key. I've managed to read the text and display it as a complete word but am having trouble reading and displaying it a character at a time. I've messed around with cin.get, cin.getc, cin.getchar etc and can't seem to get them to work correctly
Any help on how to go about doing this would be greatly appreciated, Thanks.
The short program below is how I read the text from the file and displayed it to the screen:
Note, to avoid the console window disappearing, you have to run it using CTRL+F5. If there is another way to stop it closing please let me know. I'm using MS Visual C++.NET btw.
=====================
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
int main()
{
char buffer[256]; // Create 256 bit character array.
ifstream file_op; // Create an output stream variable.
file_op.open("mytext.txt"); // Open the text file to read from.
while(file_op >> buffer)
cout << buffer << endl; // Display complete text (complete word)
file_op.close();
return 0;
}
|
|
|
|
|
look in the help for getch(); you will need to include stdio.h.
|
|
|
|
|
Why not change buffer to be a single character?
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
A executable file which has compiled, How to insert it into IE?can you help me ,please tell me some about it,Thanks!
|
|
|
|
|
I believe your asking how to run an true exe (machine code) inside a browser. This is impossible for two reasons:
A) Browsers are not OSes they only display the contents of HTML pages and a few other formats. Additionally, a browser is not going to translate your code into code compatible with the visitors system.
B) Some plug-ins and scripts do allow for functionality similar to a program but they are intentionally made restrictive so that web authors cannot attack web surfers with malicious programs.
That being said, their are ways to write programs for browsers that are not true machine code. The most popular by far is Java code. This can be done through what are called Java Applets. The limitation to this is that each user will need to install your applet and accept it through a dialog that pops up when they go to your page if it contains code that could possibly harm the users computer. For a detailed explaination check out this site: http://java.sun.com/sfaq/
|
|
|
|