|
-
Nov 27th, 2001, 01:26 PM
#1
Thread Starter
Fanatic Member
FindWindowEx Prob
Hi All,
I have the following code set in a form load event
FrameHwnd = FindWindowEx(Me.hwnd, 0&, "ThunderFrame", vbNullString)
calendarEndHwnd = FindWindowEx(FrameHwnd, 0&, "CalendarWndClass", vbNullString)
calendarStartHwnd = FindWindowEx(FrameHwnd, calendarEndHwnd, "CalendarWndClass", vbNullString)
cboMonthEndHwnd = FindWindowEx(calendarEndHwnd, 0&, "ComboBox", vbNullString)
cboYearEndHwnd = FindWindowEx(calendarEndHwnd, cboMonthEndHwnd, "ComboBox", vbNullString)
cboMonthStartHwnd = FindWindowEx(calendarStartHwnd, 0&, "ComboBox", vbNullString)
cboYearStartHwnd = FindWindowEx(calendarStartHwnd, cboMonthStartHwnd, "ComboBox", vbNullString)
ActCalHwnd = FindWindowEx(Me.hwnd, 0&, "CalendarWndClass", vbNullString)
cboActMonthHwnd = FindWindowEx(ActCalHwnd, 0&, "ComboBox", vbNullString)
cboActYearHwnd = FindWindowEx(ActCalHwnd, cboActMonthHwnd, "ComboBox", vbNullString)
This all works fine in a development environment both under W2K and 95. Running the compiled project on a 95 machine and it does not find the handle to set cboYearStartHwnd. The value is 0.
Does anybody have any ideas why this is so.
Regards
Bill Crawley
-
Nov 27th, 2001, 03:44 PM
#2
Thread Starter
Fanatic Member
on Further investigation
Hi All,
On further investigation. It really looks like the problem stems from the ThinderFrame class on the first line since the frame's handle is not Being found. I also found this to be the case when the compiled version is run on W2k. SO it all works fine in a dev environment, but as soon as it goes to a deployed state the Frame handle cannot be found.
Regards
Bill
-
Nov 30th, 2001, 02:38 PM
#3
Do you know why the handle can't be found?
I only ask this because someone else, at some point, may run into the same issue.
-
Nov 30th, 2001, 02:56 PM
#4
The Frame.hWnd property exists, therefore frames do have window handles. Why are you messing with all these FindWindowEx calls? This must be for another window, is the only answer.
Since you seem to be getting everything in the window or form, why not use EnumChildWindows instead? You do not have to know the class names, or worry about mispelling them.
-
Dec 1st, 2001, 04:51 AM
#5
Thread Starter
Fanatic Member
Answer
In the Dev Environment, I use ThunderFrame. When Compiled windows looks for ThunderRT6Frame. Somebody shoot the guy at Microsoft who thought of this obsured thing.
Regards
Bill Crawley
-
Dec 1st, 2001, 09:48 AM
#6
Conquistador
*hate that friggin sprinks thing*
yeah, that's a pain, how the class names change after compilation
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|