Anyone know if there is a way to enumerate all available window classes that were registered with RegisterClass, RegisterClassEx, or GlobalAddAtom?
Anyone know if there is a way to enumerate all available window classes that were registered with RegisterClass, RegisterClassEx, or GlobalAddAtom?
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
Originally posted by Sebastiani
Anyone know if there is a way to enumerate all available window classes that were registered with RegisterClass, RegisterClassEx, or GlobalAddAtom?Code:#include <iostream> #include <set> #include <algorithm> #include <windows.h> typedef std::set<std::string> MYSET; const int BUFF_LEN = 255; BOOL CALLBACK EnumWindowsProc(HWND hWnd,LPARAM lParam){ MYSET* lpSet = reinterpret_cast<MYSET*>(lParam); static char szClass[BUFF_LEN]; if(GetClassName(hWnd,szClass,BUFF_LEN)) lpSet->insert(szClass); return TRUE; } int main() { MYSET setClasses; EnumWindows(EnumWindowsProc, reinterpret_cast<LPARAM>(&setClasses)); std::copy(setClasses.begin(),setClasses.end(), std::ostream_iterator<std::string>(std::cout,"\n")); }
I take it then there is.
Thank you Fordy, I owe you a beer for that one.
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
this is kinda off-topic, but if I declare a window class in one module, can I use it in another one?
noOriginally posted by frenchfry164
this is kinda off-topic, but if I declare a window class in one module, can I use it in another one?