10 Replies - 2199 Views - Last Post: 17 February 2011 - 09:22 PM

#1 Cobok   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 31
  • Joined: 18-March 07

C++ ,Interfaces, Win API and a new project.

Posted 16 February 2011 - 08:49 PM

The reason I'm posting this , is I recently had this idea ,that I could ditch the standard windows GUI for the biggest part of my day ,and create my own , so that I could gather beautifully on screen all the data I need such as e-mails , weather ,Files&Folders , Music ,Movies ,plus I would apply my own filters for each category.
So for example a process would scan websites for keywords every 5 minutes , an RSS reader would get my feeds and a Mail reader would synchronise my e-mails (maybe I could pull off data from existing solutions here). Another process would scan key folders for changes , and according to filters would fill up music and Movies... etc...

Maybe it could look like: http://fastcache.gaw...ge_1000-gui.jpg ?

So , it's a pretty daunting task , and I am not sure I can even pull this off sometime this year...

After working with C , and then C++ for almost a year , I have learned almost every detail of the native language , only to learn that after hours and hours of work , I am still a complete noob regarding anything to do with the real world (except if the real world has to do with object oriented programming for the console :P ).
I have begun studying how the windows API and the whole way of managing windows and controls works. Is it worth to keep pursuing this through C++ or should I try to do some of that stuff through , say , Java , or any other method...(I don't know how to use Java yet though ) .

<off topic> Should I, in general , continue to learn the windows API ? Or do you think I could use my time with some other aspect of programming?</off topic>

On with the project: Is it actually feasible to do in your experience?
If yes , to start off with the hardest(for me) part , how can I create a good GUI , as the standard drawing functions of windows so far seem ... a bit worthless for the job :) .
I have seen good enough effects done with widgets , but I was considering maybe a complete ditching of "explorer.exe" ?


Any opinion on the matter would be greatly appreciated...

P.S. Sorry for making you go through all that text :P

This post has been edited by Cobok: 16 February 2011 - 08:49 PM


Is This A Good Question/Topic? 0
  • +

Replies To: C++ ,Interfaces, Win API and a new project.

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14175
  • View blog
  • Posts: 56,786
  • Joined: 12-June 08

Re: C++ ,Interfaces, Win API and a new project.

Posted 17 February 2011 - 08:00 AM

Just as an aside - if your biggest problem is the GUI layout and lack of widgets why not invest sometime in an app like Samurize or something similar (Windows Blinds / Stardock)?

That image looks like it might have been someone's theme for one of the tow above.

This post has been edited by modi123_1: 17 February 2011 - 08:00 AM

Was This Post Helpful? 0
  • +
  • -

#3 Cobok   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 31
  • Joined: 18-March 07

Re: C++ ,Interfaces, Win API and a new project.

Posted 17 February 2011 - 08:42 AM

View Postmodi123_1, on 17 February 2011 - 05:00 PM, said:

Just as an aside - if your biggest problem is the GUI layout and lack of widgets why not invest sometime in an app like Samurize or something similar (Windows Blinds / Stardock)?

That image looks like it might have been someone's theme for one of the tow above.


Yes , I am aware of the widgets and apps that can achieve a look like the image , but the problem is to integrate the GUI layout with my own file manager and my own ..."apps" ?
Can something like that be done with software currently on the market ?

If not ,and if I was to create a custom GUI , what would I need ? (libraries , frameworks etc)
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14175
  • View blog
  • Posts: 56,786
  • Joined: 12-June 08

Re: C++ ,Interfaces, Win API and a new project.

Posted 17 February 2011 - 09:04 AM

Sure you can build an app that sites on windows all day long and does what you need. That's not a trivial task at any means - especially with the slick graphics required to display. Mid you it would sit on top of windows so the rest of the system is still chugging away. Of course you could build your own OS. That's another story.

Coming out with c++ the world's your oyster. Seriously... search around... any sort of 'video game' graphics would work well. Opengl for example.

http://www.winprog.org/tutorial/
http://www.opengl.org

Your options are blown wide open so I am not sure what to specifically tell you outside of "investigate yourself". There's a million configurations so find something that make sense to you and go with it. Like I said you could easily treat this as a constantly running 'videogame' emulating windows.

After rereading what you are asking... sure you can 'reskin' apps left and right. I have written a VB.NEt tutorial as a proof of concept. Can you do it? I am not sure. I don't know what c++ GUI platform you are going with but yes it shouldn't be a problem outside of the learning curve.
Was This Post Helpful? 0
  • +
  • -

#5 Cobok   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 31
  • Joined: 18-March 07

Re: C++ ,Interfaces, Win API and a new project.

