Thanks alot matsp. I'm not sure how I forget this stuff...
Type: Posts; User: Gerread
Thanks alot matsp. I'm not sure how I forget this stuff...
I really shouldn't be posting this because i've done this before, but the way of doing it that i was 100% sure about is causing errors and I can't find example code that goes through the 10 or so...
I use GetFileSize to work on stuff before the save and it works fine, but I tried a GetFileSize before the WriteFile and it returns a valid size.
I don't understand what you mean.
I took the GetFileSize out of the parameters and had it set a variable, which was then passed in WriteFile. It still returns the error, though.
I am using WriteFile(); with an OVERLAPPED structure but it returns ERROR_INVALID_PARAMETER, which I googled to find out it happens when the OVERLAPPED structure hasn't been initialised to zero. I...
Supplying the full path did the trick!
I am using C here. I'll take your advice and remove the casts in favour of stdlib.
I am using ShellExecuteEx to run an external program which works fine on my end. Various people who have tried it are getting very strange errors though. I read a topic on MSDN forums that...
That stopped it from complaining. Thanks for the insight. I suppose that means wtih including stdlib, I can just cast it as whatever. It didn't fix the crashing (ofcourse) but it's one less thing...
Declared:
unsigned char* mem = function();
Proto:
unsigned char* function(void);
Relevant function part:
My current problem is about the compiler giving warnings that don't make sense to me, as in I don't understand why they're happening.
"initialization makes pointer from integer without a cast"
...
I made an error. It is not fault of playsound, but because ShellExecute returns before the program it calls is done processing, causing the immediately following PlaySound to play and old .wav. I...
I have a program which plays a sound depending on input from the user. The source file is a single file that is overwritten when the user makes a new choice. The problem is, it plays the sound so...
I'm at a loss...I can't come to grips with the fact that the only way to get the window to fix it's scroll bars after coming back from full screen is to resize it manually. That is just ridiciulous,...
Here's how I have it.
Parent window resized -> parent handler adjusts status bar and adjusts size to fit client area (and child window) into the new size. A MoveWindow is what gives the child...
I have two questions to ask here.
First, I have custom maximize / restore handlers. Maximizing by clicking the button or right clicking the caption bar and selecting maximize works normally, by...
anonytmouse, that fixed it up perfectly. Not a speck of flickering. Thanks.
The code I have now functions fine, it's just that when the window resizes the scroll bar flickers horribly. The image is fine, it's just the scroll bar. Shaft and all. These black rectangles...
Thanks, now the status bar appears just fine. I changed the application to use 1 big parent window and child windows for the status bar and scroll area. Now I'd like to know if there's a...
My current problem involves taskbars. I've added libcomctl32.a to the linker stuff in my project options in Dev C++ and included commctrl.h and it compiles OK. I have the code in my WM_CREATE for...
This is the most ridiculous screw up I've done in recent time. I was clicking the restore button when I missclicked it and hit the minimize button instead. My message box appeared and it was...
Oh man...I'm at a loss here. I tried the absolute simplest thing I could think of and yet, it still doesn't work!
case WM_SYSCOMMAND:
if(wParam == SC_MINIMIZE)
{...
case WM_SYSCOMMAND:
SysCommandHandler(wParam);
return DefWindowProc(hwnd, msg, wParam, lParam);
void SysCommandHandler(WPARAM wParam)
{
if(wParam == SC_MAXIMIZE)
{
I have a program where I would like to set a few things depending on maximized or minimized state. I tried the WM_SYSCOMMAND where it has SC_MAXIMIZE and SC_MINIMIZE of which SC_MAXIMIZE does work...
Thanks, looks like what I'm after.