I'm not using MFC at all and My ListView control is in a mdi child window. So I can't use that code. I did mention I was not using mfc but I didn't mention what kind of parent window the list view was in because I didn't think it was important. Sorry about that. btw Ryan Binns, you edited your answer to say "if you're using win32, just check your message loop". Do you think that answers my question? It doesn't. I admit I didn't search the forum for an answer before, but I have now. And it's not there.
Melekor
Posts
-
[win32]ListView doesn't generate VK_RETURN -
[win32]ListView doesn't generate VK_RETURNI am already handling LVN_ITEMACTIVATE, which only seems to get sent by double-clicks. Thanks anyways though.
-
[win32]ListView doesn't generate VK_RETURNI posted some replies to your nasty comments but I deleted them. I'm just wasting my time. I don't know why you guys have to be so mean about it, you're so perfectly willing to post degrading comments, even saying that I am not interested in helping myself. Well, HF picking on the newbies guys. Later.
-
[win32]ListView doesn't generate VK_RETURNI have a ListView control and I want it to do something when the user presses enter. So, I have put in a case for LVN_KEYDOWN, which seems to work fine for most keys except enter. I never recieve a VK_RETURN in the wVKey member, no matter how much I press the button :wtf: So, is there some style I need to set or something? What do I need to do to be notified when the user presses enter in the ListView control? Thanks, Melekor
-
Maximum functionuse a macro like #define max(a, b) (a > b ? a : b) or if you need a variable ammount of arguments, create a function that uses va_list, like this one (MSDN example)
-
Tab order in win32 dialogWS_TABSTOP! I didn't even know that style existed. Thank you Michael and Neville, with your two suggestions together, it is now working like a charm :-D
-
Tab order in win32 dialogThat sounds good, but I guess I don't know how to use it right because it's not working. I created this
Inline void IncZOrder(HWND hWnd) { static HWND LastWindowCreated = 0; SetWindowPos(hWnd, LastWindowCreated, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); LastWindowCreated = hWnd; }
now after I create every control, I call that function with its hWnd but it doesn't work, I still can't tab between the controls. I'm pretty sure my message pump is correct to handle dialogs:while(GetMessage(&msg, NULL, 0, 0) > 0) { HWND ActiveWindow = GetActiveWindow(); if(!IsWindow(ActiveWindow) || !IsDialogMessage(ActiveWindow, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } }
What else do I need to do? Thanks! -
Tab order in win32 dialogI have a modeless dialog box where I create all the controls myself in the WM_INITDIALOG message. My question is how to set the tab order of these controls. (Don't ask why I'm not creating them in the dialog resource :)) Thanks, Melekor