Posted 17 February 2011 - 11:41 AM

View Postmodi123_1, on 17 February 2011 - 06:04 PM, said:

Your options are blown wide open so I am not sure what to specifically tell you outside of "investigate yourself". There's a million configurations so find something that make sense to you and go with it. Like I said you could easily treat this as a constantly running 'videogame' emulating windows.


Hmm... thanks for the ideas .

I'll get to work , trying stuff out... I am not entirely sure about the argument of windows api vs Opengl (or Directx I guess...)

Anyway, if it all goes well you may be hearing from me again after a couple of weeks...

P.S. Any other suggestions I could use on the way?

This post has been edited by Cobok: 17 February 2011 - 11:46 AM

Was This Post Helpful? 0
  • +
  • -

#6 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14175
  • View blog
  • Posts: 56,786
  • Joined: 12-June 08

Re: C++ ,Interfaces, Win API and a new project.

Posted 17 February 2011 - 12:07 PM

Now I am confused. Are you looking to "theme" the current windows layout, or are you asking to make an app that mimics the windows GUI but with your own apps and style embedded?
Was This Post Helpful? 0
  • +
  • -

#7 Cobok   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 31
  • Joined: 18-March 07

Re: C++ ,Interfaces, Win API and a new project.

Posted 17 February 2011 - 01:32 PM

View Postmodi123_1, on 17 February 2011 - 09:07 PM, said:

Now I am confused. Are you looking to "theme" the current windows layout, or are you asking to make an app that mimics the windows GUI but with your own apps and style embedded?


Well... I wanted to do the first(theming)... but if it's easier or better , I could just create an app that has a great gui and that I can put On Top of the windows GUI...
Was This Post Helpful? 0
  • +
  • -

#8 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14175
  • View blog
  • Posts: 56,786
  • Joined: 12-June 08

Re: C++ ,Interfaces, Win API and a new project.

Posted 17 February 2011 - 01:45 PM

Okay.. theme'ing then with samurize. Really it would be a waste to do it otherwise. I have no idea what your current file manager is written (GUI that is) in so it's hard to give recommendations on how to apply a theme to it. You would have to fiddle with it to make it look appropriate (how ever that is defined).
Was This Post Helpful? 0
  • +
  • -

#9 Cobok   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 31
  • Joined: 18-March 07

Re: C++ ,Interfaces, Win API and a new project.

Posted 17 February 2011 - 04:32 PM

View Postmodi123_1, on 17 February 2011 - 10:45 PM, said:

Okay.. theme'ing then with samurize. Really it would be a waste to do it otherwise. I have no idea what your current file manager is written (GUI that is) in so it's hard to give recommendations on how to apply a theme to it. You would have to fiddle with it to make it look appropriate (how ever that is defined).


Hmm... If you think theming with samurize is easier , I'll give it a go after I am a bit better with windows , handles and controls...

Currently my file manager is half an idea and half a Win32 Console app with an 80s style menu , so I have a LOT to do I guess... I guess I can make those apps "talk" to a widget?

Edit: Mainly it's apps:
1. File Manager that creates and displays "libraries" of music and videos with pre defined and possibly smart filters
2. Internet app that gets e-mails , rss feeds , weather ...
3. maybe later do a website scanning bot (when I'm comfortable enough with #2 and #1)

P.S. Thanks for taking the time modi :) .

This post has been edited by Cobok: 17 February 2011 - 04:42 PM

Was This Post Helpful? 0
  • +
  • -

#10 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14175
  • View blog
  • Posts: 56,786
  • Joined: 12-June 08

Re: C++ ,Interfaces, Win API and a new project.

Posted 17 February 2011 - 07:32 PM

I do.. it helps quite a bit on the over all presentation; if anything it might be a good mock up tool for you.

I would have to see a screen shot of this half idea 80's theme.

If you have Win7 then you can create gadgets up pretty easy and you don't really need to compile jack.

Personally I would worry about getting the apps up and running then once that is to a degree I find agreeable then I would start jacking with the gui. But that's me.
Was This Post Helpful? 0
  • +
  • -

#11 Cobok   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 31
  • Joined: 18-March 07

Re: C++ ,Interfaces, Win API and a new project.

Posted 17 February 2011 - 09:22 PM

View Postmodi123_1, on 18 February 2011 - 04:32 AM, said:

Personally I would worry about getting the apps up and running then once that is to a degree I find agreeable then I would start jacking with the gui. But that's me.


Yes , I completely agree... But in this case I didn't really know what I wanted to do, so I stopped writing the code in the beginning and decided to check interfaces and windows programming as with the console I felt I was doing too much without getting back a good result.

