11 Replies - 313 Views - Last Post: 05 December 2017 - 11:13 AM Rate Topic: -----

#1 CuriousGeorge  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 04-December 17

Starting a new project. Looking for advice on what direction to go.

Posted 04 December 2017 - 12:55 PM

Hello everyone,

I hope that this is an appropriate question for this forum. I have completed a large handful of interactive learning programs and worked through a lot of tutorials in the C++ language. Now I would like to try my hand at applying my understand into something tangible. I am in no way asking anyone to do any coding for me, but simply asking someone with more experience than I have to point me in the right direction to get me started.

The program I would like to build is this: I have many WMA video files that contain college football games. What I want to do is open the program on my windows 10 desktop and be able to look through these games stored on my hard drive, but like the user interface for Kodi. Each video file will have information stored that can be displayed when the game is highlighted in the user interface, like teams playing, date game was played, and television network it was aired on (not usual metadata for windows).

If this was your project, where would you start? I know many will probably say, "Why would you do this? Kodi already exists. Just use a program that already exists." I get that. The point is to learn by doing; I am just having trouble getting started and I can't seem to find any resources that validates what I am trying to accomplish.

Thank you for reading and I look forward to hearing any advice you may have!

Is This A Good Question/Topic? 0
  • +

Replies To: Starting a new project. Looking for advice on what direction to go.

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13954
  • View blog
  • Posts: 55,694
  • Joined: 12-June 08

Re: Starting a new project. Looking for advice on what direction to go.

Posted 04 December 2017 - 01:00 PM

Figure out your expectations.
Is this going to do video playback, or just display data?
Is there any expectation to store the data in some place other than a local database?
Have you looked into different types of GUI for C++?
How would the GUI work?
Was This Post Helpful? 0
  • +
  • -

#3 CuriousGeorge  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 04-December 17

Re: Starting a new project. Looking for advice on what direction to go.

Posted 04 December 2017 - 02:26 PM

My thought would be that the GUI would have a button "Play" that when clicked the highlighted video would open with windows media player as if you had double clicked the file itself.

The purpose of the program is to elegantly display user defined information about the selected video that is not standard metadata with picture backgrounds. Essentially it is windows file explorer, but only for certain selected video files, not all files in C://.

At some point it would be nice to be able to add teams to the standard window in order to further sort the game files.

For example: you are viewing the main screen. There are 5 icon buttons with the conference logos on them (SEC, ACC, etc.) When the icon button is selected, the screen repopulates with new icon buttons that represent the teams within that conference. When you click on the Alabama button, the screen shifts to a window with information about the school, like Head Coach, School Colors, etc. and below allows you to view all the games that Alabama has played in.
Was This Post Helpful? 0
  • +
  • -

#4 CuriousGeorge  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 04-December 17

Re: Starting a new project. Looking for advice on what direction to go.

Posted 04 December 2017 - 02:51 PM

Also, another functionality I would need would be for when I add a new video. A user input to add the selected information for this video. Since it is not windows standard metadata that can be taken from the file itself, or information that can be scraped from the internet. Think of the way editing the information for a file in your Emby or Plex library is layed out.
Was This Post Helpful? 0
  • +
  • -

#5 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13954
  • View blog
  • Posts: 55,694
  • Joined: 12-June 08

Re: Starting a new project. Looking for advice on what direction to go.

Posted 04 December 2017 - 03:45 PM

Then seems like a straight forward database to hold things like the location, any images, other data, etc.. and the app just pulls it to display and writes/updates as needed.
Was This Post Helpful? 0
  • +
  • -

#6 CuriousGeorge  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 04-December 17

Re: Starting a new project. Looking for advice on what direction to go.

Posted 04 December 2017 - 04:01 PM

Correct. And it should be a project simple enough for me (someone new to writing code) to learn by trial and error. And I understand that it will be a process of trial and error. The issue that I am having is simply where to start. What would be the best IDE? Visual Studio or something else? Should I begin with the windows and buttons first and then apply code behind it to make it functional or write the code first?

It seems that while I understand basic syntax I lack the theory knowledge needed to tackle the project from scratch.
Was This Post Helpful? 0
  • +
  • -

#7 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13954
  • View blog
  • Posts: 55,694
  • Joined: 12-June 08

Re: Starting a new project. Looking for advice on what direction to go.

Posted 04 December 2017 - 04:03 PM

I prefer Visual Studios but use what ever you feel like. Hell.. try out a few and see if you like one over the others.

Begin the actual programming with the GUI.. the db.. or what ever. Though begin with a design and writing out what you want to do, actions involved, user interaction points, etc.
Was This Post Helpful? 0
  • +
  • -

