SetLayeredWindowAttributes and bitmaps
-
Hi all, I am using SetLayeredWindowAttributes in order to create an outlook like message. I have a special show function which moves (with SetwindowPos) the dialog and changes its opcaity while moving. :) The dialog fades in (both by movement and opacity change) around the system tray area, and after 3 seconds fades out. When i call the show function for the first time, all controls on the dialog (bitmap, static text etc.) appear as black boxes, until the fade in effect is done, then he controls appear properly. :confused: Consequent calls to the show function works properly - it shows the controls through all the fade in and fade out procedure. If i create a thread and call the show function from it then it works fine for the first call also. :confused::confused: I would appriciate it if someone can explain the differnece between calling the function from another thread or form the window thread, the drawing procedure of a dialog and may be offer a way to solve this problem without creating a new thread. Thanks Shimon
-
Hi all, I am using SetLayeredWindowAttributes in order to create an outlook like message. I have a special show function which moves (with SetwindowPos) the dialog and changes its opcaity while moving. :) The dialog fades in (both by movement and opacity change) around the system tray area, and after 3 seconds fades out. When i call the show function for the first time, all controls on the dialog (bitmap, static text etc.) appear as black boxes, until the fade in effect is done, then he controls appear properly. :confused: Consequent calls to the show function works properly - it shows the controls through all the fade in and fade out procedure. If i create a thread and call the show function from it then it works fine for the first call also. :confused::confused: I would appriciate it if someone can explain the differnece between calling the function from another thread or form the window thread, the drawing procedure of a dialog and may be offer a way to solve this problem without creating a new thread. Thanks Shimon
-
Hi all, I am using SetLayeredWindowAttributes in order to create an outlook like message. I have a special show function which moves (with SetwindowPos) the dialog and changes its opcaity while moving. :) The dialog fades in (both by movement and opacity change) around the system tray area, and after 3 seconds fades out. When i call the show function for the first time, all controls on the dialog (bitmap, static text etc.) appear as black boxes, until the fade in effect is done, then he controls appear properly. :confused: Consequent calls to the show function works properly - it shows the controls through all the fade in and fade out procedure. If i create a thread and call the show function from it then it works fine for the first call also. :confused::confused: I would appriciate it if someone can explain the differnece between calling the function from another thread or form the window thread, the drawing procedure of a dialog and may be offer a way to solve this problem without creating a new thread. Thanks Shimon
After setting the layered window style, you should call the SetLayeredWindowAttributes() funcion Immediately. Are you doing so? <blockquote class="FQ"><div class="FQA">dj4400 wrote:</div>I am using SetLayeredWindowAttributes in order to create an outlook like message.</blockquote> Also take a look at the
AnimateWindow()
function. I think you can achive the above effect with a single call toAnimateWindow()
function. -
One thing that can be tried first is calling UpdateWindow after the first show function call.
- ns -