i'm using glade to designa a interface for my program written in C but i have some problem with the buttons.
Can someone explain me how to set in glade an action ... |
I'm programming in C, and I'm remotely clicking a button programically. I've done it in simple, various simple form applications.. but I've ran across a problem.
HWND WINAPI FindWindowEx(HWND hwndParent, HWND hwndChildAfter, ...
|
I have a program that prints the cube and which can be rotated. Here's the code.
public partial class ProjectorForm : Form
{
Projector projector;
Cube cube;
...
|
|
LOL! Alright on my home pc (Vista, Visual Studios 2005 (latest updates)) this program wouldn't even generate the original window. At work (XP, Visual Studios 2003(Uknown updates)) this program loads fine and creates the button. I would say this would of been an issue with Vista, but newguy built it fine on vista. Newguy what program did you use to compile ... |
|
On Fri, 10 Oct 2008 16:53:39 +1300, Ian Collins wrote: Ruben wrote: > [stuff] > Once is enough! Thanks I had to fix the subject for archival purposes... I posted to the gtk list as well, when it is up which seems only 50% of the time of late... Ruben -- http://www.mrbrklyn.com - Interesting Stuff http://www.nylxs.com - Leadership Development in Free ... |
|
|
|
|
Hey, thanks for your reply - I wasn't expecting one this quick. I've tried system.threading.thread.sleep (2000). I also tried a ridiculous "while" statement which took the current datetime seconds value, then populated int1 with it. I populated int2 with int1 + 2 (subject to an 'if' which said that if int1 is > 57, subtract 60 from it) I then had ... |
HI I'm writing a program in Visual C++. Among other things it does, when you press a button in the main window, it opens an auxiliar window crate as a Modal Dialog and let the user to choose between some options (radio buttons). The one selected is used in a function to give some results, that must be displayed in the ... |
That wouldn't work. The function will never return until the while loop gets completed. The while loop won't complete until you click on the button. The window will not process the second button click because your in the while loop. I'm not sure how/if you can do what you want to do. |
|
OK, so i will start with something simplier. Thanks anyway, dudes. Oh, i've allmost forgot. I have one more question for c++ users. So: How can i open a form from another form: - I have Form1 and Form2 On form1 there's a Button1. When i click that button i want the other form to show up. I tried but i ... |
|
|
How to create On/OFF button wth C programming? O On / Off button By default the button is in Off state. When, in this state, and the O button is selected, the machine is in On state. When in On state, and the O button is selected, it is changed to the Off state and all entries prior to this ... |
Hi friends, Being a newbie means I have to be humble and ask for help from time to time. I'm trying to write code for a two button set up, high/low, which are used to change their values in memory. I press either button 3 seconds to enter setup. Once I'm in set up, the same two buttons are inputs to ... |
cloudsword: Actually spend time thinking about solutions before giving up and asking for the answer. "Great question asking skills" is a sure way to get your resume thrown out. "Great problem solving skills" is a much better trait to possess. The only way you'll get there is by trying to think things through on your own, and try them out. The ... |
Basically what I'm trying to do with this C code is to mimic a momentary push button to turn on an led on and off. Initially the LED will be OFF. When LED is OFF and button is pressed the LED turns ON. When LED is ON and button is pressed the LED turns OFF. That's all I'm trying to do, ... |
|
|
Dev C++, Windows I want it to toggle between "Durdur" and "Calistir" Code: #include LRESULT CALLBACK PencereProseduru (HWND, UINT, WPARAM, LPARAM); char YapiSinifAdi[ ] = "WindowsApp"; HWND DugmeTutmaci; HMENU Yavru1; int WINAPI WinMain (HINSTANCE AnaFonksiyonTutmaci, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nFunsterStil) { HWND AnaPencereTutmaci; MSG Mesajlar; WNDCLASSEX PencereYapisi; PencereYapisi.hInstance = AnaFonksiyonTutmaci; PencereYapisi.lpszClassName = YapiSinifAdi; PencereYapisi.lpfnWndProc = PencereProseduru; PencereYapisi.style = CS_DBLCLKS; ... |
25. button delay cboard.cprogramming.com |
|
|
|
29. Button in C forums.devshed.comHow, pray tell would somebody seriously expect to describe a techincal process without using any technical words? C'mon, seriously! In the world of programming, you are not going to get a much easier researching task. THIS HAS BEEN WRITTEN BEFORE - GO AND FIND IT. That's 1/2 of the point of forums - that the conversation remains archived and can be ... |
OS? Language? Development environment? In the meantime, a grease pencil should do the job. Just keep some TP on hand to wipe it off when you need to write something else on it. Until we know the info requested in the first line, the grease pencil suggestion is the best that anyone could offer. |
Hello, I'm having trouble with buttons with Visual Styles enabled on a black background color. Like so: i48.tinypic.com/28lf6zn.png On an effort to fix this I attributed WS_EX_TRANSPARENT style to the buttons, which only made these bits of white border-like aspects appear occasionally(they show up at random times and for random events like hovering, clicking, moving window, etc..) i50.tinypic.com/sg7uyb.png I've ran out ... |
private void drawX (PaintEventArgs e, Button b) { pBlue.StartCap = LineCap.Round; pBlue.EndCap = LineCap.Round; e.Graphics.DrawLine(pBlue, b.Left + 15, b.Top + 15, b.Right - 20, b.Bottom - 20); e.Graphics.DrawLine(pBlue, b.Left + 15, b.Bottom - 20, b.Right - 20, b.Top + 15); } private void button2_Paint (object sender, PaintEventArgs e) { drawX(e, button2); } private void button3_Paint (object sender, PaintEventArgs e) { drawX(e, ... |
Hello, I have a textfield with an action attached (textChange) and a button, for saving the textfield. the problem is that when I change somthing in the textchange and want to click the button, the changes won't be saved. this is because, when I click the button first the postback of the textchange happens, en the click doesn't. can anyone help ... |
|
|
|
|
Hello people For my final year project i'm creating a software program to play poker online (play money only) without any user interaction. I've got the program to locate and recognise the cards and work out all the chip information. I'm at the stage now where i need the program to play the game so i need to simulate button and ... |
Assuming you can get the handle of a button , how could you go about making the program believe that you have pressed the button ? I read somewhere that I could use WM_LBUTTNDWN but I have no idea how. This is what microsoft says it is: Code: Syntax WM_LBUTTONDOWN WPARAM wParam LPARAM lParam; Parameters wParam Indicates whether various virtual keys ... |
I have a CPropertySheet dialog with the typical back, next, and finish buttons. I need to disable the finish button while some events are processing and reenable it when the process is finished. Someone told me that CWnd::SetActiveView was necessary to accomplish this, but I have been unsuccessful. Simply performing EnableWindow(FALSE) is not getting the job done. Any suggestions? |
i have a listview and a toolbar that manages it's content. i want to enable two buttons when an item is selected and disable when there is no selection. it would be nice if listview sent a message when selection/deselsction happens, but this doesn't exist. what is the best way to handle this? i've met with this problem before, when i ... |
What I am trying to do is control another application by sending a 'button clicked' command. I'm having problems retrieving the buttons handle. I have searched high and low for proper documentation on the GetDlgItem function, and this was the best code I could scratch out with what I've found. It doesn't blow up on me, so I've got to be ... |
Hi everyone, I have created a program in C++ Visual Studio.net using mfc. My program has a button that when it is pushed displays a rectangle on to the dialog box. Now i need to be able to press a clear button and clear the screen. Can anybody tell me how to do this. I am having trouble clearing the screen ... |
|
|
|
Hi! I'm trying to build a simple game using sdl. But I don't know how to add buttons, textfields, etc. I've read about aedGUI which provides widgets for sdl. Has anyone of you tried aedGUI? I haven't found any sample code for this. Maybe you could give me some links? I'm coding mainly for windows. But I would like it to ... |
Ok, here is a bizzare one .... I'm using MS VC.NET, on win2k, MFC app. The way my Application is made, I have to create the button on my own. (I mean that I can't just drag a button in the dialog editor and double click it to implement its function) SO I call it that way Code: //This is the ... |
creating a button in win32 is not that hard. i was able to figure this out pretty easily. but i am entirely lost on how to make something happen when the button is clicked. i have searched everywhere trying to figure this out but the examples either don't work or woln't compile. could someone take a look at this code below ... |
Okay well first, I need to know weather you are using MFC. Presuming you are using MFC you have to use classwizard to enable the buttons. Go to View->classwizard. Select the dialogbar class, ie whatever you named it and then select the ID_BUTTON1 or what ever ID number is assigned to the button. You will then see a COMMAND and a ... |
i am trying to learn about win32 programs in C++. i want to simply make a button, and be able to do things when that button is clicked. i am having trouble finding a site that shows examples of how to make programs like this. below i have the code for my simple win32 program. could someone help me edit this ... |
|
|
|
Hi All, I am moving forward with the win32 api I am currently working on toolbars. I have managed to create and add a toolbar (using createWindowEx). And also buttons with images etc on the toolbar. But i have a few questions: I wanted to add a edit control to the toolbar (inbetween buttons) but havent figured out any other way ... |
const int inches_per_foot = 12; const int feet_per_yard = 3; int yards = 0; int feet = 0; int inches = 0; // read the length from the keyboard cout << "Enter a length as yards, feet, and inches: "; cin >> yards >> feet >> inches; // output the length in inches cout << endl << "Length in inches is ... |
Hey Guys, I am using c++ win32 api and i need your help again. I would like my buttons in the window to look more pretty. How can I load a bitmap in it? My win32 programmer's reference told me to send a "BM_SETIMAGE" message, though I wasn't smart enough to figure it out. I have a HBITMAP handle and a ... |
Actually, I believe that it is a long-standing computer design tradition. The Apple II had its power on/off button in one corner of the keyboard, right next to a frequently-used button (ESC, maybe; I was on active duty at the time and Apples were far too expensive for me to even consider). I even saw third-party ads selling flip-up plastic guards ... |
|
|
|
|
Hello, We are trying to control 8 7-segment displays by using multiplexing. The problem we have is that we have to program buttons, how can we make it? Best regards, Floris /* Ansteuerung von drei 7-Segmentanzeige im Multiplexbetrieb * Gemeinsame Anode, PB0..PB6 * Spalten: PC0..PC2 * * a * f b * g * e c * d * */ #include ... |
|
#include #pragma config OSC = HS #pragma config WDT = OFF #pragma config LVP = OFF #define btn_on PORTBbits.RB4 #define btn_off PORTBbits.RB5 #define led PORTAbits.RA0 void on(void); void off(void); void main(void) { TRISA = 0; //set Port A(LED) as output PORTAbits.RA0 = 0; //reset LED while(btn_on != btn_off) //wait for btn press if (btn_on = 1) //btn on pressed on(); ... |
|
|
|
|
|
|
I want to change the direction of movement of a shape (Circle) on a Form, using up,down,left,right, buttons placed within a panel also on the Form. The form contains a shape(Circle) and a TTimer component. I can get the Circle to move across the Form using : Circle->Left = Circle->Left + 20; for the OnTimer event, but I now want to ... |
I can't help but wonder if this is a limit of 3 buttons, or if this limit is the number of buttons that are visible in the quick-launch bar? That is to say, I'm wondering if the window created when you click the arrow-button isn't destroyed then recreated on request after some period of time has elapsed since last ... |
Advantages: - Make a button look exactly the way you want (any color, shape, and include any bitmaps). - Make your own buttons in a case where your framework doesn't have what you want or need. Disadvantage: - You have to draw out the button completely yourself, this includes any transition states and/or enabling/disabling the button. |
|
|
Well, If you close the dialog and open it again, the changes made won't be reflected in the newly opened dialog unless you make it possible... you should edit the OnInitDialog function in order to update the contents of your controls at the beginning. Notice that I think that after pressing Apply you are modifying some global ... |
|
|
|
|
Hm... I thought, you know them :) - Please validate your received hWnd and hToolbar by Spy. - Try it (yours) also with the index 0 (the separators have their positions as well). - Please observe the returned value by SendMessage(.., TB_GETBUTTON, ..) - Try also the message TB_GETBUTTONINFO (set the field cbSize before you will pass a TBBUTTONINFO) - Usually, ... |
|
First add one Button in your Dialog/View. Then set a name of that Button ( e.g. I set a name BTN_STOP_NOW). Now double click on that button it will add one Method autometically OnBTN_STOP_NOW() { //Add your code to stop adding Item into the list //NOTE: You need not to check for any If condition. //Anything you ... |
|
|