#8 CuriousGeorge  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 04-December 17

Re: Starting a new project. Looking for advice on what direction to go.

Posted 04 December 2017 - 04:06 PM

Thank you for your advice modi123_1. It seems I just need to dive in and start.
Was This Post Helpful? 0
  • +
  • -

#9 CuriousGeorge  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 04-December 17

Re: Starting a new project. Looking for advice on what direction to go.

Posted 04 December 2017 - 08:07 PM

So here is something I am struggling to understand. If I have a file on my hard drive called "Football Games" and within it are 10 mkv files. Of course, each mkv file is a game that needs to be stored in my database. How do I set up a database that will scan this one specified file and then generate 10 entries into my database with the file name being the main title of the entry?

This basic function will allow me to fill in the additional missing data that describes which football game it is. It also allows for the database to always show every single game included in that file at any given time. Sometimes games can become too old to keep and are deleted as well as new games being added as they are played so the games included in the application is dynamic depending the files stored within the folder.

There is no need to add or delete files within the program. I am only interested in assigning and displaying information data once they are in the program.
Was This Post Helpful? 0
  • +
  • -

#10 snoopy11  Icon User is online

  • Engineering ● Software
  • member icon

Reputation: 1455
  • View blog
  • Posts: 4,701
  • Joined: 20-March 10

Re: Starting a new project. Looking for advice on what direction to go.

Posted 05 December 2017 - 02:56 AM

Heres some basic code to get you started...


#include <windows.h>
#include <tchar.h>


#define ID_BUTTON 201

LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
HINSTANCE g_hInst;
LPCTSTR lpszClass = TEXT("Media");
static int count = 0, uncount = 0;
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance
	, LPSTR lpszCmdParam, int nCmdShow)
{
	HWND hWnd;
	MSG Message;
	WNDCLASS WndClass;
	g_hInst = hInstance;

	WndClass.cbClsExtra = 0;
	WndClass.cbWndExtra = 0;
	WndClass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
	WndClass.hCursor = LoadCursor(NULL, IDC_ARROW);
	WndClass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
	WndClass.hInstance = hInstance;
	WndClass.lpfnWndProc = WndProc;
	WndClass.lpszClassName = lpszClass;
	WndClass.lpszMenuName = NULL;
	WndClass.style = CS_HREDRAW | CS_VREDRAW;
	RegisterClass(&WndClass);

	hWnd = CreateWindow(lpszClass, lpszClass, WS_OVERLAPPEDWINDOW,
		CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
		NULL, (HMENU)NULL, hInstance, NULL);
	ShowWindow(hWnd, nCmdShow);

	while (GetMessage(&Message, NULL, 0, 0)) {
		TranslateMessage(&Message);
		DispatchMessage(&Message);
	}
	return (int)Message.wParam;
}

LRESULT CALLBACK WndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam)
{
	HDC hdc;
	PAINTSTRUCT ps;
	
	static TCHAR sTime[128];



	


	switch (iMessage) {
	case WM_CREATE:
	{
		HWND PlayButton = CreateWindow(_T("BUTTON"), _T("Media"), WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON, 20, 400, 50, 20, hWnd, (HMENU)ID_BUTTON, NULL, NULL);
		
		return 0;
		
	}

	case WM_COMMAND:
	{
		switch (LOWORD(wParam))
		{
		case ID_BUTTON:
		{
			ShellExecute(hWnd, _T("open"),_T("wmplayer.exe") ,_T("C:\\myMkv.mkv /fullscreen"),NULL, SW_SHOWNORMAL);
         
			break;
		}
		break;
		}
		break;
	}
	case WM_DESTROY:
	{
		PostQuitMessage(0);
		return 0;
	}
	break;
	}
	return(DefWindowProc(hWnd, iMessage, wParam, lParam));
}




You have to change the Path C:\\myMkv.mkv to whatever file you want to play ie the location of the file... However if you dont know how to program then this project maybe beyond you.

This post has been edited by snoopy11: 05 December 2017 - 02:59 AM

Was This Post Helpful? 0
  • +
  • -

#11 CuriousGeorge  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 04-December 17

Re: Starting a new project. Looking for advice on what direction to go.

Posted 05 December 2017 - 08:05 AM

Thank you Snoopy.

That is incredibly helpful.
Was This Post Helpful? 0
  • +
  • -

#12 snoopy11  Icon User is online

  • Engineering ● Software
  • member icon

Reputation: 1455
  • View blog
  • Posts: 4,701
  • Joined: 20-March 10

Re: Starting a new project. Looking for advice on what direction to go.

Posted 05 December 2017 - 11:13 AM

Thats ok...

If you need further help post your code with specific questions.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1