BTW... I have done very little actual coding so far , I am literally beginning tomorrow :) , but here's a piece I wrote to bring up episodes and series (it is very small and unfinished I am afraid , but to give you an idea of where I was going )
Also I haven't decided yet If I'll go the OOP way and make up an abstract Movie Class with read and write functions to get some different kinds of sorting organised...
Edit: Actually regarding this... I was torn between using C style binary input as I don't really like the C++ way of extractors or classes, but I haven't decided yet (as the C way feels to me like digging up 1 metric ton of dirt to plant 2 flowers) but I really like the control it gives. The below is just a mockup...
Edit #2: Dammit , I am now thinking of creating my own read and write classes for files... Too many ideas , this is going to take a long while... (It is actually the first work I have done in C/C++ for myself , so I don't have anything to step on to. I used to just do useless exercises and complex but utterly useless assignements
// Series Player.cpp : main project file.
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include<windows.h>
#include <string.h>
#include "shlobj.h"
#include <mylib.h>


using namespace std;

void opprint(char cep[3],char sert[4] ,char sern,char cepp[3]);
void nextep(char *cepp);


char ser[5][25]={"SuperNatural","The Big Bang Theory","How I met Your Mother","bb","aa"};

int main(int argc , char *argv)
{
    if (!argc==2) cout<<"you can write :\"program_name play\" to resume";
    char filestring[]="D:\\Users\\Scytheb\\Downloads\\Supernatural.S02\\Supernatural.S02E16";
    char fup2episode[]="D:\\Users\\Scytheb\\Downloads\\Supernatural.S02\\Supernatural.S02E";
    char cep[3]="",option='n',sert[4]="" ,sern,cepp[3]="";
    int fup2ep=strlen(fup2episode);
    char temp='\0';
    ifstream seen1("D:\\Users\\Scytheb\\Downloads\\Supernatural.S02\\seen.txt");

    if (!seen1) {
        cout<<"cannot open seen file!";
        return 1;
    }
//Get Status from File//////
    seen1>>sert;
    seen1>>sern;
    seen1>>cepp;
    seen1.close();
/////////////////////////////
    ofstream seen("D:\\Users\\Scytheb\\Downloads\\Supernatural.S02\\seen.txt");
    seen.seekp(0,ios::beg);
    seen<<sert<<" "<<sern<<" "<<cepp<<"  "<<sert<<" "<<sern<<" "<<cepp<<"before";
    seen.seekp(0,ios::beg);
    filestring[fup2ep]=cepp[0];
    filestring[fup2ep+1]=cepp[1];
    while (!(option == 'q')) {
        opprint(cep, sert , sern, cepp);
        cin>>option;
        if (option=='1')    {
            if (!ShellExecute(NULL,"open",filestring,NULL,NULL,SW_SHOWNORMAL)) {
                cout<<"Episode Does Not Exist! or Unknown Error\n";
                return 1;
            }
            else

                cout<<"Is the Episode Done?? Y or N \n";
            cin>>temp;
            while (!(temp=='Y'||temp=='y'||temp=='N'||temp=='n')) {
                cout<<"Is the Episode Done?? Y or N \n";
                cin>>temp;
            }
            if (temp=='Y'||temp=='y') nextep(cepp);
            seen.seekp(0,ios::beg);
            seen<<sert<<" "<<sern<<" "<<cepp;
            filestring[fup2ep]=cepp[0];
            filestring[fup2ep+1]=cepp[1];
        }
        if (option=='2') {
            cout<<"under dev...";
            fflush(stdin);
            getchar();
            //update/////////
            seen.seekp(0,ios::beg);
            seen<<sert<<" "<<sern<<" "<<cepp;
            filestring[fup2ep]=cepp[0];
            filestring[fup2ep+1]=cepp[1];
            ///////////////

//////////////////////////////////
// PICK OTHER SEASON CODE HERE
/////////////////////////////////

        }//endofop2

////////////////////// AFTER ANY OPTION UPDATE FILE!!

    }//endofwhile
    seen.close();
    return 0;
}


void opprint(char cep[3],char sert[4] ,char sern,char cepp[3]) {
    system("cls");
    cout<<"Current Series=  "<<ser[atoi(sert)]<<"\n";
    cout<<"Current Episode= "<<sern<<"-"<<cepp<<"\n";
    cout<<"Enter Option:\n"<<"q to quit\n1. Play Next\n2. Change Series\n";
}

void nextep(char *cepp) {
    if (cepp[1]=='9') {
        ++cepp[0];
        cepp[1]='0';
    }
    else cepp[1]++;
}


This post has been edited by Cobok: 17 February 2011 - 09:31 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1