- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have this problem.
I use CVF 6.6 and have a win32 - single document application. Within this application I create a dialog with DialogBoxParam function. There are two combo boxes at this dialog. I would like to change the list of items in IDC_COMBO_COMPOUND according to the selection in the IDC_COMBO_FAMILY CB. I have found something similar in the "OWNCOMBO" sample, so i tried it:
but it doesn't work.
The condition (INT4(HiWord(lParam)) == CBN_SELCHANGE) is never satisfied. Does anybody know why? Or how to deal the problem?
Thank you for your help
Vit
I use CVF 6.6 and have a win32 - single document application. Within this application I create a dialog with DialogBoxParam function. There are two combo boxes at this dialog. I would like to change the list of items in IDC_COMBO_COMPOUND according to the selection in the IDC_COMBO_FAMILY CB. I have found something similar in the "OWNCOMBO" sample, so i tried it:
CASE(WM_COMMAND) SELECT CASE (IAND(uParam,16#ffff)) ... CASE (IDC_COMBO_FAMILY) IF (INT4(HiWord(lParam)) == CBN_SELCHANGE) THEN iret=GetWindowText(GetDlgItem(hDlg,IDC_COMBO_FAMILY),& &Xtext,50) CALL UpdateIDC_COMBO_COMPOUND(hDlg,Xtext) ...
but it doesn't work.
The condition (INT4(HiWord(lParam)) == CBN_SELCHANGE) is never satisfied. Does anybody know why? Or how to deal the problem?
Thank you for your help
Vit
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The condition (INT4(HiWord(lParam)) == CBN_SELCHANGE) is never satisfied. Does anybody know why?
Maybe because docs say that event code is in hiword(wParam), not lParam? ;-)
Maybe because docs say that event code is in hiword(wParam), not lParam? ;-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for help Jugoslav, of course you are right. As I wrote I have copied and modified a piece of code from the sample "owncombo" (from samplesadvancedwin32) from the source file owncmbod.f90. But there (on lines 389 and 396) is
Why? Is it wrong in the sample or has it some special meaning?
select case (INT4(HiWord(lParam))) ... case (CBN_SELCHANGE)
Why? Is it wrong in the sample or has it some special meaning?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, it's an error -- and it doesn't work. lParam for WM_COMMAND always contain control's handle.
I'd note that Murphy's Law works -- of all possible places, you picked up the one with an error :-).
I'd note that Murphy's Law works -- of all possible places, you picked up the one with an error :-).

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page