This way it stops at the first index and always returns a 9 :(
Type: Posts; User: Brigs76
This way it stops at the first index and always returns a 9 :(
quick question that is driving me insane..
I have a for loop that loops from 9 to 12 to check if the mouse cursor is above any of the items with index between 9 and 12..
for (int i = 9; i...
I have the following code example that creates a linked list:
#include <iostream.h>
/* Here is our Node (our structure) that contains the information
we want along with a memory address to the...
Oye! It works, I didn't know about fgets, reads things one line at a time. Learn something new every day.
Thanks!
Here is the situation. I need to load a list of text into a listbox. I have a text file that has the list in this format:
item1
item2
item3
I than open this text file and load everything into...
that line does nothing for me as I am making a windows program, not dos, so the printf does not output anything.
I am trying to read in the text of all items in a listbox and copy that text to an edit box (text box). However when I do, the string that is suppose to store all the items of the listbox only stores...
I've decided to approach this from a different way. Save the listbox content to an edit box and than save that to file.
Can someone please point me to an example C program that allows to Save and Load listbox content? I know how to save and load edit box content but listbox is a bit trickier.
Hi,
I am trying to retrive the text that is located in a listbox. I am using:
GetDlgItemText(dlghwnd, LV_Course, EDC, 200);
where LV_Course is my listbox and EDC is the string that is...
How can I add an "string" to a string variable to make it into one big string? I have code that returns the current path of the program:
char cDir[150];
GetCurrentDirectory(150,cDir);
Now I...
Ok, works for the most part, but there is some garbage at the end of the string. Something like this:
http://img9.echo.cx/img9/73/gb5ra.jpg
Does anyone know if there is an "TextOut" equivalent function for numbers? I need to draw some floating point numbers, or at least integers on screen in the WM_PAINT case. I am able to draw text like...
If i make it global and declare at the top than dlghwnd becomes undeclared as it is the HWND of the dialog window.
For example in the Dialog Window Proc I assign some values to an integer variable. Than I need to use this variable in another Proc such as WndProc but it does not recognize the variable in WndProc,...
Gives a warning:
[Warning] passing arg 1 of `GetDlgItemInt' makes pointer from integer without a cast
and returns a value of 0 when it's suppose to be something else.
I have a Dialog window and on it I have an edit box. I want to retrieve the integer value in the edit box and point it to a variable. However the following code does not work:
int Pval1 =...
hmm, is it possible to call an if statement within WM_PAINT such as:
case WM_PAINT:
{
// Just a note, never use a MessageBox from inside WM_PAINT
// The box will cause more WM_PAINT...
Ok here is the situation. I loaded a bitmap to the screen using windows GDI. I did this in the WM_PAINT function. Now what I want to do is when a user clicks on a file menu, the screen must become...
excellent, thank you, that was the problem :D
I downloaded the winprog.org bmp tutorial and when I complile and run the program it gives the error "Could not load IDB_BALL!" which is an error handler within the program. However it should be...
ahh thanks, that works
Ok that makes sense. however when a user entered a string such as 1001001011000011 how can i go about splitting it every 4 digits?
Is it possilbe to reverse this piece of code to do the opposite? Right now it succesfully converts a hexadecimal number to a binary. How can I make it do the opposite? thanks.
int...
Can you please give an example of how to do that? I am relly new to C programming.
Many thanks