15,902,189 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 XTAL256 (Top 20 by date)
XTAL256
20-Nov-18 17:42pm
View
The code is quite complex, and it will be hard to make a simple example to demonstrate my problem.
However, since you prompted me to look at the code again, I think I see what the problem is. The code that converts HICON to GDI+ Bitmap tries to do some tricky stuff with the alpha channel of 32-bpp icons.
Specifically, my code is calling Bitmap::FromHBITMAP and passing the icon's colour bitmap (obtained from GetIconInfo). It then copies the pixel data to the GDI+ bitmap.
If I call Bitmap::FromHICON instead, then the 8-bit alpha channel is not preserved and the 1-bit mask is used instead.
I will investigate that code further.
XTAL256
19-Nov-18 19:54pm
View
path.Substring(2) will chop off the first 2 characters of path. Is this what you want? I would expect either the full path or just the file name (which would be relative to the current directory).
XTAL256
22-Jan-12 21:22pm
View
I have seen this method mentioned in other forums, when i was searching for the PowerShell way the other day. But those people just gave an example of two or more files. I didn't think of using a wildcard.
I doubt it would be much faster, but i could give it a go.
EDIT: Wow, that's super fast! I don't have access to the actual files at the moment, so i just tried it on some dummy data, but the operation took only a few seconds for 1000 files of 3Kb each.
thanks
XTAL256
22-Jan-12 18:24pm
View
Hmm, i know i am/could use C++ and PowerShell, but my question was not limited to them. But i will use those tags at your request.
XTAL256
6-Oct-11 22:58pm
View
I have actually heard of this behaviour, and i think Richard is right that the custom build rule will be skipped. I am not sure if it's correct, i just read it somewhere. It does sound strange, though.
XTAL256
21-Sep-11 20:46pm
View
By the way, if you think that System.Console.Write is a "function of programming language", you're quite far from using any of them.
The English language, unlike programming languages, is ambiguous. I'm sure what he meant to say is "functions
written
in different programming languages" :).
XTAL256
25-Aug-11 2:02am
View
OMG, <pre> is supposed to *preserve* whitespace formatting, right?!
EDIT: Ok, <pre> does, but not <code>
XTAL256
23-Aug-11 19:57pm
View
Deleted
Sorry, i don't like to bump, but does anyone have an answer for this?
I could figure out some way to do it, using custom code to create the UI option then deleting the registry branch if the option says so. But i hoped there was a more elegant and easier solution.
XTAL256
22-Aug-11 21:36pm
View
Yes, it looks like those optional args are processed in the first bit of code he posted
XTAL256
22-Aug-11 21:36pm
View
Deleted
Yes, it looks like those optional args are processed in the first bit of code he posted
XTAL256
22-Aug-11 20:56pm
View
That first part is checking the size of arguments passed to the application.
In that particular example, the application requires the user to provide at least two arguments. If there are less (
if (argc<=2)
), it will print an explanation of it's usage and state that it needs at least the arguments
[IP-address]
and
[packet-count]
. The 3rd and 4th are optional.
XTAL256
21-Aug-11 23:04pm
View
Apart from the fact that i can't be bothered signing up to yet another forum, the question posted there was slightly different to mine, and i don't want to hi-jack their question.
If anyone
here
knows the answer, then there is no harm in telling me :)
XTAL256
21-Aug-11 7:30am
View
Qt is great for the front end, and i'm sure it is also good for sound processing, but have you thought about using a library such as FMOD?
XTAL256
27-Jan-11 18:54pm
View
It should just be as simple as:
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
QStringList theArgs = QApplication::arguments();
// Do stuff with args
//...
}
What exactly do you want to do with the arguments?
XTAL256
18-Jan-11 21:14pm
View
Since some of you mentioned C# and Boost, i should mention that i am using the Qt framework.
To expand on my question, if i had a Model class which gets the batches, would i create an iterator class in a similar manner to Qt's (e.g. class iterator defined inside QList) and override the ++ operator to handle paging?
XTAL256
18-Jan-11 21:01pm
View
" Obviously I don't really know if the OP even bothers reading such comments or if he did, whether he takes them seriously :-)"
yes i do :)
XTAL256
12-Jan-11 16:43pm
View
Yeah, i wasn't sure if this was the right place to ask this. To be honest, i don't really like this "Question and Answers" format as there is often more to be said than just a simple "answer". Many questions i have seen here have lengthy discussions which often would help the person but are not classified as direct "answers".
Would it be better if i post this on the message boards?
XTAL256
11-Jan-11 19:29pm
View
Regarding MVC, my model is what i posted above (the MainObject classes) and the view (for the property dialog) would be the HTML window. But what would the controller be? That is the part of MVC that i don't understand.
XTAL256
11-Jan-11 17:10pm
View
Hi SAKryukov, thanks for your answer.
I am aware of the MVC pattern, although i never fully understood it (i get that it separates logic and UI, but that's only a basic understanding). I will read those links in the hope of learning more about it.
I understand that my first option is not ideal, i mentioned it because it is the easiest way i can think of to do such a thing. Obviously my question was how to do it better.
The menu problem is complicated since it involves executing actions. I will focus my question more on the property dialog. This dialog shown properties of an object and i want to give it tabs which display properties specific to each object type. The dialog uses HTML to display the data in a table, and the code to build that table is currently being done in the UI class. But now that i want specifics for each subclass, where should this code go? Like the menu problem, the model classes shouldn't be responsible for creating data for the UI. But i need to utilise polymorphism so the dialog can be used for all model objects yet display specific data.
XTAL256
4-Dec-10 4:19am
View
Awesome, thank you very much! I didn't know about that "Languages" tag, i only knew that you can use the {language} variable in the source or destination directory.
I was expecting to have to do some very ugly code to conditionally install files using some script or something. Turns out Inno has a very elegant solution. Just another reason to like Inno (much better than InstallShield, which i have also worked with)
Show More