|
GeekLynx wrote: but it'd be nice if I got a non smart-alecky answer to this one little question before I left for good.
Well isn't that sweet, you are complaining about the potential free help you get here when you can't even take the time to find an appropriate forum on the site to post your question into. Ever heard of Personal Responsibility? Or is the concept lost on you that your experience could be directly related to what you put into it? But go ahead and blame everyone else for your problems, seems to be very normal these days.
led mike
|
|
|
|
|
That was one of my problems- I didn't see a forum where this would fit into. Could you at least let me know where this should have gone(I really did look)? Sorry if I seemed like I was trying to get something for nothing because I wasn't.
Also, show me where I'm complaining since I'm missing so many obvious things lately. I just wanted a civil answer to what I thought was a semi-lucid question.
Oh, and thanks for your "help", mike.
|
|
|
|
|
GeekLynx wrote: Oh, and thanks for your "help", mike.
Well when I read the first part of your post I was planning on continuing to help you. But since you decide on continuing to make me the villain in this story I guess I will continue to play my part. F*** off a**hole.
led mike
|
|
|
|
|
Wow, continuing to help me? You've done nothing but antagonize me- there wasn't a helpful word in any of your posts. I'd been trying to be respectful but there's a difference between deferring to those with more experience and butt kissing; I refuse to do the latter.
Not once have I made you out to be a "villain", as you put it. How would you react if someone just out of the blue jumped on you? Go ahead with your little "you posted in the wrong forum" spiel-- I suppose I deserve it even though I've specifically said I could not find an appropriate forum and I've asked where I should have posted and gotten no response.
I just couldn't let this go. You act as though you have a chip on your shoulder- no cs pun intended. Whatever your beef is, I do wish you peace and I hope you resolve it. You can continue to beat your chest here in this thread if it makes you feel big. I am officially washing my hands with you and this website which, btw, I had fallen in love with- if people are going to be like this it's not worth it...
Yes, I hope you feel big chasing away well-intentioned yet confused newcomers. I'm off to find somebody who actually knows enough to help me!
ja ne, oh Villain,
Geek
|
|
|
|
|
This whole thread belongs in the lounge, it's the best joke I've seen all day.
I wonder if GeekLynx is actually serious here, or just trying to be funny.
Nice work Mike, even if the language was a little rough round the edges.
|
|
|
|
|
Hi!
I'm new to mfc programming.
I used the wizard to create a basic application with doc/view and odbc database support. The wizard also created a menu for the frame. There are commands for record actions (for example Next Record). They are working fine, but I'd like to change the functions. I was looking for event handler codes, but I didn't find them for record actions. Where can I find the message handling for them?
Thx for your help!
|
|
|
|
|
I am moving a ComboBox with:
m_cCombo.MoveWindow(x,y,w,h,TRUE);
After that the Combo does not show a Drop List.
What could be the matter
Bram van Kampen
|
|
|
|
|
I guess you broke something
I can't reproduce that on Vista - here's my test code:
CRect rct;
m_ComboBox1.GetWindowRect(&rct);
m_ComboBox1.MoveWindow(0,0,rct.Width(),rct.Height());
What are the styles of your combobox?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I Used the wizzard to design the Combo, VISIBLE is initially turned off, but left on for debugging. The only other Attribute set is VSCROLL. At this stage, the text is static. I move the Combo over a Listbox Item. For debugging, I immediately hide the Listbox. Combo arrives at the right location, but no Dropdown.
Since this posting, MSVC Compiler Crashed in a 'Rebuild All' (Fails to complete Browser DB)
I Killed it tru Windows Task Manager. Restarted...
Rebuild All...
This time the combo drops two lines, Has no Frame, and No Dropdown Buton.
Going to Restart the Computer and see what happens.
Thanks
Bram van Kampen
|
|
|
|
|
Sounds strange! You DID break something!
Try adding the CBS_NOINTEGRALHEIGHT style to the combobox.
If there's no items in the list, without this style
it may not drop down.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Sounds strange! You DID break something
I know I did. Very few lines at this stage to do it in though.
Restarted the MC, No Difference. I'm going to add a TestDlg to the project, and do the same thing, and I'll let you know how I get on.
By the way:
Mark Salsbery wrote: Try adding the CBS_NOINTEGRALHEIGHT style to the combobox.
If there's no items in the list, without this style
it may not drop down.
Well the list was populated (statically) with 5 dummy items. Tried this, Made no Difference.
Regards
Bram van Kampen
|
|
|
|
|
Very Strange!
Started a Test Dlg, Moved the Combo Box: No Problem.
Added a Listbox, Combo refuses to dispay on top of the ListBox.
Still displays without dropdown, or dropdown button in original code!
Bram van Kampen
|
|
|
|
|
Maybe the combobox is under the list box in the z-order?
Just guessing - maybe try SetWindowPos to move the combobox
up in the z-order or make sure it's last in the dialog template.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Had thought of that, tried that, by editing the template, and by calling SetWindowpos; Makes NO difference!
It remains a Mystery!!
Regards,
Bram van Kampen
|
|
|
|
|
When you use MoveWindow on a combo box, the rectangle you supply must include teh area the drop list will be displayed to as well. When the drop list is not shown, the combo box automatically limits itself to the height of the current selection and droplist icon.
Basically, you need to change the h parameter and make it larger so the drop list will have an area to expand into when its shown.
If you vote me down, my score will only get lower
|
|
|
|
|
On what OS?
It doesn't behave that way on Vista.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
In XP this appears to make no difference. Without the ListBox, the dropbox expands after moving, even if I set the height to 0. iow,I think that the Height param is ignored in this case.
thanks though, it was woth a try.
Bram van Kampen
|
|
|
|
|
Im trying to create something to resize my own GUI,
It works beautifully if i wanna shrink the think, but if i want to make the area grow it dosnt like it, im presuming its because im moving my most outside the window area but i dont know how to sort that.
so basically is how to i capture what the mouse does when it moves off the edge of my window
modified on Sunday, October 12, 2008 10:39 AM
|
|
|
|
|
|
how would i use that
the code below is basically what i have for the mouse down, up and move ( sometimes the window dissapears and sometimes it resizes a littlebit then dissapears, im not sure what to do tbh
case WM_LBUTTONDOWN:
if(
{
SetCapture(hWnd);
mResize = TRUE;
}
break;
case WM_LBUTTONUP:
{
ReleaseCapture();
mResize = FALSE;
}
break;
case WM_MOUSEMOVE:
{
if(wParam == MK_LBUTTON) && mResize)
{
RECT rcWnd;
POINT pnt, pntDiff;
GetCursorPos(&pnt);
GetWindowRect(hWnd, &rcWnd);
DeleteObject(hRegion2);
DeleteObject(hRegion1);
pntDiff.x = pnt.x - rcWnd.right;
nWidth = nWidth + (int)pntDiff.x;
pntDiff.y = pnt.y - rcWnd.bottom;
nHeight = nHeight + (int)pntDiff.y;
MoveWindow(hWnd,rcWnd.left, rcWnd.top, nWidth, nHeight, TRUE);
HRGN hRegion1 = CreateRectRgn(0, 0, nWidth, nHeight);
HRGN hRegion2 = CreateRectRgn(0, 0, nWidth, nHeight);
CombineRgn(hRegion1, hRegion1, hRegion2, RGN_OR);
SetWindowRgn(hWnd, hRegion1, true);
UpdateWindow(hWnd);
}
}
break;
|
|
|
|
|
OOpsie!
Did you realise you're changing the size of the regions every time the major block of code in the WM_MOUSEMOVE message is processed?
What are nWidth & nHeight to begin with?
Since you can't click below or to the right of your window, pntDif.x & pntDif.y are always going to be negative. By adding these to the (unknown) values of nWidth & nHeight, you are rewarded with a window that shrinks.
|
|
|
|
|
well my nWidth and nHeight are global variables with the form/region and bitmap use to create my GUI
initially set to 506x376.
i dont know much on how to resize it, which is annoying cause it should be straight forward math
basically i have the width and the height, i have it set to check whether the mouse is in the bottom corner (which works)
and when i click on it and drag it outwards, i want it to resize with it like a normal window would do,
but eitherway its causing major problems lol, i managed to get it working when i clicked and dragged and the resize would happen on WM_LBUTTONUP but that didnt give a sizing/growing effect with it, and additionally i dont know how to stretch the skin out either(i didnt particulaly want to do it with multiple pictures and layers lol so any help would be really good, if i could send the actual code to someone that would be better and they could take a look whats wrong but all i can give is bits at the time atm
|
|
|
|
|
Yeah sure, I'll have a look at the code as long as it's not MFC, as I don't have it.
enhzflep at yahoo dot com dot au
|
|
|
|
|
Changes to your code marked in red...
<code>POINT AnchorPoint;</code>
...
case WM_LBUTTONDOWN:
if(
{
SetCapture(hWnd);
mResize = TRUE;
<code>::GetCursorPos(&AnchorPoint);</code>
}
break;
case WM_LBUTTONUP:
{
<code>if (mResize)
{</code>
ReleaseCapture();
mResize = FALSE;
<code>}</code>
}
break;
case WM_MOUSEMOVE:
{
if(wParam == MK_LBUTTON) && mResize)
{
<code>POINT newPoint;
::GetCursorPos(&newPoint);
if (newPoint.x != AnchorPoint.x || newPoint.y != AnchorPoint.y)
{
RECT rcWnd;
::GetWindowRect(hWnd, &rcWnd);
rcWnd.right += (newPoint.x - AnchorPoint.x);
rcWnd.bottom += (newPoint.y - AnchorPoint.y);
::MoveWindow(hWnd, rcWnd.left, rcWnd.top, rcWnd.right-rcWnd.left, rcWnd.bottom-rcWnd.top, TRUE);
AnchorPoint = newPoint;
}</code>
}
}
break;
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Also...
When you handle any of those messages, you should also return 0 to
indicate you've handled the message instead of passing it on to the
default window proc (if that's what you are doing).
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|