The answer is simple, but very illusive!!! while (GetMessage(wmsg, FWindowHandle, 0, 0)) do begin if not ( IsDialogMessage(FWindowHandle, wmsg) ) then ///this is the line you nees to add TranslateMessage(wmsg); DispatchMessage(wmsg); end;
If you look at what TranslateMessage actually does it all becomes clear. Matt ----- Original Message ----- From: "L D Blake" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 23, 2003 3:17 AM Subject: [fpc-pascal]Ummmm... anyone know why this doesn't work... > Ok, 3 checkboxes defined on a small window on win2000... > > > s := 'Start processing when loaded'; > OToy[1] := createwindow('Button',Cstr(S,cpt),ws_tabstop or > ws_child or ws_visible or bs_autocheckbox, > 10,15,185,20,Ohandle,1,mdrProg,nil); > s := 'Exit when done'; > OToy[2] := createwindow('Button',Cstr(S,cpt),ws_tabstop or > ws_child or ws_visible or bs_autocheckbox, > 10,35,180,20,Ohandle,2,mdrProg,nil); > s := 'Make noise when done'; > OToy[3] := createwindow('Button',Cstr(S,cpt),ws_tabstop or > ws_child or ws_visible or bs_autocheckbox, > 10,55,180,20,Ohandle,3,mdrProg,nil); > > > Cstr is a pascal to c string converter routine that takes a normal pascal > string (S in this case) and hands the winAPI a pointer to a null terminated > buffer (cpt)... tested and working elsewhere as well so that's not the > problem. > > The little app is up and going, error free, but for the life or me I can't get > the ws_tabstop function to work... When the app loads nobody has focus and I > can hit the tab key all day and nothing happens... > > Why can't I tab between these controls? > > ----- > L D Blake > > > _______________________________________________ > fpc-pascal maillist - [EMAIL PROTECTED] > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > _______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal