Frederico Marques
2009-04-28 10:26:15 UTC
Hello people.
I am currently developing a application that should simulate NeoSoft, InstallShield, and similar installers. I am aware that such packages are available from the Web, however I desire to gain knowledge about such applications.
At the moment, I have a problem when I try to create buttons. The buttons created are Win98 like, gray, with no 3d-effect. I tried chaging the button stryles, in the dwStyle argument, and also messing around with dwExStyle, with no success.
Below follows a snippet with relevant code only ( for readability purposes. )
/** C code. { */
/** Please assume hwnd as a created window. The following code is triggered it WM_CREATE. */
HANDLE hButtonOk = NULL ;
if ( ( hButtonOk = CreateWindowEx( WS_EX_LEFT | WS_EX_TOPMOST, "BUTTON", "Seguinte", WS_CHILD | WS_VISIBLE | BS_TEXT | BS_PUSHBUTTON, // Styles.
250, 330, 100, 25, hwnd, (HMENU)0, hThis, NULL )) == NULL ) {
MessageBoxA( hwnd, "Erro Irrecuperável", "Ocorreu um erro irrecuperável a criar um elemento de Gui : hButtonOK", MB_ICONERROR|MB_OK);
SendMessageA( hwnd, WM_QUIT, 0, 0 );
return -1;
}
/** }*/
Please let me know if something is unclear, and of course, if you know the sollution :)
Thanks every1 ;D
Frederico Marques
_________________________________________________________________
Emoticons e Winks super diferentes para o Messenger. Baixe agora, é grátis!
http://specials.br.msn.com/ilovemessenger/pacotes.aspx
I am currently developing a application that should simulate NeoSoft, InstallShield, and similar installers. I am aware that such packages are available from the Web, however I desire to gain knowledge about such applications.
At the moment, I have a problem when I try to create buttons. The buttons created are Win98 like, gray, with no 3d-effect. I tried chaging the button stryles, in the dwStyle argument, and also messing around with dwExStyle, with no success.
Below follows a snippet with relevant code only ( for readability purposes. )
/** C code. { */
/** Please assume hwnd as a created window. The following code is triggered it WM_CREATE. */
HANDLE hButtonOk = NULL ;
if ( ( hButtonOk = CreateWindowEx( WS_EX_LEFT | WS_EX_TOPMOST, "BUTTON", "Seguinte", WS_CHILD | WS_VISIBLE | BS_TEXT | BS_PUSHBUTTON, // Styles.
250, 330, 100, 25, hwnd, (HMENU)0, hThis, NULL )) == NULL ) {
MessageBoxA( hwnd, "Erro Irrecuperável", "Ocorreu um erro irrecuperável a criar um elemento de Gui : hButtonOK", MB_ICONERROR|MB_OK);
SendMessageA( hwnd, WM_QUIT, 0, 0 );
return -1;
}
/** }*/
Please let me know if something is unclear, and of course, if you know the sollution :)
Thanks every1 ;D
Frederico Marques
_________________________________________________________________
Emoticons e Winks super diferentes para o Messenger. Baixe agora, é grátis!
http://specials.br.msn.com/ilovemessenger/pacotes.aspx