I'm trying to remove the title bar from an external app. The reason is I don't want anyone to be able to move it.
But my code below doesn't remove the title bar. Could this be because it's not removable? I read somewhere title bars of external apps may be not removable if the app doesn't allow it.
So, I'm not sure why my code doesn't work - either it's wrong or the app doesn't permit it?
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);
Actually i am using one timer, in that timer i am trying to displaying one dialog box nane as ABC, for if condition is success, there in the same condition i need to put one more query like for the perticular application is active then only display this dialog box ABC, i need which API is using for getting active application in c++.
I added a new CMFCToolBar (by hand, didn't use a wizard)
It docks OK. The commands work OK. It renders OK. No problems there.
In the code, attempting to set the window text of this toolbar has no effect. The title bar text is always "Standard". I triple triple triple checked to make sure I don't have any resource ID conflicts. In a small app as this, it was pretty easy to verify this.
The toolbar also does not show in the menu illustrated in the screenshot. (The bottom, undocked toolbar should be titled "My Page Bar" and I think it should show up in the popup menu.)
I know I'm probably missing a simple step somewhere, but I haven't seen it. It looks like its getting mixed up with the Standard Toolbar resource ID somewhere but I could see nothing in the .rc or resource.h files.
I have an SDI app created with VC2012. Main view is a CFormView and it's the parent to four embedded dialogs. All four dialogs have title bars. On three of them, the title bars looks as I'd expect. Normal size, text left justified. On the fourth, the title bar is noticeably thicker and the text is centered. All styles are the same as far as I can tell. The main difference is the one that's acting up has a browser control on it, the others just standard controls. It looks normal on Windows 7.
So I was asked to create a C++ program that will ask the user to input 5 books with the ISBN, Title of the book and author/s. It will ask for 3 authors, if the book has only one author, you should leave "author 2 and author 3" blank and display only one author. Thing is... I'm having a problem with the if else condition at the last part of my program. I cant seem to make it work.
#include <iostream> #include <cstring> #define SIZE 5 using namespace std; int i;
I'm supposed to create a program that stores names and then the final function is supposed to remove a name. But it only removes the first name instead of the inputted name.
the problem with names.erase(names.begin()+i)?
#include <iostream> #include <string>//include for string function #include <vector>//include for vectors
I'm having a problem with removing an item from a queue. At first in the debugger I got SIGTRAP but I don't get it anymore but the problem still exists. When you try to remove an item from the queue the first nothing happens. Here's the code below compile it and you see what I'm talking about.
This has the effect of removing the dots but keeping the length of the string the same, so old characters are left over at the end. Is there an extra action to do to x to make it the right size or is there a better way of doing it?
I'm working on a problem in which I've to design a program in which the punctuations should be removed from the string. For eg., if input str is: "Hello!!"; the output must be: "Hello".
I'm not sure how to remove a sub-string (if that's the right word!!) from a string. So, I designed a program which print out the punctuations. For eg., if input str is: "Hey!!"; the output would be: ! !
Here it is:
#include <iostream> #include <string> using namespace std; int main (){ cout << "Enter a string" << endl;
[Code] ....
So, I want to know what should be added to this program so that the punctuations can be removed; or should I rewrite another program for that?
I have a program that's supposed to read in a file with comma seperated values. This file contains duplicates. The goal is to write a new file that does not contain any of the duplicates. I've successfully written the code to read in a file and create a new, identical file, but I'm failing at deleting the duplicates.
The format of each line in the file is: index,first_name,last_name,address,city,state,zip_code
This code writes the file I want (overlooking the duplicates) if I implement my equality operator as follows:
bool operator ==(const Person &a, const Person &B)/> { return false; //placeholder }
Obviously this doesn't get the job done, since it will never detect a duplicate. The problem is that whenever I try to write any meaningful code, the program writes an empty file. The idea I've been trying to implement is to compare each of the members of Person like this:
bool operator ==(const Person &a, const Person &B)/> { //if two Person objects have equivalent names, they are duplicates return ( (a.first_name == b.first_name) && (a.last_name == b.last_name) ) }
At first I thought the program was working just as before, but then deleting each line of the file as the result of an error in my code. However, I tried troubleshooting the problem by adding in
cout << a.last_name;
to parts of my code so I could see the value in certain places. Whenever I add this line or try to access a member of Person, the program writes a blank file.
I'm working on creating a windows form with a listbox, textbox, and 2 buttons (add,remove). I need a way of removing every string matching the contents of the textbox from the listbox. Here's what I have:
for (int i=0;i<listBox1.Items.Count;i++) { //... listBox1.RemoveAt(i--) }
Seems to work, but I need a way to show a error message once the user clicks 'remove' and no items in the listbox match.
im working on a homework assignment t that should print all pairs of integers that sum to val. I have so far finished except It prints duplicate values (ie (3,1) and(1,3) for values that add to 4) . how can i remove these duplicate pairs of values?
#include <iostream> #include <map> #include <vector> using namespace std; void printPairs( vector<int> numbers, int val){ int i;
I am having a problem with the output of a file. My function does everything it needs to do with the exception of one line. I have a .dat file with the following:
Code: joe clint james brint howard jimmy alexander * me
When I run the function my output is as such:
Code: file opened word: joe digit: 3 word: clint digit: 5 word: james
[Code] .....
ERROR non alphanumeric digit on line 4!
File closed "Howard" is only six digits in length. Also it seems to skips a line in the output which could be the extra character but I am not sure. What I find very interesting is the other names, (jimmy & alexander) on separate lines do not have that problem.
Here is my function:
Code: #include "main.h" #include "fileCheck.h" int fileCheck(FILE *fp){
int line_count = 0; int ret_val = 0; int digit_count = 0; char file[BUFF];
[Code] .....
How I can correct this? I am aware of sscanf to parse the line but I do not know the format of the file. All I know is the file will be alphanumeric and if there is a non-alphanumeric, I must print out an error with the line it occurred on such as the above output.
While removing duplicate elements from an array, if more than 4 array elements are same then removal does not work. however my logic seems to be alright. i reckon there is a problem with the conditions and assignments in the three for loops that i have used. the program is as follows:
Code: /*c program to remove duplicate elements in an array*/ #include<stdio.h> int main(void) { int array[30],i,j,k,n; printf("
[Code] ....
Take for instance if the input elements are 1,1,1,1,1,2,2,3,5 then after removal of duplicacy the array is 1,1,2,3,5.
I'm trying to go search through my linked list for a passed string and if it matches, remove it...but obviously link everything back together properly. This is what I have so far but when i pass it to my display function, which is properly working, it goes into an endless loop
I'm trying to create a database/search engine program and I'm having remove duplicate strings from a vector. I'm mostly just trying to make it so that if 2 or more movie have the same title in the database, it will remove the duplicates and just print out one copy of the movie console. I tried using the unique() command, but it doesn't seem to work.