15,881,089 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by M@gelearn (Top 42 by date)
M@gelearn
22-Mar-21 12:09pm
View
Just one more thing to add, just because I did not see it in your code, this doesn't mean you didn't know it and I'm sure you forgot to free the memory at the end.
I just did this before the function ended free(usernames);
M@gelearn
22-Mar-21 12:04pm
View
Ohh.. that's awesome.. :)
Thanks Richard.. I feel happy.. and 5s for your solution.
Well.. I'm too low in knowledge, soo this was a great lesson for me, and doesn't mean I solve the problem.. more will come. I fell however sad in the end, cose in almost a year of reading and doing small programs I wasn't able to solve this one. Maybe just because I didn't have a teacher, I just do this on my own cose I like it. I wish I could give you another 5 stars , cose you deserve it.
Thanks again and my apologies for bother with these things, but for me means so much.
Cheers !!!
M@gelearn
22-Mar-21 9:09am
View
Ohh sorry McCutchan, but I still don't understand how to do this, I did cast malloc in a while loop here:
while(enteries < k && fgets(buf, sizeof buf, file2) != NULL)
{
selector[enteries] = malloc(strlen(buf) + 1);
strcpy(selector[enteries], buf);
++enteries;
}
still doesn't work.. :\
M@gelearn
22-Mar-21 6:15am
View
The code works only if I assign its size from the beginning like this for eg.
#define LINE 20
and my array will be
char *selector[LINE];
M@gelearn
22-Mar-21 5:34am
View
I will post in short time what I do really want to do with this array of pointers, and I hope someone will make me understand why I can't assign the size like I do..
M@gelearn
22-Mar-21 5:32am
View
Okay.. I understand, thank you for your answer..
M@gelearn
5-Oct-20 19:18pm
View
Well I add this:
int len = strlen(data2);
if(data2[len - 1] == '\n')
data2[len - 1] = '\0';
after the:
fgets(data2, MAX, stdin);
and I clean the new line. Now I get all lines included the line I wanted to change without any new line between them.. still the problem persist, comming back to my first question, that the line 2 must be deleted and the new line must take THAT place, instead my line take the first place everytime.
M@gelearn
19-Aug-20 13:27pm
View
printf("\n\tElement %d = %d\n", k, ); this is the line 41 and the same for the 68
M@gelearn
3-Aug-20 3:40am
View
Yes, yes .. the problem is not that with the option 1, 2, 3, 4 or 5 I refer to the premenu when the user first input the number. If the user type an alphabetic 'a' or 'b' or any sign like '\' or ']' or any other signs the program breaks. That's the point of my question. Ofc. if I resolve the premenu, I can add same code to avoid user type other than of 1, 2, 3, 4 or 5 .
M@gelearn
10-Jul-20 10:07am
View
I changed to wcscpy but it take only 2 arguments.. and yes I tryed even string.h but is not declared on gcc. I used TCHAR cause I just copy the example from the MSDN, but they don't specify headers and on which compiler is working. So in other words I have to use the wcscpy and forget about the TCHAR as it works for Unicode only..
Thanks again Richard..
M@gelearn
9-Jul-20 9:04am
View
Thank you Richard.. Gonna go and read some stuff..
M@gelearn
9-Jul-20 8:32am
View
Well thank you Rick .. this was the right solution. I can tell ya that I saved like 10.000 lines in my project with the vector.
Thank you once again..! 5 :)
M@gelearn
7-Jul-20 0:50am
View
Hehe..Already know this, that is what I was start with.. Ty very much..
M@gelearn
7-Jul-20 0:50am
View
Hehe..Already know this, that is what I was start with.. Ty very much..
M@gelearn
6-Jul-20 11:01am
View
Yes Richard I'm Reading about right now here:
https://docs.microsoft.com/en-us/windows/win32/controls/wm-notify
I know that my code it works and I'm actually aware that my problem with windows message handling is continuing.. I work hard to understand them since I begin to learn solo. No Teacher no nothing just from scratch .. Is not recommended, but I'm sure if I arrived here I can get higher, cause I like it. That's why I insist sometimes to the answers, and I ask for more info about it, because I'm not familiar with everything, so I wanna ask to be patient with me.. Thant's all.
M@gelearn
6-Jul-20 10:21am
View
Yes Richard now I ignored cause I saw it never shows what it's suppose to show.. So in example I wrote up I Ignored totally and I passed over.. I just substitute the column and the second becomes 3rd and the third becomes the 4th..
I ignored cause I did want to.. I did it to see if the text shows over the next 3rd and 4th columns.. and yes it did showed But this was't the problem .. Like I mentioned I was having the same ID and the same NUM_ITEMLEN for the both of the controls which is not that great .. and change them to have different IDs.. And now works just fine..
Thank you however.. seems you show up every time when a problem is on the road.. :)
Ohh and by the way Sorry for the last post and the 1 Point offered.. I was really pissed off by other things and the code bugged .. I.. I think I show some apologies..
Hope you didn't get upset.. My bad as always .. Since I'm a beginner I ask left and right and I expect every time concrete answers.. but I know every of us is working and doesn't have time for every problem is on the forum.. So once again my apologies..
M@gelearn
6-Jul-20 5:28am
View
Well I'm not sure how to do that.. but sound correctly the way you mention..
Ok thank you for now .. I'll figure out something..
M@gelearn
3-Jul-20 11:58am
View
Sorry about that.. I didn't say I have errors if you read well the message.. people today get mad cause they have their own problem, and they don't want other, that doesn't mean anyone have to be upset I don't expect anyone to resolve my problem who is bored to such a simple code just ignore me, I'm not at your level. If anyone wanna make me understand what I have done wrong or maybe I miss something bless him. I said I've copy the same link and I don't get any errors my window appears I just don't see any Header control. That's all
Thank you very much for the help..
M@gelearn
2-Jul-20 6:11am
View
Ohh now that this work thanks to your help I wanna ask another question.
So in my view list I have all I need but, One thing I miss I don't know how to make resize every column the size of it is set early , but takes effect on all of the columns I have.. and How do I set a had raw like first line, second line to have a number in my list..
Thank you..
M@gelearn
2-Jul-20 6:04am
View
works perfectly...
M@gelearn
2-Jul-20 6:03am
View
Ok I think I found the Solution
I change to Wide Char in typedef struct
// structures
typedef struct tagABRINFO
{
WCHAR szSymbol[MAX_SYMBOLS];
WCHAR szDescription[MAX_DESCRIPTION];
} ABRINFO;
first was char
then I added L to each element L"" in the structure
and change this line also to
LV_DISPINFOW *pLvdi = (LV_DISPINFOW *)lParam;
first was
LV_DISPINFO *pLvdi = (LV_DISPINFO *)lParam;
Ty again.. :)
M@gelearn
2-Jul-20 5:41am
View
Yes I used pLvdi->item.pszText = (CHAR *)L"LVN_GETDISPINFOW"; and is shows Corecly..
M@gelearn
2-Jul-20 5:13am
View
My Pc (win 7 x32)
M@gelearn
2-Jul-20 5:11am
View
when I use LVS_OWNERDATA
M@gelearn
2-Jul-20 5:11am
View
Problem Event Name: APPCRASH
Application Name: MyApp.exe
Application Version: 0.0.0.0
Application Timestamp: 00050000
Fault Module Name: COMCTL32.DLL
Fault Module Version: 5.82.7601.18837
Fault Module Timestamp: 553a83e2
Exception Code: c0000005
Exception Offset: 0000c7d1
OS Version: 6.1.7601.2.1.0.768.3
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
M@gelearn
2-Jul-20 4:47am
View
and I add LVS_OWNERDATA and right away I touch the item on menu that show the listview the App. crush with an error that refers to comctrl.dll
M@gelearn
2-Jul-20 4:41am
View
Hmmm.. I just saw something right away in your message the LVN_GETDISPINFOW, I use LVN_GETDISPINFO only so I add W right away... now list display but I see only signs or something like chinese language..
M@gelearn
2-Jul-20 4:13am
View
The list view should appear when user clicks on the Menu item. Is a new component in the window. The code that I show is the one from MSDN but I only cut the parts that I don't really need in my project so.. the images, other columns, the view style icons small icons etc.. and I first tried the code in the MSDN project and was working, the code showed up what I wrote to show , but when I transpose the code in my project all was fine olumns head columns name , but what was in the list under everything is invisible.. I can select the raws but the text doesn't appear..
M@gelearn
2-Jul-20 3:49am
View
Actually I have that case in my NotifyHandler.. and it doesn't work
M@gelearn
24-Jun-20 1:27am
View
I didn't either modify the function to extern void. My apologies I should't write this since I was missing just this..(hwnd)... However.. I appreciate your help.
M@gelearn
23-Jun-20 23:58pm
View
oky doky.. done..
i didn't do this on WM_CRATE:{ StaticWindow();
break;
}
I forgot to add "hwnd" in StaticWindow(hwnd); ofcourse it doesn't work...
Thank you ..
M@gelearn
23-Jun-20 23:52pm
View
The both files are in the source.. Same error.. I do not understand what I'm doing wrong
M@gelearn
23-Jun-20 23:36pm
View
I did add extern but I get the same error..
M@gelearn
17-Jun-20 9:18am
View
Well like I said .. I just removed the IDOK from the Dialog so the user can only use X to close it, and that works fine with the custom cursor.
Hey thanks again for help... cheers!
M@gelearn
17-Jun-20 9:09am
View
Thanks Richard.. I paste the WM_SETCURSOR to the other windows, that I have in the project, and now it works perfectly..
Still one case I don't know how to change the cursor..
I have the About window and the OK button that is deffined in the .rc file like this:
DEFPUSHBUTTON "&Ok", IDOK, 174, 66, 50, 14
I had to remove this button, cause when I pass over the cursor changes to default arrow of the system. And I have no idea how to change the cursor when it pass over the IDOK
case WM_COMMAND:
switch(wp)
{
case IDOK:
EndDialog(hWnd, IDOK);
break;
}
break;
M@gelearn
18-May-20 9:31am
View
Okay Richard that's what I meant to do..
Thank you very much for your help..
M@gelearn
15-May-20 11:44am
View
yep..
M@gelearn
15-May-20 11:21am
View
yes my compiler is 32 bit... IF 64 I would use the LPARAM well that's what the function expectes.
hChild = (HWND)SendMessage(hMDIClient, WM_MDICREATE, 0, (LPARAM)&mcs);
M@gelearn
15-May-20 11:04am
View
Well i did change that and doesn't change anything.. the child window refuse to create.. :(
M@gelearn
24-Apr-20 14:27pm
View
yahh..I have half day doing this and that .. all ppl. answered .. maybe they all have right.. with the first loop not using goto instead while loops and the last void function not to call main() recursively .. I'm lost :\ need to take a brake ..and maybe tomorrow I'll retry... Ty for answer me as well...
M@gelearn
24-Apr-20 8:53am
View
A common scenario for using the debugger by setting the breakpoint at the goto statement.
It's exactly what I've thought, but it is not that what doesn't work properly in main function .. are those options that doesn't contain goto .. so I don't really know why should I use breakpoints on debugging goto statement when option 1 and 3 doesn't contain goto statement even if they make part of the loop.
And yes I was thinking to gameOver state too, but changing the global variable as true will exit the console right after you run the program.
M@gelearn
21-Apr-20 8:11am
View
Ohhhh.. right. I thought it was something very simple. I didn't think to change it from void to an integer. It works just fine.. thank you so much. !! :)
Show More