|
hdsouza1 wrote: I dont even mind paying for it.
This site does not implement any sort of pay for help model. There are some though. I imagine you can find them using Google.
led mike
|
|
|
|
|
Disclaimer: I know this is the C++ forum but I didn't see a general programming questions forum. I looked, and if I overlooked it, I do apologize. Also, I imagine this would be a subtle bug-type thing, but that forum said not to post questions. My reasoning for placing this question here: there was nowhere else for it to go and if I had a choice, I'd be doing it in C++ anyway...
Enough begging for my life, I suppose. My issue is that I'm trying to create a file and it just won't happen. I keep getting an error saying "No such file or directory exists". (Another excuse: this has happened to me (and classmates) before using C; it got to the point where anytime we had an assignment where we wrote to a file, we were to create it in advance.) The bad thing is everywhere I search, the tutorials say that the file will be created if it doesn't exist. It's not happening. I do admit that it did work a couple of times in IDLE but it seems as though the command works when it wants: if I copy the open(filename) or file(filename) command that worked earlier and try to run it again, I will get that same error.
Even more frustrating, if it works in IDLE and then I try to run the same command as part of the routine I'm running, I get the error message again!
I'm at my wit's end-- I've done it the way everyone says to, and I've tried feeding both commands filenames and entire paths. It just seems like it'll only work when it's in the mood to.
Can anyone think of some stupid condition that may be affecting Python's ability to create files? (I need permanent files, not temporary ones).
Again, I'm sorry to put this in such a strange place, but I'm all alone in this at the moment and I've been working on this one problem for days. It's halting my progress...
Thanks for not biting my head off (hopefully!)
G-Lynx
|
|
|
|
|
GeekLynx wrote: Can anyone think of some stupid condition that may be affecting Python's ability to create files?
yes, you are experiencing the very well known ID Ten T error.
led mike
|
|
|
|
|
That's really charming. Really. But seriously- if I'm missing something obvious smack me over the head with it, please. I hesitated to say this before because I thought it would be clear: I'm not a comp sci 101 student begging for code. While I am a student, I'm a serious one and I only posted for help here as a last resort. I'm in the middle of a research project and my professor is in the hospital. Thus, it'd be rude of me to bother her with this... There's only one other cs instructor in the entire school and he's literally asking me for help.
I suppose I can find another site to admire and aspire to be a contributing member of if I'm going to be brushed off like this, but it'd be nice if I got a non smart-alecky answer to this one little question before I left for good.
-
The Geek
|
|
|
|
|
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.
|
|
|
|
|