C/C++ :: Make A Window?
Oct 15, 2014
how to make a window in C++? I am trying to make a program that has a boot screen but I want it to be in its own window because it will have it's own pictures in it and text inside too. So not in a terminal but inside a external window.
View 1 Replies
ADVERTISEMENT
May 11, 2013
I want to make a window tgat stays always on top like that of a cybercafe software. A window that cannot be closed, minimised, deactivated, etc... with wxWidgets.
So far I've tried making a frame window with the wxSTAY_ON_TOP flag. It works, but not to perfection because, when i press the windows button, the start menu interferes with the window(and taskbar too). Also, the task manager, how to deactivate it.
- a wjndow that strictly stays on top
- deactivate task manager
View 3 Replies
View Related
Dec 20, 2014
I wanna know how to do so a cmd window when you open a game.
Example: when I start cheese attack (just a name I like) then a cmd window come up, how do I do that?
View 1 Replies
View Related
Apr 26, 2013
I am trying to make a program that can type a string into another window. I have gotten it to the point that it can type the string, just not correctly. It will type random numbers and not the given string. The key event uses ASCII code for the arguments, and I don't see anything wrong with my numbers. Here is the code I have so far.
#include "stdafx.h"
#include <iostream>
#include <windows.h>
[Code].....
View 2 Replies
View Related
Apr 15, 2015
I am trying to make a basic Snake game using the command window and screen refreshes. So far I have a board, snake, food, and no walls. Basically I have it so the snake moves like the traditional snake in the game, when it eats the food once it grows. However when it eats the food a second time the game crashes. I think I have narrowed the issue down to the grow array that I have (below) but I am not sure if the issue could be a result of something else.
Grow Array
cord growArray (cord *p_values, int *size)
{
*size = *size + 1;
cord *p_new_values = new cord[ *size ];
[Code]....
View 7 Replies
View Related
Jul 20, 2013
I am trying to do two things that i have an issue with finding on google. the first is im trying to center the main window, but i cant figure out how to do it. secondly i want to make it full screen but the flag for setvideomode doesnt work. is there another way?
View 1 Replies
View Related
Jul 11, 2014
when i run it , it skips scanf and not allowing user to enter input.tried adding getchar(), fflush but nothing worked for me.
//file name : sort_array_of_structure.c
Code:
/*Write a program to accept records of the different states using array of structures. The structure should contain char state, population, literacy rate, and income. Display the state whose literacy rate is highest and whose income is highest.*/
#include <stdio.h>
#define M 50
struct state
{
char name[50];
long int population;
float literacyRate;
float income;
}
[code]....
View 3 Replies
View Related
Apr 28, 2014
There is only one thing I need here. When the paint program is opened I need it to automatically open it maximized. Other than that my code works perfectly for what I'm trying to build.
It has to be maximized so when a friend opens it after I send it to him, it auto maximizes and doesn't start drawing on his desktop.
#include <iostream>
#include <Windows.h>
using namespace std;
int main() {
system("start C:/Windows/System32/mspaint.exe");
FreeConsole();
Sleep(1000);
[Code] .....
View 3 Replies
View Related
May 16, 2013
using SFML in visual studio 2012 ... this code gives blinking window.
#include<iostream>
#include<SFMLGraphics.hpp>
using namespace std;
sf::RenderWindow window (sf::VideoMode(800,600),"GAME");
[Code]....
View 8 Replies
View Related
Oct 28, 2013
Can I make my c++ application to open in a specific sized console window. I want to open my project in n a bigger screen so that all my output is visible. is there any way to do this...
View 6 Replies
View Related
Sep 5, 2013
I've encountered a problem, whenever I debug the project, the window shown flickers with the image I'm trying to render and it doesn't respond (shows the loading cursor symbol) also the console window doesn't even open at all, Here's the code:
#include <iostream>
#include <SDL.h>
#include <SDL_image.h>
#include <SDL_mixer.h>
using namespace std;
int main(int argc, char** argv){
cout<<"HI!!!!"<<endl;
system("pause");
[code]....
View 7 Replies
View Related
Aug 16, 2014
I don't know how to get window title text of same process without setting a foreground window.
My code:
Using it, I get window handle.
struct handle_data {
unsigned long process_id;
HWND best_handle;
};
BOOL is_main_window(HWND handle) {
return GetWindow(handle, GW_OWNER) == (HWND)0 && IsWindowVisible(handle);
[Code] ....
This part doesn't work unless I use it with GetForegroundWindow(). But before using it, I have to set it. Is there any way to get window name without setting a foreground window?
unsigned long id = GetCurrentProcessId();
//HANDLE h = GetCurrentProcess();
HWND wind = find_main_window(id);
char window_title[256];
GetWindowText(wind, window_title, 256);
std::string txtt(window_title);
View 4 Replies
View Related
Dec 10, 2014
I've been doing some looking and this example seems like the common way to remove the close button on a wpf window. Other than catching the on_click event or using that example, is there no better way to disable/remove that button?
View 2 Replies
View Related
Oct 17, 2012
I am writing code to open every page in internet explorer and every page will be in new tab but my code open every page in separate window
I am using c#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
[code].....
View 1 Replies
View Related
May 5, 2014
I want program to make bitmap from my Window. I also want to do add some additional steps which I will try to add later. But now I want to ask you how to fix the code. For some reason when I debug the code (break on line 73 of capture.cpp) there the pointer pBitmap is 0x00000000 . So how to correct the code to successfully capture Window? Here I give the complete codes:
stdafx.h
Code:
#pragma once
#include "targetver.h"
#include <stdio.h>
[Code].....
Feel free to set correct name of Window on line 17 for FindWindow() function.
PS: The code is remake of script to capture screen, which saved the bitmap to file. This is not what I want because I would be content if I could send (or maybe share!) the bitmap to ahk script which will ask my C++ program for the bitmap.
View 14 Replies
View Related
Mar 27, 2014
Im new to c#. In c++ I have made a window and painted it with dots and concentric circles, like a radar PPI screen. Trying to do this in c#, I can't find how to draw a single pixel on the window.
Also, what should I be drawing on: the form, panel, picturebox...?
View 2 Replies
View Related
Dec 19, 2014
I have created an scientific calculator application and I have a VBS script that runs some of the files. I want to create a C program that runs that VBS script. however, a command window flashes before the application opens. So basically I need a short C (or C++) program that runs a VBS script without a command window popping up. I am on Windows 8 and my compiler is GCC/G++ under cygwin. Here is what I have now that DOES NOT work.
Code:
#include <windows.h>
int main()
{
ShellExecute( NULL, NULL, "StartUp.vbs", NULL, NULL, SW_HIDE);
return 0;
}
View 2 Replies
View Related
Jun 24, 2014
My program accepts strings, places them in a vector and then "bleeps!" out words of my choosing, in this case, "broccoli". But I'm having trouble keeping the output window open even with my Keep_window_open() implementation.
#include "iostream"
#include "string"
#include "vector"
#include "algorithm"
#include "cmath"
using namespace std;
[code]....
View 2 Replies
View Related
Jul 10, 2014
I am having some issue with clearing cin buffer. The following code does not wait for me to see the output window and till I hit return character.
#include "iostream"
#include "stdio.h"
#include "math.h"
#include "string"
#include "sstream"
using namespace std;
[Code] ....
I tried
cin.flush, cin.ignore(numeric_limits<streamsize>::max(), '
'); cin.clear(); fflush(stdin);.
None of them worked
I am working on Microsoft visual studio express 2013 for windows desktop.
View 3 Replies
View Related
Aug 12, 2013
I'm makeing a card game with ncurses. I have all the card and player objects in order but i'm stuck trying to get the gui to work.
I'm using multiple windows for different players deck and pile. Now to the problem: I can get all the windows to show with borders in the console but i can't get any content printed in the windows and I rally can't see why!?
I have been reading the guide on [URL] but I don't get any further on the problem right now.
PS. the complete code incl. Makefile can be found at:
github.com/DanBrehmer/cardGame
#ifndef GUI_H
#define GUI_H
#include <ncurses.h>
[Code]....
View 3 Replies
View Related
May 7, 2013
Any way in sfml of changing the font style and/or size used in the window title for RenderWindow?
As a secondary point - can the colour and size of the title bar itself be changed?
View 1 Replies
View Related
May 3, 2014
After searching on stackoverflow I got this
POINT p;
for (int i = 0;; ++i) {
HWND hwnd = GetConsoleWindow();
system("cls");
if (ScreenToClient(hwnd, &p)) {
//p.x and p.y are now relative to hwnd's client area
} cout << p.x << " " << p.y;
Sleep(200);
}
I'm looking for a function that gives current mouse position(x and y) in that particular console window. I've tried above code but it is not working.
View 5 Replies
View Related
Jul 4, 2014
I would like to find out a way to set the text and window sixe for the window in c++. I am using code::blocks compiler
View 4 Replies
View Related
Jun 23, 2014
I am creating a website in which a user can upload an image to a sql database. It is converted to varbinary and then read into an Image object using a http handler to convert it to an image. this all works fine. When I open an popup window I am reading data from specific rows into textboxes, thus when the user confirms any changes the rest of the data stays the same. How can I hold the Image and redisplay it when returning to the main page after closing the pop up. It currently sets the image in the database to null as the file upload object has not been given a directory location all the time. This is my attempt at reading the image from the database and then reapplying it if the file upload is empty
private void ChangeFilm(int id)
{
SqlConnection con = new SqlConnection(my settings go here);
con.Open();
[Code].....
View 5 Replies
View Related
Feb 18, 2014
I have some experience in C# and choose the project of a "rapidfire script". It is a program, which shoot rapidly in a FPS by sending a "left-mouse-button-click" over and over again while the "real" left mouse-button is down.
Now, I tried multiple ways of sending the left mouse button but none of them worked the way I wanted them to. I tried SendMessage, PostMessage and mouse_event. One of them made the window unresponsive, another only pressed the mouse button while I was still moving the mouse and another didn't work at all.
I know a script which does exactly that and is coded in AutoHotKey. AHK is open-source but since I am not familiar with C++, it is very hard for me to understand what exactly is going on here:
AutoHotKey: keyboard_mouse.cpp
And here is the AutoHotkey-Script: AutoHotKey - pastebin.com
And my current code. The input delay is very irregular and strange. Sometimes the real "right mouse button click" gets ignored and I don't know why.
if (State == RapidfireState.ACTIVE) {
// Check if the left mouse button is down. If it is, send fire commands to the game
if (MouseDown()) {
[Code]....
View 2 Replies
View Related
Feb 10, 2015
this is my app interface as in attachment when i click an arrow it split the current selected window in arrow direction.
i want to know how to pass the current window to my button... i tried it using
Process[] processlist = Process.GetProcesses();
but it wont works
View 3 Replies
View Related