Visual C++ :: Can Overlapped Buttons Both Receive Notification

Oct 17, 2013

I have multiple bitmap buttons of non-square shape. Because of their odd shape I can overlap them and they will still look good on screen, which is what I want - that certain layout.

The problem is that because underlying button in reality is square (which I am subclassing), the bitmap of one button may overlay with the non-bitmap area of the other button (in the underlying square). This means that 2nd bitmap button will not receive notification because the press is registered with top level window only.

Is there a way that both windows can receive the notification and check if they are in the hot spot, they will respond? I know this is against windows design.

View 10 Replies


ADVERTISEMENT

Visual C++ :: Error With ReadFile And Overlapped?

Feb 3, 2014

I have a problem with ReadFile and overlapped.

first I use ReadFile with overlapped with 0

Code:
ZeroMemory(&overlapped ,sizeof(OVERLAPPED));
hDevice = CreateFileW(zwpath, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, NULL);
if(hDevice != INVALID_HANDLE_VALUE){

[Code]....

View 2 Replies View Related

Visual C++ :: Getting Notification Message From ASPX Page?

Jun 7, 2013

Is there a way an ASPX page can send a notification message to my IE Plugin which is developed in VC++?

View 3 Replies View Related

Visual C++ :: Notification Supposed To Be Sent Out During Forced Sleep In XP?

Oct 2, 2012

I run the following API to put Windows XP SP3 into sleep (or standby mode) from a worker thread:

Code:
BOOL bForced = TRUE;
SetSuspendState(FALSE, bForced, FALSE);

Then in the main thread, while processing window messages:

Code:
LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam) {
if(message == WM_POWERBROADCAST) {
if(wParam == PBT_APMSUSPEND) {
AddLogMsg(_T("SUSPEND event received"));

[Code] ....

So when SetSuspendState is called with request for a 'forced' sleep mode, the PBT_APMSUSPEND notification is never broadcast. Only if I set forced parameter to FALSE I receive it.

PBT_APMRESUMEAUTOMATIC is received in either case.

PBT_APMSUSPEND is always received when run on Windows Vista/7.

View 1 Replies View Related

Visual C++ :: Create A Column Of Buttons In A ListView?

Mar 26, 2013

Is there an easy way to create a column of buttons ina listView?

I need that every file of the listView has a button in the first cell. Is that possible?

View 2 Replies View Related

Visual C++ :: How To Increase Font Size In Buttons

Jan 15, 2014

How to increase font size for a specific button? I tried to change the nHeight but it doesn't seems to change the font size.

Code:

CFont font;
font.CreateFont(
12, // nHeight
0, // nWidth
0, // nEscapement
0, // nOrientation
FW_REGULAR, // nWeight

[Code] ....

View 3 Replies View Related

Visual C++ :: Array Of Buttons - Click Event?

Oct 15, 2012

I have successfully compiled a code where I created an array of buttons. I have added a click event to it like this :

Code:
buttons[indexofhashis2]->Click += gcnew System::EventHandler(this, &Execute::GOBUT_Click);

I have a standard event like this

Code:
private: System::Void GOBUT_Click(System::Object^ sender, System::EventArgs^ e) {
int x;
x = sender->Location.X;
}

Returns error saying Location is not a member of Object^.

I'm trying to create an array of button (user/runtime created buttons) and get different interpretations of the click event depending of wich button is clicked.

For example, if we create buttons[0] I wish to get the 0 or something relevant into the GOBUT_Click event.

View 4 Replies View Related

Visual C++ :: How To Add Images To Toolbar Buttons For Activex Control

Aug 8, 2013

//#import "c:windowsSysWow64mscomctl.ocx" raw_interfaces_only //in window7

using namespace MSComctlLib;
CComPtr<IButtons> pButtons;
CComPtr<IButton> pButton;
CComPtr<IImages> pImages;

[Code] ....

View 11 Replies View Related

Visual C++ :: How To Receive POST Data

Sep 24, 2014

I need to write an interface program in C++ to receive occasional data being sent to me from a different company from across the internet. The company says they will send the data using POST. They have given me a document that lists their data specific parameters and their meaning.

How do I receive this data in my C++ program?

View 14 Replies View Related

Visual C++ :: Send Message - Receive / Respond

Jan 2, 2014

I have a problem in a c++ project. I have created a .dll file and hooked to an .exe

I want this .dll to make a ping or to send a message like hello somewhere, and IF ping or message doesn't receive an answer that's means the user has suspended-terminated this dll from the exe then the exe will close. How can i do that?

View 11 Replies View Related

C# :: How To Close Overlapped I/O Handle

Nov 6, 2012

Consider the following code which closes an overlapped I/O serial handle during application shutdown.

Code:

Win32Com.CancelIo(hPort);
Win32Com.CloseHandle(hPort);

It works fine under .NET 2.0 but after switching to .NET 4.0 it crashes on the CloseHandle. Removing CancelIO doesn't work.

What the correct way is to close an overlapped I/O handle? And why is there the difference between NET2.0 and 4.0?

View 5 Replies View Related

C++ :: Win32 Tab Select Notification?

Dec 18, 2012

I understand including the comctrl32 lib and header. I know to init common controls. I can create a tab window and add tabs to it.

I just can't seem to grasp of how to tell when a specific tab has been selected. I just need to know what to look for with winproc.

View 2 Replies View Related

C++ :: Open Program Error Notification

Mar 23, 2013

I've almost finished a Terminal/Command Prompt Program that can do most of the things a Microsoft or Linux Terminal can do - but I have a problem. I've got it to open programs fine, and I can also open their browser to the download page if they don't have it, but I need my program to know if there isn't the software so a bit like command prompt where it says 'The system cannot find the file test.txt.' and then it'll take them to the website if they like.

View 2 Replies View Related

C# :: Design Pattern For Task Notification System

Feb 24, 2014

I am looking a good design pattern that takes a combination of a Observer Design Pattern and Command Design Pattern.

Observer Design Pattern:

Subject - ISystem
ConcreteSubject - "Different Types of Systems"
Observer - INotifier
ConcreteObserver - "Different Types of Notifier's"

Command Design Pattern: Used to create a task. "Different Types of Task" ....

View 4 Replies View Related

C# :: How To Get AI To Look For Specific Buttons

May 5, 2014

Basically I am creating a game and I need the ai to look for specific buttons. At the moment this is the code I have, and what it does is it makes the ai look for any random button that has't already been clicked.

Code:

private Button look_for_spaces() {
Console.WriteLine("Looking for spaces");
Button b = null;
foreach (Control c in Controls) {
b = c as Button; // performs a cast

[Code] .....

Now what I'm trying to do is make the ai go through 4 searches in steps instead of looking for any button. I want it first to look for buttons 1, 2 and 3, if there's a space in any then it will be clicked but if all of them are already clicked it will look for spaces in buttons 4, 5 and 6 and so on if that makes sense. But i'm not too sure how I would do it.

View 3 Replies View Related

C# :: How Add Buttons To Dialog Derived From GTK

Jul 31, 2014

I want write my first application using Xamarin Studio and GTK#.

I create new file Dialog.cs: public partial class Dialog : Gtk.Dialog

I add Fixed container and can't add buttons, why?

I must use class Window : Gtk.Window instead of Dialog and show modal this window?

View 2 Replies View Related

C# :: Buttons Won't Work On Al Tabs

Jun 24, 2014

The opjective was to build an c# deskop windows application for an classic car sales company.

My job was the employees section of the application.

my problem is the following

i have 3 tabs
summary (overzicht)
details
mutation (muteren)

on the details tab i have 2 buttons and a search box both the buttons only do somthing on the summary tab where they also need to take the selected row to the field on the other tabs.

the search box is a text box that neds to find the valve in the summary tab and then als so select the full row and put it in the onther 2 tabs fields.

this is the code for the back en next buttons

private void btnback_Click(object sender, EventArgs e)
{
if (dataGridView1.CurrentRow.Index >= 1)
{

[Code]....

View 14 Replies View Related

C# :: Matrix Of Buttons Variables?

Jun 14, 2014

There is a genereted matrix of buttons:

private void Single_Load(object sender, EventArgs e) {
//code here
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
//a lot of working code here
b[i, j].Click += new System.EventHandler(ClickButton);
}
}
}

What can I do when one of those buttons is pressed (i have the method ClickButton) to know what i and j has he?

I want to make something like this

ClickButton() {
if (x%2==0)
v[i, j] = x; //i and j should be form the matrix of buttons
}

View 9 Replies View Related

C++ :: Processing Buttons Created At Runtime

Oct 7, 2014

I am developing a small game using MFC in which the game options like new game, save, open, exit etc. can be selected from the menu as well as from the buttons inside the window. I have no problems with the menu but the buttons do not seem to work at all.

The buttons are created at runtime using CButton class. To associate the buttons with the corresponding functions, I just used the same resource ID for the buttons as the menu options, but that did not work. When I click on the buttons, nothing happens. If I assign different resource IDs to the buttons, how do I handle the message map entries? Do I have to write different message map entries for the menus and the buttons while their function is exactly the same?

View 6 Replies View Related

C/C++ :: Creating Many Push Buttons In Win32 API

Apr 13, 2014

I am pretty new to windows programming, but i get around with small applications.

Now I want to create a window with 10 push buttons, and was just wondering if there is some smart way, maybe in a loop to create multiple buttons.

Also, on a very populated window, is there a way to maybe have the WM_CREATE commands stowed away in another cpp file? Just for readabilty.

View 13 Replies View Related

C Sharp :: Convert A List To Buttons

May 27, 2012

I have a txt file of drinks, and I want to meak a list of buttons of it (the txt file is build like this: fanta : 2 ), how can I make buttons of all the drinks ( I get the first one in a button , but not the others).

Dictionary<string, double> drank = new Dictionary<string, double>();
     string[] words = new string[8];
     Button button;
     <Button> BtnList = new List<Button>();

[Code] ....

View 1 Replies View Related

C++ :: Making List Box With 2 Scroll Buttons

Oct 13, 2012

I want to make something like this for a game:

It is a "list box" that has 2 scroll buttons (scroll bar not needed). One button push, "scrolls" the list one entry.

Needs to run crossplatform (windows, linux).

View 4 Replies View Related

C++ :: Making A List Box With Two Scroll Buttons

Oct 13, 2012

I want to make something like this for a game:

Attachment 30507

It is a "list box" that has 2 scroll buttons (scroll bar not needed). One button push, "scrolls" the list one entry.

Needs to run crossplatform (windows, linux).

View 2 Replies View Related

C# :: Create GUI Application That Can Resize Also Control Buttons?

May 23, 2012

how can I create a GUI application that can resize also the control buttons. If the user decide to make the windows bigger or smaller I would like my textbox, buttons, etc.. to follow. Like in Java they use a layout manager, but I can't seem to find the answer for c#. I though to use table layout panel, but it doesn't expand when expanding the windows, unless i miss something

View 3 Replies View Related

C :: Can't Seem To Receive UDP Packets

Jun 2, 2013

I'm trying to get a UDP server working and just can't seem to get it to read in any UDP packets. I can see the packet coming in on the correct interface and port from tcpdump, but my program never logs that it got the data.

I just keep getting a log showing that my recvfrom timed out. I'm pretty sure I'm setting everything up correctly.

Code:
int create_listen_socket() {
struct sockaddr_in si_me;
int sock_fd;
struct ifaddrs * ifAddrStruct=NULL;
struct ifaddrs * ifa=NULL;
void * tmpAddrPtr=NULL;
struct timeval tv;

[Code] ....

View 1 Replies View Related

C Sharp :: How To Remove Dynamically Created Buttons In Gridview

Dec 31, 2013

I'm trying to find a way to remove an item that has been dynamically added when I change my drop down list selected user. The way this works is I add an edit and delete button dynamically when I select a user. I need to have the existing one be removed when I change users. Here is the code I'm using to build the two buttons. How do I remove them? Do I wipe out the columns and then add the columns again?

try {
    dgvBG.DataSource = this.bgDataTableAdapter.GetData(cbPatientID.SelectedItem.ToString());
    try  {
        Image editBGImg = Properties.Resources.editor;
        Image delBGImg = Properties.Resources.del;
        DataGridViewImageColumn btnBGEdit = new DataGridViewImageColumn();

[Code] ....

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved