News:

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

webbrowser-control

Started by ragdog, March 06, 2007, 06:40:46 PM

Previous topic - Next topic

ragdog

hi @all

I  have a problem with my webcontrol !

if I insert a webbrowser-control into my resource started my prog no more! have you any idea?

thanks in forward
ragdog

[attachment deleted by admin]

u

Just move the

       invoke LoadLibrary,offset szDLL
       mov hLib,eax
    invoke GetProcAddress,hLib,addr szAtlAxWinInit
       call eax   

right after "invoke InitCommonControls"
and it'll work :)
Though it'll crash on dialog-closing, not sure why ^^'
Ah... didn't read long enough to see you call FreeLibrary before the window is actually deleted. So, replace your source.asm with

.386
.model flat, stdcall  ;32 bit memory model
option casemap :none  ;case sensitive

include source.inc

.code

start:
invoke GetModuleHandle,NULL
mov hInstance,eax
invoke InitCommonControls
       invoke LoadLibrary,offset szDLL
       mov hLib,eax
    invoke GetProcAddress,hLib,addr szAtlAxWinInit
       call eax   

       
invoke DialogBoxParam,hInstance,IDD_DIALOG,NULL,addr DlgProc,NULL
invoke FreeLibrary,hLib
invoke ExitProcess,0

DlgProc proc hWnd:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM       
xor eax, eax
.if uMsg == WM_CLOSE
invoke EndDialog,hWnd,0
mov eax,1
.endif
 
ret
DlgProc endp

end start
Please use a smaller graphic in your signature.

hutch--

You may need to use InitCommonControlsEx.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

ragdog

thanks :U

I can also thereby with which sendmessage function send a URL address at the windows?


ragdog