You can't do that in Bluestacks. Bluestacks uses shared network protocol to access the Internet. The connection is available by default in the application. There is no way you can connect to WiFi networks within Bluestacks since it's an emulator and has other working principles.