News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

set ClassName to a dialog

Started by ragdog, May 20, 2007, 09:08:39 PM

Previous topic - Next topic

ragdog

hi @all

how i can set a ClassName into my program ?
there are api the getclassname!
gives it also setclassname??

thanks in forward

MichaelW

Dialogs normally use a system-defined class. Iczelion's Tutorial 10 creates a dialog based on a special class that uses the dialog box template as a class template. Setting the class for the dialog converts the dialog to a window of the specified class, overriding the normal dialog processing that the system-defined class performs. 
eschew obfuscation

ragdog

#2
thx for your help!

thus does this function only with this procedur or does go also without?



WinMain proc hInst:HINSTANCE,hPrevInst:HINSTANCE,CmdLine:LPSTR,CmdShow:DWORD
   LOCAL wc:WNDCLASSEX
   LOCAL msg:MSG
   LOCAL hDlg:HWND
   mov   wc.cbSize,SIZEOF WNDCLASSEX
   mov   wc.style, CS_HREDRAW or CS_VREDRAW
   mov   wc.lpfnWndProc, OFFSET WndProc
   mov   wc.cbClsExtra,NULL
   mov   wc.cbWndExtra,DLGWINDOWEXTRA
   push  hInst
   pop   wc.hInstance
   mov   wc.hbrBackground,COLOR_BTNFACE+1
   mov   wc.lpszMenuName,OFFSET MenuName
   mov   wc.lpszClassName,OFFSET ClassName
   invoke LoadIcon,NULL,IDI_APPLICATION
   mov   wc.hIcon,eax
   mov   wc.hIconSm,eax
   invoke LoadCursor,NULL,IDC_ARROW
   mov   wc.hCursor,eax
   invoke RegisterClassEx, addr wc
................
.........