1. Win32Lib not showing WS_EX_WINDOWEDGE
- Posted by Raudaun Long <LilFreak02_ at hotmail.com> Mar 21, 2003
- 342 views
any idea why the following code would produce the window shown on http://loth.hypermart.net/window_ss.jpg? The WS_EX_WINDOWEDGE syle is not added to the window. ----------------------------------------------------------------------------------------- include Win32Lib.ew global constant TheForm = createEx(Window,"This is TheForm", 0, Default,Default, 318,238, {WS_OVERLAPPED,WS_CLIPSIBLINGS,WS_CLIPCHILDREN,WS_CAPTION,WS_SYSMENU,WS_VISIBLE}, {WS_EX_LEFT,WS_EX_LTRREADING,WS_EX_RIGHTSCROLLBAR,WS_EX_WINDOWEDGE,WS_EX_APPWINDOW}) WinMain(TheForm,Normal)
2. Re: Win32Lib not showing WS_EX_WINDOWEDGE
- Posted by Greg Haberek <g.haberek at comcast.net> Mar 21, 2003
- 345 views
If you're looking for the traditional windows 3D border, use WS_THICKFRAME or WS_DLGFRAME (not resizable) otherwise you'll end up with the window you have now. ~Greg ----- Original Message ----- From: Raudaun Long <LilFreak02_ at hotmail.com> Subject: Win32Lib not showing WS_EX_WINDOWEDGE any idea why the following code would produce the window shown on http://loth.hypermart.net/window_ss.jpg? The WS_EX_WINDOWEDGE syle is not added to the window. ----------------------------------------------------------------------------------------- include Win32Lib.ew global constant TheForm = createEx(Window,"This is TheForm", 0, Default,Default, 318,238, {WS_OVERLAPPED,WS_CLIPSIBLINGS,WS_CLIPCHILDREN,WS_CAPTION,WS_SYSMENU,WS_VISIBLE}, {WS_EX_LEFT,WS_EX_LTRREADING,WS_EX_RIGHTSCROLLBAR,WS_EX_WINDOWEDGE,WS_EX_APPWINDOW}) WinMain(TheForm,Normal) TOPICA - Start your own email discussion group. FREE!
3. Re: Win32Lib not showing WS_EX_WINDOWEDGE
- Posted by Derek Parnell <ddparnell at bigpond.com> Mar 21, 2003
- 323 views
----- Original Message ----- From: "Raudaun Long" <LilFreak02_ at hotmail.com> To: "EUforum" <EUforum at topica.com> Subject: Win32Lib not showing WS_EX_WINDOWEDGE > > any idea why the following code would produce the window shown on > http://loth.hypermart.net/window_ss.jpg? The WS_EX_WINDOWEDGE syle is > not added to the window. > > -------------------------------------------------------------------------- --------------- > > include Win32Lib.ew > > global constant TheForm = createEx(Window,"This is TheForm", 0, > Default,Default, > 318,238, > {WS_OVERLAPPED,WS_CLIPSIBLINGS,WS_CLIPCHILDREN,WS_CAPTION,WS_SYSMENU,WS_VISI BLE}, > > {WS_EX_LEFT,WS_EX_LTRREADING,WS_EX_RIGHTSCROLLBAR,WS_EX_WINDOWEDGE,WS_EX_APP WINDOW}) > > > WinMain(TheForm,Normal) The combination of window style flags here is uncommon. To have both CLIPSIBLINGS and CLIPCHILDREN on a top-level window is probable counter productive. The WS_OVERLAPPED is for documentation only as its value is zero, as is WS_EX_LEFT, WX_EX_LTRREADING, and WX_EX_RIGHTSCROLLBAR. So, reducing this to a simpler form, we get ... {WS_CLIPCHILDREN,WS_CAPTION,WS_SYSMENU,WS_VISIBLE}, {WS_EX_WINDOWEDGE,WS_EX_APPWINDOW}) This means that the only difference between this and the default settings is that it doesn't have WS_THICKFRAME, WS_MINIMIZEBOX and WS_MAXIMIZEBOX. Now the WS_EX_WINDOWEDGE mans that the border is raised rather than sunken. You will find that it is raised. Try using WS_EX_CLIENTEDGE instead to see a sunken edge. The WS_THICKFRAME gives is a resizeable frame. ---------------- cheers, Derek Parnell
4. Re: Win32Lib not showing WS_EX_WINDOWEDGE
- Posted by Derek Parnell <ddparnell at bigpond.com> Mar 22, 2003
- 340 views
----- Original Message ----- From: "Raudaun Long" <LilFreak02_ at hotmail.com> To: "EUforum" <EUforum at topica.com> Subject: RE: Win32Lib not showing WS_EX_WINDOWEDGE > > > Derek Parnell wrote: > > ----- Original Message ----- > > From: "Raudaun Long" <LilFreak02_ at hotmail.com> > > To: "EUforum" <EUforum at topica.com> > > Sent: Friday, March 21, 2003 3:05 PM > > Subject: Win32Lib not showing WS_EX_WINDOWEDGE > > > > > > > any idea why the following code would produce the window shown on > > > http://loth.hypermart.net/window_ss.jpg? The WS_EX_WINDOWEDGE syle is > > > not added to the window. > > > [snip] > > I understand what you are saying as I've been programming for windows > for a while, but as i said in my first reply, this window was generated > by an app i'm working on the pulls the styles off of existing windows on > the screen and outputs the window and controls into a win32lib Eu > program. I did not set these styles myself. My question isn't how they > work or how to get a specific frame but rather why the code doesn't > produce the same window as the original even though the styles set in > the source code are exactly the same. They all showed up in Spy++ except > WS_EX_WINDOWEDGE I'm sorry. I'm still fairly new to Win32 programming. I just didn't notice in your post that your question was "I have two programs that both create a window based on exactly the same style flags. However, the win32lib program's window has just a line for the border and the other program has the normal 3D look border. Why is this so?" My guess is that your EXW.EXE still has the Win 3.1 setting. In other words bytes at address offset #08 for 4 bytes should equal #40 #00 #00 #00. Also I'm not sure what the statement "They all showed up in Spy++ except WS_EX_WINDOWEDGE" means. Does this mean that Spy++ did not show the flag for both programs, or that it shows it one program but not the other? I'm guessing here that CreateWindowEx() did not exist until Windows 95. ---------------- cheers, Derek Parnell
5. Re: Win32Lib not showing WS_EX_WINDOWEDGE
- Posted by euman at bellsouth.net Mar 22, 2003
- 319 views
Hello, I have an interesting twist to this 3.1 / 4.0 issue. Has anyone other than myself noticed that in Windows XP the button controls appear to be colored (blue if not in focus, yellow if in focus) if 3.1 is used and if 4.0 is implemented the buttons just have a usual Win9x ugly grey appearance? This with using a .manifest file or not. Perhaps its time to add code (which I have) to Win32lib to detect the O/S. This may have to be fixed on Rob's end so translated programs show as they should or, perhaps my manifest file is screwy...any thoughts? regards, THE EUMAN ----- Original Message ----- From: "Derek Parnell" <ddparnell at bigpond.com> To: "EUforum" <EUforum at topica.com> Sent: Saturday, March 22, 2003 1:34 AM Subject: Re: Win32Lib not showing WS_EX_WINDOWEDGE > ======== The Euphoria Mailing List ======== > > ----- Original Message ----- > From: "Raudaun Long" <LilFreak02_ at hotmail.com> > To: "EUforum" <EUforum at topica.com> > Sent: Saturday, March 22, 2003 10:23 AM > Subject: RE: Win32Lib not showing WS_EX_WINDOWEDGE > > > > > > > > Derek Parnell wrote: > > > ----- Original Message ----- > > > From: "Raudaun Long" <LilFreak02_ at hotmail.com> > > > To: "EUforum" <EUforum at topica.com> > > > Sent: Friday, March 21, 2003 3:05 PM > > > Subject: Win32Lib not showing WS_EX_WINDOWEDGE > > > > > > > > > > any idea why the following code would produce the window shown on > > > > http://loth.hypermart.net/window_ss.jpg? The WS_EX_WINDOWEDGE syle is > > > > not added to the window. > > > > > > [snip] > > > > I understand what you are saying as I've been programming for windows > > for a while, but as i said in my first reply, this window was generated > > by an app i'm working on the pulls the styles off of existing windows on > > the screen and outputs the window and controls into a win32lib Eu > > program. I did not set these styles myself. My question isn't how they > > work or how to get a specific frame but rather why the code doesn't > > produce the same window as the original even though the styles set in > > the source code are exactly the same. They all showed up in Spy++ except > > WS_EX_WINDOWEDGE > > I'm sorry. I'm still fairly new to Win32 programming. I just didn't notice > in your post that your question was "I have two programs that both create a > window based on exactly the same style flags. However, the win32lib > program's window has just a line for the border and the other program has > the normal 3D look border. Why is this so?" > > My guess is that your EXW.EXE still has the Win 3.1 setting. In other words > bytes at address offset #08 for 4 bytes should equal #40 #00 #00 #00. > > Also I'm not sure what the statement "They all showed up in Spy++ except > WS_EX_WINDOWEDGE" means. Does this mean that Spy++ did not show the flag for > both programs, or that it shows it one program but not the other? I'm > guessing here that CreateWindowEx() did not exist until Windows 95. > > > ---------------- > cheers, > Derek Parnell > > =^=========================================== > This email was sent to: euman@
6. Re: Win32Lib not showing WS_EX_WINDOWEDGE
- Posted by jordah at btopenworld.com Mar 22, 2003
- 335 views
Hi EuMan, Unfortunately, i'm back to win98 on my new laptop. Bythe time i used to code in xp, i used to use 4.0 and received desired results without a manifest. Its kinda funny, all control classes in user32.dll in XP use themes by default(window,button). Maybe, it would be a good idea to post your manifest file and the two examples showing this for other users to check. AFAIK, 3.1/4.0 applications made in other languages work great with XP. BTW, Just to save me time. Could u paste the code snippets for detecting which OS u use. i think this will be ideal for euwin win32GUI library. Jordah ----- Original Message ----- From: <euman at bellsouth.net> To: "EUforum" <EUforum at topica.com> Sent: Saturday, March 22, 2003 1:33 PM Subject: Re: Win32Lib not showing WS_EX_WINDOWEDGE Hello, I have an interesting twist to this 3.1 / 4.0 issue. Has anyone other than myself noticed that in Windows XP the button controls appear to be colored (blue if not in focus, yellow if in focus) if 3.1 is used and if 4.0 is implemented the buttons just have a usual Win9x ugly grey appearance? This with using a .manifest file or not. Perhaps its time to add code (which I have) to Win32lib to detect the O/S. This may have to be fixed on Rob's end so translated programs show as they should or, perhaps my manifest file is screwy...any thoughts? regards, THE EUMAN ----- Original Message ----- From: "Derek Parnell" <ddparnell at bigpond.com> To: "EUforum" <EUforum at topica.com> Sent: Saturday, March 22, 2003 1:34 AM Subject: Re: Win32Lib not showing WS_EX_WINDOWEDGE > > ----- Original Message ----- > From: "Raudaun Long" <LilFreak02_ at hotmail.com> > To: "EUforum" <EUforum at topica.com> > Sent: Saturday, March 22, 2003 10:23 AM > Subject: RE: Win32Lib not showing WS_EX_WINDOWEDGE > > > > Derek Parnell wrote: > > > ----- Original Message ----- > > > From: "Raudaun Long" <LilFreak02_ at hotmail.com> > > > To: "EUforum" <EUforum at topica.com> > > > Sent: Friday, March 21, 2003 3:05 PM > > > Subject: Win32Lib not showing WS_EX_WINDOWEDGE > > > > > > > > > > any idea why the following code would produce the window shown on > > > > http://loth.hypermart.net/window_ss.jpg? The WS_EX_WINDOWEDGE syle is > > > > not added to the window. > > > > > > [snip] > > > > I understand what you are saying as I've been programming for windows > > for a while, but as i said in my first reply, this window was generated > > by an app i'm working on the pulls the styles off of existing windows on > > the screen and outputs the window and controls into a win32lib Eu > > program. I did not set these styles myself. My question isn't how they > > work or how to get a specific frame but rather why the code doesn't > > produce the same window as the original even though the styles set in > > the source code are exactly the same. They all showed up in Spy++ except > > WS_EX_WINDOWEDGE > > I'm sorry. I'm still fairly new to Win32 programming. I just didn't notice > in your post that your question was "I have two programs that both create a > window based on exactly the same style flags. However, the win32lib > program's window has just a line for the border and the other program has > the normal 3D look border. Why is this so?" > > My guess is that your EXW.EXE still has the Win 3.1 setting. In other words > bytes at address offset #08 for 4 bytes should equal #40 #00 #00 #00. > > Also I'm not sure what the statement "They all showed up in Spy++ except > WS_EX_WINDOWEDGE" means. Does this mean that Spy++ did not show the flag for > both programs, or that it shows it one program but not the other? I'm > guessing here that CreateWindowEx() did not exist until Windows 95. > > > ---------------- > cheers, > Derek Parnell > ==^^=============================================================== This email was sent to: jordah at btopenworld.com TOPICA - Start your own email discussion group. FREE!
7. Re: Win32Lib not showing WS_EX_WINDOWEDGE
- Posted by euman at bellsouth.net Mar 22, 2003
- 326 views
{{{ Jordah writes:
Unfortunately, i'm back to win98 on my new laptop. Bythe time i used to
code in xp, i used to use 4.0 and received desired results without a
manifest. Its kinda funny, all control classes in user32.dll in XP use
themes by default(window,button).
Maybe, it would be a good idea to post your manifest file and the two
examples showing this for other users to check. AFAIK, 3.1/4.0 applications
made in other languages work great with XP.
BTW, Just to save me time. Could u paste the code snippets for
detecting which OS u use. i think this will be ideal for euwin win32GUI
library.
Hey Jordah,
And I thought you werent coding Win32lib anymore :)
I will need to construct a "small demo" showing the issue with the button controls I mentioned earlier but for your request, here is (not sure this is my latest edition) to collect information about .dll versions and the O/S they run on.
In fact Im sure this isnt the latest issue, I'll hunt for it. This doesnt detect the (sp) updates for 2K, XP etc.
Should give you an idea that its pretty straight forward and easy besides, knowing you, you'll pick thru it and update what I have here anyway.\
I have my own memory handling routines (found in my installer) "EuSup" so the below code could need an occasional mem_set I very quickly renamed myalloc/myfree back to allocate/free
I'll make a complete module including the define_c_func's, const. etc in a day or so and submit a "clean" user ready module for .dll and O/S version detection to RDS.
Here's what I have for now, Good luck!
Copyright 2002 Euman -> HW. Overman
global function allocate_string2(sequence s) atom mem mem = allocate(length(s) + 1) poke(mem, s) return mem end function
function GetFileVersionInfoSize(sequence FileName) atom pZero, pStr integer size pZero allocate(16) pStr = allocate_string2(FileName) size c_func(xGetFileVersionInfoSize,{pStr,pZero}) free(pStr) free(pZero) return size end function
function GetFileVersionInfo(sequence FileName) atom pInfo, pStr, success integer size sequence info size = GetFileVersionInfoSize(FileName) if not size then return -1 end if pStr allocate_string2(FileName) pInfo allocate(size) success = c_func(xGetFileVersionInfo,{pStr,0,size,pInf) free(pStr) if not success then free(pInfo) return -1 end if info peek({pInfo,size) free(pInfo) return info end function
function VerQueryValue(sequence info, sequence ValueName) atom pInfo, pValueName, ppValue, pLen, index, dat1, dat2, dat3, dat4 integer bool, size
size = length(info)+1 pInfo allocate(size) poke(pInfo, info) pValueName = allocate_string2(ValueName) ppValue allocate(16) pLen = allocate(16) bool = c_func(xVerQueryValue,{pInfo, pValueName,ppValue,pLen}) free(pInfo) free(pValueName) if not bool then free(ppValue) free(pLen) return -1 end if indexpeek4u(ppValue) dat1HIWORD(peek4u(index+8)) dat2=LOWORD(peek4u(index+8)) dat3=HIWORD(peek4u(index+12)) dat4=LOWORD(peek4u(index+12)) free(pLen) free(ppValue) return {dat1,dat2,dat3,dat4}
global function GetVersionStr(sequence FileName) object info sequence version info = GetFileVersionInfo(FileName) if atom(info) then return -1 end if version = VerQueryValue(info,"
") return version end function
global sequence kernel32_inf, comctl32_inf, user32_inf, gdi32_inf, lz32_inf, advapi32_inf
comctl32_inf = GetVersionStr("comctl32.dll") rem'd the others for message size "You get the idea"
atom testver, bad
if comctl32_inf[1] < 4 then if comctl32_inf[2] < 69 then bad=message_box("Incompatible CommCtl32.dll Version","Error",MB_ICONERROR) end if if getc(0) then abort(0) end if end if
OS Version
atom ptOS, val, major, minor, build, platf global sequence OS
ptOS = allocate( 148 ) poke4(ptOS,148) val c_func(OSVersion, {ptOS})
major = peek4u(ptOS+4) minor = peek4u(ptOS+8) build = peek4u(ptOS+12) platf = peek4u(ptOS+16)
if major = 3 then NT3.51
OS = "NT 3.51"
elsif major = 4 then 95,98,ME,NT4
if minor = 0 then if platf 1 then OS = "95" elsif platf 2 then OS = "NT 4.0" end if
elsif minor = 10 then OS = "98" elsif minor 90 then OS = "ME" end if
elsif major = 5 then 2k,XP,.Net Server
if minor = 0 then OS = "2000" elsif minor 1 then OS = "XP or .Net Server" end if end if
junk = message_box(sprintf( "Boolean: %d.%d", {peek4u(ptOS+4),peek4u(ptOS+8) ), "OSVersion",MB_ICONINFORMATION+MB_TASKMODAL ) free(ptOS)
regards THE EUMAN
--- Original Message From: <jordah at btopenworld.com> To: "EUforum" <EUforum at topica.com> Sent: Saturday, March 22, 2003 10:14 AM Subject: Re: Win32Lib not showing WS_EX_WINDOWEDGE
8. Re: Win32Lib not showing WS_EX_WINDOWEDGE
- Posted by Derek Parnell <ddparnell at bigpond.com> Mar 24, 2003
- 329 views
On Mon, 24 Mar 2003 06:22:36 +0000, Raudaun Long <LilFreak02_ at hotmail.com> wrote: [snip] > > Yes, it shows the flag shows in the original program but not the Euphoria > program but the flag is set in the source code. > -------------------------------------------------------------------------- > > > ----------------------------- > > include Win32Lib.ew > > global constant TheForm = createEx(Window,"This is TheForm", 0, > Default,Default, > 318,238, > > {WS_OVERLAPPED,WS_CLIPSIBLINGS,WS_CLIPCHILDREN,WS_CAPTION,WS_SYSMENU,DS_MODALFRAME,WS_VISIBLE}, > > > {WS_EX_LEFT,WS_EX_LTRREADING,WS_EX_RIGHTSCROLLBAR,WS_EX_WINDOWEDGE,WS_EX_DLGMODALFRAME}) > > > WinMain(TheForm,Normal) Okay, I just did this and used Spy++ to see the styles and WS_EX_WINDOWEDGE is definitely there. So I don't know for certain what you are seeing, however I strongly suspect that the Window App Type in your EXW.EXE needs updating. -- cheers, Derek Parnell
9. Re: Win32Lib not showing WS_EX_WINDOWEDGE
- Posted by jordah at btopenworld.com Mar 24, 2003
- 345 views
Hi EuMan, Thanx a lot for the code. It works great!. Is there a way to detect the difference btn XP & .Net Servers?. Anyway, the code looks and works great. Thanx for the contibution. Jordah ----- Original Message ----- From: <euman at bellsouth.net> To: "EUforum" <EUforum at topica.com> Subject: Re: Win32Lib not showing WS_EX_WINDOWEDGE Jordah writes: > Hi EuMan, > Unfortunately, i'm back to win98 on my new laptop. Bythe time i used to > code in xp, i used to use 4.0 and received desired results without a > manifest. Its kinda funny, all control classes in user32.dll in XP use > themes by default(window,button). > Maybe, it would be a good idea to post your manifest file and the two > examples showing this for other users to check. AFAIK, 3.1/4.0 applications > made in other languages work great with XP. > BTW, Just to save me time. Could u paste the code snippets for > detecting which OS u use. i think this will be ideal for euwin win32GUI > library. Hey Jordah, And I thought you werent coding Win32lib anymore :) I will need to construct a "small demo" showing the issue with the button controls I mentioned earlier but for your request, here is (not sure this is my latest edition) to collect information about .dll versions and the O/S they run on. In fact Im sure this isnt the latest issue, I'll hunt for it. This doesnt detect the (sp) updates for 2K, XP etc. Should give you an idea that its pretty straight forward and easy besides, knowing you, you'll pick thru it and update what I have here anyway.\ I have my own memory handling routines (found in my installer) "EuSup" so the below code could need an occasional mem_set I very quickly renamed myalloc/myfree back to allocate/free I'll make a complete module including the define_c_func's, const. etc in a day or so and submit a "clean" user ready module for .dll and O/S version detection to RDS. Here's what I have for now, Good luck! -- Copyright 2002 Euman -> HW. Overman global function allocate_string2(sequence s) atom mem mem = allocate(length(s) + 1) poke(mem, s) return mem end function function GetFileVersionInfoSize(sequence FileName) atom pZero, pStr integer size pZero = allocate(16) pStr = allocate_string2(FileName) size = c_func(xGetFileVersionInfoSize,{pStr,pZero}) free(pStr) free(pZero) return size end function function GetFileVersionInfo(sequence FileName) atom pInfo, pStr, success integer size sequence info size = GetFileVersionInfoSize(FileName) if not size then return -1 end if pStr = allocate_string2(FileName) pInfo = allocate(size) success = c_func(xGetFileVersionInfo,{pStr,0,size,pInfo}) free(pStr) if not success then free(pInfo) return -1 end if info = peek({pInfo,size}) free(pInfo) return info end function function VerQueryValue(sequence info, sequence ValueName) atom pInfo, pValueName, ppValue, pLen, index, dat1, dat2, dat3, dat4 integer bool, size size = length(info)+1 pInfo = allocate(size) poke(pInfo, info) pValueName = allocate_string2(ValueName) ppValue = allocate(16) pLen = allocate(16) bool = c_func(xVerQueryValue,{pInfo, pValueName,ppValue,pLen}) free(pInfo) free(pValueName) if not bool then free(ppValue) free(pLen) return -1 end if index=peek4u(ppValue) dat1=HIWORD(peek4u(index+8)) dat2=LOWORD(peek4u(index+8)) dat3=HIWORD(peek4u(index+12)) dat4=LOWORD(peek4u(index+12)) free(pLen) free(ppValue) return {dat1,dat2,dat3,dat4} -- --return sprint(dat1,dat2,dat3,dat4) end function global function GetVersionStr(sequence FileName) object info sequence version info = GetFileVersionInfo(FileName) if atom(info) then return -1 end if version = VerQueryValue(info,"\\") return version end function global sequence kernel32_inf, comctl32_inf, user32_inf, gdi32_inf, lz32_inf, advapi32_inf comctl32_inf = GetVersionStr("comctl32.dll") --rem'd the others for message size "You get the idea" atom testver, bad if comctl32_inf[1] < 4 then if comctl32_inf[2] < 69 then bad=message_box("Incompatible CommCtl32.dll Version","Error",MB_ICONERROR) end if if getc(0) then abort(0) end if end if -- OS Version atom ptOS, val, major, minor, build, platf global sequence OS ptOS = allocate( 148 ) poke4(ptOS,148) val = c_func(OSVersion, {ptOS}) major = peek4u(ptOS+4) minor = peek4u(ptOS+8) build = peek4u(ptOS+12) platf = peek4u(ptOS+16) if major = 3 then --NT3.51 OS = "NT 3.51" elsif major = 4 then --95,98,ME,NT4 if minor = 0 then if platf = 1 then OS = "95" elsif platf = 2 then OS = "NT 4.0" end if elsif minor = 10 then OS = "98" elsif minor = 90 then OS = "ME" end if elsif major = 5 then --2k,XP,.Net Server if minor = 0 then OS = "2000" elsif minor = 1 then OS = "XP or .Net Server" end if end if --junk = message_box(sprintf( "Boolean: %d.%d", {peek4u(ptOS+4),peek4u(ptOS+8)} ), "OSVersion",MB_ICONINFORMATION+MB_TASKMODAL ) free(ptOS) regards THE EUMAN ----- Original Message ----- From: <jordah at btopenworld.com> To: "EUforum" <EUforum at topica.com> Sent: Saturday, March 22, 2003 10:14 AM Subject: Re: Win32Lib not showing WS_EX_WINDOWEDGE > ==^^=============================================================== This email was sent to: jordah at btopenworld.com TOPICA - Start your own email discussion group. FREE!
10. Re: Win32Lib not showing WS_EX_WINDOWEDGE
- Posted by jordah at btopenworld.com Mar 24, 2003
- 330 views
Thank You, Brian. ----- Original Message ----- From: "Brian Broker" <bkb at cnw.com> To: "EUforum" <EUforum at topica.com> Subject: RE: Win32Lib not showing WS_EX_WINDOWEDGE > > XP is 5.1, Server is 5.2. > > -- Brian > > jordah wrote: > > Hi EuMan, > > Thanx a lot for the code. It works great!. Is there a way to detect the > > difference btn XP & .Net Servers?. Anyway, the code looks and works > > great. > > Thanx for the contibution. > > > > Jordah > > ----- Original Message ----- > > From: <euman at bellsouth.net> > > To: "EUforum" <EUforum at topica.com> > > Sent: Saturday, March 22, 2003 9:09 PM > > Subject: Re: Win32Lib not showing WS_EX_WINDOWEDGE > > > > > > Jordah writes: > > > Hi EuMan, > > > Unfortunately, i'm back to win98 on my new laptop. Bythe time i used > > to > > > code in xp, i used to use 4.0 and received desired results without a > > > manifest. Its kinda funny, all control classes in user32.dll in XP use > > > themes by default(window,button). > > > Maybe, it would be a good idea to post your manifest file and the > > two > > > examples showing this for other users to check. AFAIK, 3.1/4.0 > > applications > > > made in other languages work great with XP. > > > BTW, Just to save me time. Could u paste the code snippets for > > > detecting which OS u use. i think this will be ideal for euwin win32GUI > > > library. > > > > Hey Jordah, > > > > And I thought you werent coding Win32lib anymore :) > > > > I will need to construct a "small demo" showing the issue > > with the button controls I mentioned earlier but for your > > request, here is (not sure this is my latest edition) to > > collect information about .dll versions and the O/S they > > run on. > > > > In fact Im sure this isnt the latest issue, I'll hunt for it. > > This doesnt detect the (sp) updates for 2K, XP etc. > > > > Should give you an idea that its pretty straight forward > > and easy besides, knowing you, you'll pick thru it and > > update what I have here anyway.\ > > > > I have my own memory handling routines (found in my installer) > > "EuSup" so the below code could need an occasional mem_set > > I very quickly renamed myalloc/myfree back to allocate/free > > > > I'll make a complete module including the define_c_func's, const. etc > > in a day or so and submit a "clean" user ready module for .dll and O/S > > version detection to RDS. > > > > Here's what I have for now, Good luck! > > > > -- Copyright 2002 Euman -> HW. Overman > > > > global function allocate_string2(sequence s) > > atom mem > > mem = allocate(length(s) + 1) > > poke(mem, s) > > return mem > > end function > > > > function GetFileVersionInfoSize(sequence FileName) > > atom pZero, pStr > > integer size > > pZero = allocate(16) > > pStr = allocate_string2(FileName) > > size = c_func(xGetFileVersionInfoSize,{pStr,pZero}) > > free(pStr) > > free(pZero) > > return size > > end function > > > > function GetFileVersionInfo(sequence FileName) > > atom pInfo, pStr, success > > integer size > > sequence info > > size = GetFileVersionInfoSize(FileName) > > if not size then return -1 end if > > pStr = allocate_string2(FileName) > > pInfo = allocate(size) > > success = c_func(xGetFileVersionInfo,{pStr,0,size,pInfo}) > > free(pStr) > > if not success then > > free(pInfo) > > return -1 > > end if > > info = peek({pInfo,size}) > > free(pInfo) > > return info > > end function > > > > function VerQueryValue(sequence info, sequence ValueName) > > atom pInfo, pValueName, ppValue, pLen, index, dat1, dat2, dat3, dat4 > > integer bool, size > <snip> > > > > TOPICA - Start your own email discussion group. FREE! > >
11. Re: Win32Lib not showing WS_EX_WINDOWEDGE
- Posted by euman at bellsouth.net Mar 24, 2003
- 322 views
{{{ Jordah,
Most of that code originated with Jacques Deschene (if spelled incorrectly, forgive me) and Wolfgang Fritz supplied a hack to the original code for aquiring .dll info. The O/S version info was my major contrib to what I sent to the list....
So Thank Jacques, Wolf and Euman in your documentation please...
THE EUMAN
--- Original Message From: <jordah at btopenworld.com> To: "EUforum" <EUforum at topica.com> Sent: Monday, March 24, 2003 1:07 PM Subject: Re: Win32Lib not showing WS_EX_WINDOWEDGE
Hi EuMan,
Thanx a lot for the code. It works great!. Is there a way to detect the
difference btn XP & .Net Servers?. Anyway, the code looks and works great.
Thanx for the contibution.
Jordah
--
From: <euman at bellsouth.net>
To: "EUforum" <EUforum at topica.com>
Sent: Saturday, March 22, 2003 9:09 PM
Subject: Re: Win32Lib not showing WS_EX_WINDOWEDGE
Jordah writes:
> Hi EuMan,
> Unfortunately, i'm back to win98 on my new laptop. Bythe time i used
to
> code in xp, i used to use 4.0 and received desired results without a
> manifest. Its kinda funny, all control classes in user32.dll in XP use
> themes by default(window,button).
> Maybe, it would be a good idea to post your manifest file and the
two
> examples showing this for other users to check. AFAIK, 3.1/4.0
applications
> made in other languages work great with XP.
> BTW, Just to save me time. Could u paste the code snippets for
> detecting which OS u use. i think this will be ideal for euwin win32GUI
> library.
Hey Jordah,
And I thought you werent coding Win32lib anymore :)
I will need to construct a "small demo" showing the issue
with the button controls I mentioned earlier but for your
request, here is (not sure this is my latest edition) to
collect information about .dll versions and the O/S they
run on.
In fact Im sure this isnt the latest issue, I'll hunt for it.
This doesnt detect the (sp) updates for 2K, XP etc.
Should give you an idea that its pretty straight forward
and easy besides, knowing you, you'll pick thru it and
update what I have here anyway.\
I have my own memory handling routines (found in my installer)
"EuSup" so the below code could need an occasional mem_set
I very quickly renamed myalloc/myfree back to allocate/free
I'll make a complete module including the define_c_func's, const. etc
in a day or so and submit a "clean" user ready module for .dll and O/S
version detection to RDS.
Here's what I have for now, Good luck!
global function allocate_string2(sequence s)
atom mem
mem allocate(length(s) + 1)
poke(mem, s)
return mem
end function
function GetFileVersionInfoSize(sequence FileName)
atom pZero, pStr
integer size
pZero = allocate(16)
pStr allocate_string2(FileName)
size c_func(xGetFileVersionInfoSize,{pStr,pZero})
free(pStr)
free(pZero)
return size
end function
function GetFileVersionInfo(sequence FileName)
atom pInfo, pStr, success
integer size
sequence info
size = GetFileVersionInfoSize(FileName)
if not size then return -1 end if
pStr allocate_string2(FileName)
pInfo = allocate(size)
success c_func(xGetFileVersionInfo,{pStr,0,size,pInfo})
free(pStr)
if not success then
free(pInfo)
return -1
end if
info = peek({pInfo,size})
free(pInfo)
return info
end function
function VerQueryValue(sequence info, sequence ValueName)
atom pInfo, pValueName, ppValue, pLen, index, dat1, dat2, dat3, dat4
integer bool, size
size length(info)+1
pInfo = allocate(size)
poke(pInfo, info)
pValueName allocate_string2(ValueName)
ppValue = allocate(16)
pLen = allocate(16)
bool c_func(xVerQueryValue,{pInfo, pValueName,ppValue,pLen})
free(pInfo)
free(pValueName)
if not bool then
free(ppValue)
free(pLen)
return -1
end if
index=peek4u(ppValue)
dat1=HIWORD(peek4u(index+8))
dat2=LOWORD(peek4u(index+8))
dat3HIWORD(peek4u(index+12))
dat4=LOWORD(peek4u(index+12))
free(pLen)
free(ppValue)
return {dat1,dat2,dat3,dat4
end function
global function GetVersionStr(sequence FileName)
object info
sequence version
info GetFileVersionInfo(FileName)
if atom(info) then return -1 end if
version = VerQueryValue(info,"
")
return version
end function
global sequence kernel32_inf,
comctl32_inf,
user32_inf,
gdi32_inf,
lz32_inf,
advapi32_inf
comctl32_inf GetVersionStr("comctl32.dll")
atom testver, bad
if comctl32_inf[1] < 4 then
if comctl32_inf[2] < 69 then
bad=message_box("Incompatible CommCtl32.dll
Version","Error",MB_ICONERROR)
end if
if getc(0) then
abort(0)
end if
end if
atom ptOS, val, major, minor, build, platf
global sequence OS
ptOS = allocate( 148 )
poke4(ptOS,148)
val c_func(OSVersion, {ptOS})
major = peek4u(ptOS+4)
minor = peek4u(ptOS+8)
build peek4u(ptOS+12)
platf peek4u(ptOS+16)
if major = 3 then
OS = "NT 3.51"
elsif major 4 then
if minor = 0 then
if platf = 1 then
OS = "95"
elsif platf = 2 then
OS = "NT 4.0"
end if
elsif minor 10 then
OS = "98"
elsif minor = 90 then
OS "ME"
end if
elsif major 5 then
if minor 0 then
OS "2000"
elsif minor 1 then
OS "XP or .Net Server"
end if
end if
regards
THE EUMAN
--
From: <jordah at btopenworld.com>
To: "EUforum" <EUforum at topica.com>
Sent: Saturday, March 22, 2003 10:14 AM
Subject: Re: Win32Lib not showing WS_EX_WINDOWEDGE
>
=========================================== > This email was sent to: jordah at btopenworld.com
TOPICA - Start your own email discussion group. FREE!
=^==========================================
This email was sent to: euman@be>