question

auniquename-8100 avatar image
0 Votes"
auniquename-8100 asked auniquename-8100 commented

Newbie GIT Problem

Hi Folks.

Developing on Windows 10 Pro, VS 2019 Community, C++. I keep current on updates.

This is a Git problem, I'm here because I'm trying to load a solution with the VS "Git" menu. Feel free to send me somewhere more appropriate.

I'm having trouble getting Virtual ListView, owner draw, stuff working, so I tried to download the sample code on the Git server.

I found this link on Microsoft's About List-View Controls.

I'm not familiar with Git. After a couple of YouTube tutorials, it looks like I first need to clone the repository and it will be copied to my computer.

The link in the ListView documentation takes me to this page:

111779-1-source-screenshot.png

I click on Visual Studio's Git button and get this screen:

111806-2-request-screenshot.png

I'm getting this error:

               -----------------------------

Cloning into 'E:\learn\win32\listview\2021_07_04_2_owner_draw\code2'...
Error encountered while cloning the remote repository: Git failed with a fatal error.
repository 'https://github.com/microsoft/Windows-classic-samples/tree/master/Samples/Win7Samples/winui/controls/common/vlistvw/' not found

               -----------------------------

The link I used to find the repository on the Git repository isn't serving as the repository location for the clone request.

What am I doing wrong?

   Thanks
   Larry



c++
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Viorel-1 avatar image
2 Votes"
Viorel-1 answered auniquename-8100 commented

I think that you should use the URL that appears in https://github.com/microsoft/Windows-classic-samples when you click the Code button. Here you can also click Download ZIP to get all of the samples. Then unzip the archive and open the required project (VListVw.vcproj) with Visual Studio.

Or you can click Releases (go to https://github.com/microsoft/Windows-classic-samples/releases), then download one of zip files or all of samples (“Source code (zip)”).

If you use Download features, you do not need Git.


· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks Viorel-1, you've saved me countless times over the years.

I was hoping to be able to download the sample I wanted.

I downloaded the zip samples. Where is the virtual ListView sample?

Search Windows-classic-samples-master.zip for "VListVw".

   "No Items match your search." 

What am I doing wrong now?

If https://github.com/microsoft/Windows-classic-samples/blob/master/Samples/Win7Samples/winui/controls/common/vlistvw/VListVw.Rc had a green "Code" button with a "Download ZIP" option I think the problem would be solved.

If Visual Studio's Git button would open a page that would allow me to at least clone the repository to my machine, I could then battle Git locally.

It should be obvious to you by now that you're dealing with an idiot. Please type slowly and try to use little words.

   Thanks Again
   Larry


0 Votes 0 ·

After downloading the zip file, you must uncompress it. For example, right-click it in Windows File Explorer, then select "Extract All".

If you want to clone the repository and try the “Virtual ListView” sample using Visual Studio 2019, then see these steps:

  • In Visual Studio, go to menu, GIT, Clone Repository. Paste the address to “Repository location” textbox. It can be got (copied to Clipboard) from Code green button in GitHub. The address to be pasted is: https://github.com/microsoft/Windows-classic-samples.git

  • In “Path” textbox you can specify the destination folder on your computer. Then press the “Clone” button and wait until files are downloaded.

  • Visual Studio will display a list with all of solution files. Double-click the VListVw.sln file.

  • Alternatively, you can go to menu, FILE, Open, Project/Solution, navigate to the folder that was specified before in “Path” text box, then to ‘Samples\Win7Samples\winui\controls\common\vlistvw’ subfolder, and open the VListVw.sln solution file.

  • If Visual Studio asks for project upgrades or migration, accept the changes.

Then press <F5> in Visual Studio to start the sample.

0 Votes 0 ·

Thanks Viorel:

I was able to find the files after unzipping the downloaded directory.

I've always been able to wonder through the content of zipped directories, as I can with this one, so I assumed searches would work on unzipped folders too.

I was having a few issues with cloning with the Git button. I'll look into that later.

As always, I appreciate your assistance.

   Larry




0 Votes 0 ·