Does anyone know if there are any functions in VC++ to position a messagebox, or do i have to write my own messagebox class..?
This is a discussion on How to position a messagebox within the Windows Programming forums, part of the Platform Specific Boards category; Does anyone know if there are any functions in VC++ to position a messagebox, or do i have to write ...
Does anyone know if there are any functions in VC++ to position a messagebox, or do i have to write my own messagebox class..?
I've never seen any.
Code:int main(void){srand(time(0));for(double l=rand(),l0=0,l00=0;;l0+=0.1){for(double l000=0;l000 <1;l000+=.001,l+=((double)rand()/RAND_MAX)/0x64,l00+=((sin(l*0x8*atan(l0)*l000-(l0*0x8*atan (l)))*0.5)+0.5)){l00-=floor(l00);for(size_t l0000=0,l00000=(size_t)(0x50*(l00));l0000<l00000;++l0000 )putchar(0x20);putchar(0x61+(int)((double)rand()/RAND_MAX*0x1a));putchar('\n');}}return 0;}
One alternative is to create a window and paint the texts and position it according.
Kuphryn
Use FindWindow and MoveWindow...here's a console example, I haven't tested if you need threading on an actual windows app yet, but here's how I did it...
You're going to need to enable Mutli-Threading for this to work...Code:#include <windows.h> #include <iostream.h> #include <process.h> void MoveMB(PVOID) { HWND hMB; while((hMB = FindWindow(NULL, "wow...")) == NULL); MoveWindow(hMB, 0, 0, 150, 125, TRUE); } int main(void) { _beginthread(MoveMB, 0, NULL); MessageBox(NULL, "Look at this!", "wow...", MB_OK | MB_ICONEXCLAMATION); return 0; }
In MSVC (Visual Studio), go to Project->Settings->Click the C++ tab. Change the "Category" dropdown box to "Code Generation", and then change the "Use run-time library" dropdown box to "Multithreaded".
Gays can't love like real people
entropysink.com -- because arses weren't designed for running websites.
That was a good idea, i thought about that myself, but never tried to get the windowhandle...
Thx!