Search Results

Search found 47 results on 2 pages for 'dialogbox'.

Page 2/2 | < Previous Page | 1 2 

  • How to resize width of a Jquery dialog after initialization

    - by Draco
    Hi, I'm trying to change the width of a JQuery dialog after it has been initialized. Here is my initialization: $(function() { $("#dialogContainer").dialog({ title: 'Some title', resizable: false, bgiframe: true, overlay: { opacity: 0.3, background: "white" }, position: [200, 200], autoOpen: false, height: 150, width: 'auto' modal: true, buttons: { 'ok': function() { $(this).dialog('close'); } } }); }); And this is what I am doing to change the width of it in some other function: $("#dialogBox").dialog('option','width',700); But this doesn't work. The width of the dialog is the width of the paragraph that's first displayed in it. Was I suppose to do anything else? Here is the html for the dialog: <div id = 'dialogContainer'> <p id = 'message'></p> </div>

    Read the article

  • Print over the internet from a remote linux session locally (on a Windows 7 machine) to the shared printers?

    - by obeliksz
    I'm trying to use a linux virtual machine as a file server for windows clients. I have successfully implemented remote file sharing (samba+ssh) with which I am able to print locally with a little program that I made for this purpose (jetforms style)... but I would like to hear about a somewhat more direct approach. How can I attach the printers to the server, so that I can for example open a file on the remote session and in the print dialogbox I would see my local printers (on the machine from which I have established a remote session)? I guess there should be some kind of putty tunneling, but dont know how. I have a windows 7 machine locally; there is a CentOS 6 VM over the internet. It has ssh, cups, and samba. I have found a question which asks the opposite: there is a windows based server to connect form linux but that windows has a domain, mine is just a simple windows workstation that is behind NAT and has a dynamic IP. That question is: Print from Linux to Windows networked printer.

    Read the article

  • How to change StartupUri of WPF Application?

    - by Akash Kava
    I am trying to modify App.cs and load the WPF XAML files from code behind but its not working as it should. No matter whatever I try to set as StartupUri it doesnt start, the program quits after this. public partial class App : Application { protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); LoginDialog dlg = new LoginDialog(); if (dlg.ShowDialog() != true) return; switch (dlg.ChoiceApp) { case ChoiceApp.CustomerEntry: StartupUri = new Uri("/MyApp;component/Forms/CustomerEntry.xaml", UriKind.Relative); break; case ChoiceApp.VendorEntry: StartupUri = new Uri("/MyApp;component/Forms/VendorEntry.xaml", UriKind.Relative); break; } } } Now I even did trace and found out that LoginDialog is working correctly and is returning values correctly but setting "StartupUri" does not work. I checked in reverse assembly that DoStartup method of App gets called after OnStartup, so technically my StartupUri must load, but it doesnt, in App.xaml startup uri is not at all defined. Note: Bug Confirmed I noticed that ShowDialog sets Application.MainWindow and when dialog ends, it sets it back to null, and because of this setting StartupUri does not work after calling Modal Dialog in OnStartup or Startup event. There is no error or exception about invalid uri or anything like that. This method works without DialogBox being called in Startup event or OnStartup, i think calling showdialog on this method causes something like its mainwindow being set to expired window and it shuts down after this.

    Read the article

  • Asynchronuos callback saves value but prints FAILED

    - by sprasad12
    Hi, I am using nested Asynchronous callbacks to save my front-end data to the back-end database. The data is being save into the tables the way i want them to, but it is printing that it failed. Here is the code: oksave.addClickHandler(new ClickHandler(){ public void onClick(ClickEvent event) { if(erasync == null) erasync = GWT.create(EntityRelationService.class); AsyncCallback<Void> callback = new AsyncCallback<Void>(){ public void onFailure(Throwable caught) { String msg = caught.getLocalizedMessage(); if (caught instanceof NotFoundException) { msg = ((NotFoundException) caught).getType() + ((NotFoundException) caught).getMessage(); } System.out.println("Failed" + msg); } public void onSuccess(Void result) { Label success = new Label("Name : " + pname.getText() + " was successfully saved"); Button close = new Button("close"); VerticalPanel sp = new VerticalPanel(); d1 = new DialogBox(); sp.add(success); sp.add(close); close.addClickHandler(new ClickHandler(){ @Override public void onClick(ClickEvent event) { if(erasync == null) erasync = GWT.create(EntityRelationService.class); AsyncCallback<Void> callbackOthers = new AsyncCallback<Void>(){ @Override public void onFailure(Throwable caught) { String msg = caught.getLocalizedMessage(); if (caught instanceof NotFoundException) { msg = ((NotFoundException) caught).getType() + ((NotFoundException) caught).getMessage(); } System.out.println("Failed" + msg); } @Override public void onSuccess(Void result) { System.out.println("Success"); } }; erasync.setEntityType(name, top, left, pname, callbackOthers); }); }; erasync.setProject(name, callback); }); Here it prints successful for the first callback, but for the nested one it says failed though it saves the value. Am i missing something? Any input will be of great help. Thank you.

    Read the article

  • Android : showDialog not displayer inside onActivityResult after take photo

    - by Nicolas
    Hello, When i'm in onActivityResult and i try to show a custom progress dialog, The dialog is not show, but the function is called, but nothing is displayed If i put this dialog in Oncreate it's working i see the dialogbox, Is it possible to show a custom dialog on return of Intent.ACTION_GET_CONTENT / MediaStore.ACTION_IMAGE_CAPTURE Thanks protected void onActivityResult(int requestCode, int resultCode, Intent data) { Parseur UploadPhoto = new Parseur(); showDialog(PROGRESS_DIALOG); if (requestCode == z_const.REQUEST_INTENT_CODE_PHOTO_CHOISIR) { String selectedImagePath; Uri selectedImageUri; if (data != null){ selectedImageUri = data.getData(); selectedImagePath = getPath(selectedImageUri); Log.e(TAG, "PHOTO CHOISIR " + selectedImagePath+"Res"+resultCode); UploadPhoto.uploadPhoto(InfoPasse,selectedImagePath); } } finish(); } protected Dialog onCreateDialog(int id) { Log.e(TAG," DIAL appeller "+id); switch(id) { case PROGRESS_DIALOG: progressDialog = new ProgressDialog(Photo.this); progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.setMessage("Loading..."); progressThread = new ProgressThread(handler); progressThread.start(); return progressDialog; default: return null; } }

    Read the article

  • Input validation in WPF

    - by irfanali-wpfexpert
    i am developing an application in wpf using MVVM design pattern. i have a listbox when an item is slected then a dialog is open having the same record in editable mode. this dialog is binded with the selected item of the list. i have apply the validation rule for textbox using IDataErrorInfo. when the user update a record on dialogbox then at every key press, the selected record in listbox is also changed. if the user press save button then i submit changes to database. but if user click cancel button then i do not submit changes to database but the list box is updated with the current updation in GUI. when i refresh the list then old value appears again. My requirement is to update the listbox only when the user hit the save button but not on every key press on dialog box. I first fill the generic list with the linq to sql classes then bind the listbox with it. Please let me know what i have to do. Thanks in advance

    Read the article

  • Excel COM Add-In dialog interrupts script

    - by usac
    Hi all! I have written an Excel COM Add-In in C++ for automation of Excel with VBA. It contains an own dialog showing some general informations about the Add-In. Now i create a button in Excel that opens the dialog. Leaving the dialog with the escape key leads to an Excel message that the script is being interrupted instead of just closing the dialog. I could suppress the interruption message with: Application.EnableCancelKey = xlDisabled But that seems not to be the solution as the script can not be interrupted any more. Here is an example how i use VBA to open the dialog: Private Sub ShowAboutDialog_Click() Dim oComAddIn As COMAddIn Set oComAddIn = Application.COMAddIns.Item("MyComAddIn.Example") oComAddIn.Connect = True Call oComAddIn.Object.ShowAboutDlg End Sub My guess is that the problem is somewhere in the message handler of the dialog: INT_PTR CALLBACK CAboutDialog::AboutDlg( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch(uMsg) { ... case WM_COMMAND: if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { // Here, the ESCAPE key should also be trapped? EndDialog(hwndDlg, LOWORD(wParam)); return TRUE; } ... } return FALSE; } The Dialog is created with: DialogBox(g_hModule, MAKEINTRESOURCE(IDD_ABOUT), hWndParent, (DLGPROC)AboutDlg) Thanks a lot!

    Read the article

  • What are some choices to port existing Windows GUI app written in C to Linux?

    - by Warner Young
    I've been tasked with porting an existing Windows GUI app to Linux. Ideally, I'd like to do this so the same code base can be used to build either the Windows version or the Linux version. I'll be doing my work on Ubuntu 9.04. After searching around, it's unclear to me what tools are best suited to help me with this. A list of loose requirements would be: The code is in C, not C++, and should compile to build both Windows and Linux versions. Since it's existing code, and fairly large, converting to a managed language like .NET is out of the question for now. I would prefer if I can use the same dialogs in both systems. In Windows, putting up a dialog is pretty simple. You build the dialog in the Resource Editor in Visual Studio, then call DialogBox() API, and handle the event messages. I would really like to find something that can do the equivalent on the Linux side. It would also be nice to have a good IDE similar to Visual Studio. Any helps or hints would be appreciated. Thanks,

    Read the article

  • Zend/PHP: How to disable webpage behind popup ?

    - by NAVEED
    I am working on zend framework, PHP and jQuery. I am working on popups sometimes. When any popup is open on the screen, we can still clicks links on webpage behind popup which causes some unexpected behaviour. How can I disable a webpage behind popup. I have seen some web application in which when popup appears then webpage behind popup become shady. I have read some tutorial about this. In each tutorial a link is used to open a dialog and an special attribute is added in for modal. But I have a different case I have to open dialog on some condition in action. I check a condition in action after post like this: $form = new Edit_Form( ); $this->view->form = $form; $this->view->form->setAction($this->view->url()); $request = $this->getRequest(); if ( $request->isPost() ) { $values = $request->getParams(); if( $values['edit'] ) { $this->view->openEditBox(); } } Now check in view to see that it should open an edit pop or not: if( $this->openEditBox ){ $jsonOutput ['content'] = '<div class="DialogBox" title="Edit">' . $this->form->render() . '</div>'; echo Zend_Json::encode($jsonOutput); } Any Idea? Thanks

    Read the article

  • jquery: how can i load the Google Maps API via ajax?

    - by Haroldo
    Before you reply: this is not as straight foward as you'd expect! I have a 'show on map' button which when clicked opens a dialogbox/lightbox with the google map in. I don't want to load the maps api on pageload, just when a map has been requested This is php file the "show on map" button puts into the dialog box: <div id="map_canvas"></div> <script type="text/javascript"> $(function() { //google maps stuff var latlng = new google.maps.LatLng(<?php echo $coords ?>); var options = { zoom: 14, center: latlng, mapTypeControl: false, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById('map_canvas'), options); var marker = new google.maps.Marker({ position: new google.maps.LatLng(<?php echo $coords ?>), map: map }); }) </script> I've been trying to load the API before ajaxing in the dialog like this: $('img.map').click(function(){ var rel = $(this).attr('rel'); $.getScript('http://maps.google.com/maps/api/js?sensor=false', function(){ $.fn.colorbox({ href:rel }) }); }) this doesn't seem to work :( i've also tried: adding <script src="http://maps.google.com/maps/api/js?sensor=false"></script> to the ajax file type="text/javascript" running $.getScript('http://maps.google.com/maps/api/js?sensor=false'); on doc.ready the problem the browser seems to be redirected to the api.js file - you see a white screen

    Read the article

  • Form submitted via dialog opens dialog again

    - by VikingGoat
    I have a form in a jquerymobile dialog box that I am submitting via jQuery Ajax. Currently my problem is that once the form is submitted the same dialog box is opened again on top of the original dialogbox. So that my url reads before submission: url/index.php#&ui-state=dialog and then after submission: url/index.php#&ui-state=dialog#&ui-state=dialog&ui-state=dialog Has anyone ever encountered something like this before? [edit added code example] $(function(){ $("#form").submit(function(e){ e.preventDefault(); var dataString = $("#form").serialize(); errorInput = $("input[name=valOne]#valOne").val(); $.ajax({ type: "GET", url: "formHandler.php", data: dataString, dataType: "text", success: function(data){ if(data.toLowerCase().indexOf("error") >= 0){ alert(data); $(".ui-dialog").dialog("close"); $("#valOne").val(errorInput); //the reentering info so user doesn't have to }else{ $(".ui-dialog").dialog("close"); location.href="index.php"; } }, error:function (xhr, ajaxOptions, thrownError){ alert(thrownError); } }); }); });

    Read the article

  • How to display a Dialog on window created using XCreateWindow in QT 4.5.2

    - by Ummar
    I am doing work on project. In which I have developed a full size screen displaying images using XCreateWindow. Now I want to display a dialog on this screen. I have created a QDialog it does'nt show on the full size screen but it is displayed on screen when it is not full size. Any Help. My code for creating screen and dialogbox is as follows XSetWindowAttributes attribs; XClassHint *classhints; XSizeHints *sizehints; int wndwidth, wndheight; long input_mask, ic_input_mask; XEvent xevent; wndwidth = fullscreen ? WidthOfScreen(screen) : width; wndheight = fullscreen ? HeightOfScreen(screen) : height; attribs.background_pixel = BlackPixelOfScreen(screen); attribs.backing_store = ownbackstore ? NotUseful : Always; attribs.override_redirect = fullscreen; wnd = XCreateWindow(display, RootWindowOfScreen(screen), 0, 0, wndwidth, wndheight, 0, CopyFromParent, InputOutput, CopyFromParent, CWBackPixel | CWBackingStore | CWOverrideRedirect, &attribs); XRaiseWindow(display, wnd); //QDialog I want to show on wnd(XCreateWindow) ToolbarDialog *objToolbarDialog= new ToolbarDialog(); objToolbarDialog->setVisible(true); objToolbarDialog->showNormal();

    Read the article

  • Get the id of the link and pass it to the jQueryUI dialog widget

    - by Mike Sanchez
    I'm using the dialog widget of jQueryUI. Now, the links are grabbed from an SQL database by using jQuery+AJAX which is the reason why I used "live" $(function() { var $dialog = $('#report') .dialog({ autoOpen: false, resizable: false, modal: true, height: 410, width: 350, draggable: true }) //store reference to placeholders $uid = $('#reportUniqueId'); $('.reportopen').live("click", function (e) { $dialog.dialog('open'); var $uid = $(this).attr('id'); e.preventDefault(); }); }); My question is, how do I pass the id of the link that triggered the dialog widget to the dialog box itself? The link is set up like this: <td align="left" width="12%"> <span id="notes"> [<a href="javascript:void(0)" class="reportopen" id="<?=$reportId;?>">Spam</a>] </span> </td> And the dialogbox is set up like this: <div id="report" title="Inquire now"> HAHAHAHAHA <span id="reportUniqueId"></span> </div> I'd like for the id to be passed and generated in the <span id="reportUniqueId"></span> part of the dialog box. Any idea?

    Read the article

  • wxPython: MainLoop() seems to hang

    - by BandGap
    Hi all, my problem stems from the use of wxApp as far as I can tell. Inside a litte subroutine I call a wx.MessageDialog to ask for a yes or no. I retrieve the answer an process some stuff acordingly. My example code below actually works (though it might be ugly) except that the Dialog box stays open after hitting one of the buttons... import wx from os import path def HasFile(filename): if path.isfile(filename ): app = wx.App() dial = wx.MessageDialog(None, 'Die Datei "'+filename+'" wurde gefunden.\nSoll sie eingelesen werden?', 'Bitte antworten', wx.YES_NO | wx.YES_DEFAULT | wx.ICON_QUESTION) result = dial.ShowModal() dial.EndModal(retCode=0) dial.Destroy() app.MainLoop() return result == wx.ID_YES else: return False So while the rest of the program does whatever is expected, the box just sits there. It also seems like my calls to matplotlib later on are producing errors (a Tkinter error to be precise), maybe because of the wx stuff? Edit: I tried to end the app with a call to app.Destroy(). This doesn't change the fact that the box is still there. When I issue a app.IsActive() afterwards the whole program exits (almost like a sys.exit())! How come? Edit 2: Adding a wxApp like this isn't a good idea since the other scripts get affected as well. Subsequent plotting commands don't get displayed and I don't know how to fix this. Thus I decided to remove the DialogBox alltogether.

    Read the article

  • Problems with Window Functions Wndproc and about

    - by BrianHuangverinem
    I really having problems with this problem ,it would be nice if someone help me on this. Every time I try to build my source file the same errors occur every time for the two window functions CALLBACK Wndproc and CALLBACK About. error: "local function definitions are illegal" Can you tell me what mistake I made? LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { int wmId, wmEvent; PAINTSTRUCT ps; HDC hdc; wmId = LOWORD(wParam); wmEvent = HIWORD(wParam); switch (message) { case WM_COMMAND: // Parse the menu selections: switch (wmId) { case IDM_ABOUT: DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About); break; case IDM_EXIT: DestroyWindow(hWnd); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } break; case WM_PAINT: hdc = BeginPaint(hWnd, &ps); CaptureImage(hWnd); EndPaint(hWnd, &ps); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } return 0; } // Message handler for about box. INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { UNREFERENCED_PARAMETER(lParam); switch (message) { case WM_INITDIALOG: return (INT_PTR)TRUE; case WM_COMMAND: if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { EndDialog(hDlg, LOWORD(wParam)); return (INT_PTR)TRUE; } break; } return (INT_PTR)FALSE; }

    Read the article

  • CodePlex Daily Summary for Thursday, June 30, 2011

    CodePlex Daily Summary for Thursday, June 30, 2011Popular ReleasesASP.NET Comet Ajax Library (Reverse Ajax - Server Push): Reverse Ajax Samples v1.53: 16 Comprehensive ASP.NET Ajax / Reverse Ajax / WCF / MVC / Mono samplesReactive Extensions - Extensions (Rxx): Rxx 1.1: What's NewRelated Work Items Please read the latest release notes for details about what's new. About LabsAll "Labs" downloads include the Rxx.dll assembly, so only a single download is required. To start RxxLabs.exe, right-mouse click and select Run as Administrator; otherwise, do not run the Reactive WebClient lab because it will crash the program. RxxLabs.exe requires administrator privileges for the Reactive WebClient lab to register a local HTTP port. To launch the Silverlight labs...CommonLibrary.NET: CommonLibrary.NET - 0.9.7 Final: A collection of very reusable code and components in C# 4.0 ranging from ActiveRecord, Csv, Command Line Parsing, Configuration, Holiday Calendars, Logging, Authentication, and much more. Samples in <root>\src\Lib\CommonLibrary.NET\Samples CommonLibrary.NET 0.9.7Documentation 6738 6503 New 6535 Enhancements 6759 6748 6583 6737datajs - JavaScript Library for data-centric web applications: datajs version 1.0.0: datajs is a cross-browser and UI agnostic JavaScript library that enables data-centric web applications with the following features: OData client that enables CRUD operations including batching and metadata support using both ATOM and JSON payloads. Single store abstraction that provides a common API on top of HTML5 local storage technologies. Data cache component that allows reading data ranges from a collection and storing them locally to reduce the number of network requests. Changes...Coding4Fun Tools: Coding4Fun.Phone.Toolkit v1.4.4: Fix for http://coding4fun.codeplex.com/workitem/6869 was incomplete. Back button wouldn't return app bar. Corrected now. High impact bugSiteMap Editor for Microsoft Dynamics CRM 2011: SiteMap Editor (1.0.528.279): Added keyboard shortcuts: - Cut (CTRL+X) - Copy (CTRL+C) - Paste (CTRL+V) - Delete (CTRL+D) - Move up (CTRL+UP ARROW) - Move down (CTRL+DOWN ARROW) Added ability to save/load SiteMap from/to a Xml file on disk Bug fix: - Connect to a server through the status bar was throwing error "Object Reference not set to an instance of an object" - Rename TreeNode.Name after changing TreeNode.TextMicrosoft - Domain Oriented N-Layered .NET 4.0 App Sample: V2.01 ALPHA N-Layered SampleApp .NET 4.0 and EF4.1: V2.0.01 - ALPHARequired Software (Microsoft Base Software needed for Development environment) Visual Studio 2010 RTM & .NET 4.0 RTM (Final Versions) Expression Blend 4 SQL Server 2008 R2 Express/Standard/Enterprise Unity Application Block 2.0 - Published May 5th 2010 http://www.microsoft.com/downloads/en/details.aspx?FamilyID=2D24F179-E0A6-49D7-89C4-5B67D939F91B&displaylang=en http://unity.codeplex.com/releases/view/31277 PEX & MOLES 0.94.51023.0, 29/Oct/2010 - Visual Studio 2010 Power ...Mosaic Project: Mosaic Alpha build 261: - Fixed crash when pinning applications in x64 OS - Added Hub to video widget. It shows videos from Video library (only .wmv and .avi). Can work slow if there are too much files. - Fixed some issues with scrolling - Fixed bug with html widgets - Fixed bug in Gmail widget - Added html today widget missed in previous release - Now Mosaic saves running widgets if you restarting from optionsEnhSim: EnhSim 2.4.9 BETA: 2.4.9 BETAThis release supports WoW patch 4.2 at level 85 To use this release, you must have the Microsoft Visual C++ 2010 Redistributable Package installed. This can be downloaded from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=A7B7A05E-6DE6-4D3A-A423-37BF0912DB84 To use the GUI you must have the .NET 4.0 Framework installed. This can be downloaded from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9cfb2d51-5ff4-4491-b0e5-b386f32c0992 - Added in some of th....NET Reflector Add-Ins: Reflector V7 Add-Ins: All the add-ins compiled for Reflector V7TerrariViewer: TerrariViewer v4.1 [4.0 Bug Fixes]: Version 4.1 ChangelogChanged how users will Open Player files (This change makes it much easier) This allowed me to remove the "Current player file" labels that were present Changed file control icons Added submit bug button Various Bug Fixes Fixed crashes related to clicking on buffs before a character is loaded Fixed crashes related to selecting "No Buff" when choosing a new buff Fixed crashes related to clicking on a "Max" button on the buff tab before a character is loaded Cor...AcDown????? - Anime&Comic Downloader: AcDown????? v3.0 Beta8: ??AcDown???????????????,?????????????????????。????????????????????,??Acfun、Bilibili、???、???、?????,???????????、???????。 AcDown???????????????????????????,???,???????????????????。 AcDown???????C#??,?????"Acfun?????"。 ????32??64? Windows XP/Vista/7 ????????????? ??:????????Windows XP???,?????????.NET Framework 2.0???(x86)?.NET Framework 2.0???(x64),?????"?????????"??? ??????????????,??????????: ??"AcDown?????"????????? ??v3.0 Beta8 ?? ??????????????? ???????????????(??????????) ???????...BlogEngine.NET: BlogEngine.NET 2.5: Get DotNetBlogEngine for 3 Months Free! Click Here for More Info 3 Months FREE – BlogEngine.NET Hosting – Click Here! If you want to set up and start using BlogEngine.NET right away, you should download the Web project. If you want to extend or modify BlogEngine.NET, you should download the source code. If you are upgrading from a previous version of BlogEngine.NET, please take a look at the Upgrading to BlogEngine.NET 2.5 instructions. To get started, be sure to check out our installatio...PHP Manager for IIS: PHP Manager 1.2 for IIS 7: This release contains all the functionality available in 62183 plus the following additions: Command Line Support via PowerShell - now it is possible to manage and script PHP installations on IIS by using Windows PowerShell. More information is available at Managing PHP installations with PHP Manager command line. Detection and alert when using local PHP handler - if a web site or a directory has a local copy of PHP handler mapping then the configuration changes made on upper configuration ...MiniTwitter: 1.71: MiniTwitter 1.71 ???? ?? OAuth ???????????? ????????、??????????????????? ???????????????????????SizeOnDisk: 1.0.10.0: Fix: issue 327: size format error when save settings Fix: some UI bindings trouble (sorting, refresh) Fix: user settings file deletion when corrupted Feature: TreeView virtualization (better speed with many folders) Feature: New file type DataGrid column Feature: In KByte view, show size of file < 1024B and > 0 with 3 decimal Feature: New language: Italian Task: Cleanup for speedRawr: Rawr 4.2.0: This is the Downloadable WPF version of Rawr!For web-based version see http://elitistjerks.com/rawr.php You can find the version notes at: http://rawr.codeplex.com/wikipage?title=VersionNotes Rawr AddonWe now have a Rawr Official Addon for in-game exporting and importing of character data hosted on Curse. The Addon does not perform calculations like Rawr, it simply shows your exported Rawr data in wow tooltips and lets you export your character to Rawr (including bag and bank items) like Char...N2 CMS: 2.2: * Web platform installer support available ** Nuget support available What's newDinamico Templates (beta) - an MVC3 & Razor based template pack using the template-first! development paradigm Boilerplate CSS & HTML5 Advanced theming with css comipilation (concrete, dark, roadwork, terracotta) Template-first! development style Content, news, listing, slider, image sizes, search, sitemap, globalization, youtube, google map Display Tokens - replaces text tokens with rendered content (usag...KinectNUI: Jun 25 Alpha Release: Initial public version. No installer needed, just run the EXE.Terraria World Viewer: Version 1.5: Update June 24th Made compatible with the new tiles found in Terraria 1.0.5New Projects{Adjunct} functionality for the .NET framework: A project to provide Ingots for the .NET framework.3Webee.net: 3Webee.net is the First Navigator dedicated to Web.3.0 by P2P. Developped in C# for DotNet-3.5 or Mono.net, compatible with Linux ready. Website.fr : http://3webee.net/ Download Win32 : http://3webee.net/Download/3Webee.net.beta.0.0.Win32.exe AB Donor Choose Planner: The goal of this doantion planner is to allow you to coordinate the completion of one or more Donors Choose projects. The tool gives you a portfolio view of the donations you would like to invest in by targeting your investments in a location/regional focused manner.appperu1: asdasdsaddas: ColinTestingasdfFindClone: Find clone files, find duplicate files, remove duplicate filesfirstcpapp: This is my appForecast Parser: The NOAA hosts forecast data accessible over the web. These libraries download and parse seven day hourly forecast data and encapsulates the data in an easy to use class.Future Apple Osx: Future Apple Osx, Is a free operating system to use. It was built from the ground up with the help of Cosmos. It is free to use and download. So please check it out today.Glimpse: Glimpse is a web debugger and diagnostics tool for ASP.NET and ASP.NET MVC. You can find out more at getGlimpse.comiAdm: ?? iToday ??? wince 6 R2 ?????ImagineCup Worldwide Finals Tracker: An open-source Windows Phone application that is used to track the events going on at the ImagineCup Worldwide Finals.John Owl: John OwlLAM - Local Area Messaging: A VB.NET local area chat application. Finds the lan clients and communicates through the lan with old Ms-Winsock Interop.MessyBrain: Organize your tasks in an efficient way. Assign tasks to members of your team. Create workflows for your team. Written in C# and ASP.NET MVC. Why did I start this project? Making mistakes is part of the learning process. They can be painful especially when they are made at work; there’s a cost attached to it. Why not start a project on my own? Mistakes will be less painful (only my ego will be damaged), I learn something new and there isn’t a cost attached to it. I can share the code ...Navigation Light Toolkit: Navigation Light add support for View Navigation in WPF and SilverlightRight Click Calculator: a mini calculator with numpad that opens in a dialogbox. it can combined with a textbox. bir textbox üzerinde sag tus ile açabileceginiz ufak bir hesap makinesi örnegi.Shaaps & Ladders: It's a modern software implementation of the popular classic board game Snakes & Ladders. The Bengali translation of "Snakes" pronounces "Shaaps" and thus the name of the game is such. The game is being developed on top of the Shaaps & Ladders GDK. Source for both are released.SharePoint PowerShell Scripts: Usefull PowerShell scripts written for SharePoint that helps organizations with governance.Smith Web Tools: Smith Web Tools are some useful controls to help to build web application. They are written in pure JavaScript and CSS without introducing any other JavaScript framework. At present, the Smith Calendar, Smith Editor, and Smith Dialog are available.SSAS Query Log Decoder & Analyzer: The Crisp description for the project will be "CUBE FOR CUBE". This is an end-to-end BI solution for analyzing the Query log created by SSAS Server. The Query Log data is loaded into a dimensional model and a cube is built on top of it for analysis of cube usage.takcandmansys: takcandmansysTestHG1: TestHG1TESTProjHG: TESTProjHGTestTFS1: TestTFS1TESTTFSAAA: TESTTFSAAATower: tower showTransit Feed Generator: Library for help the integration with Google Transit. This library generates the zipped file with data for Google Transit Feed, in the GTFS formatVRE Collaborator Search Kit for SharePoint 2010: VRE Collaborator Search Kit for SharePoint 2010VRE Content Archiving Kit for SharePoint 2010: VRE Content Archiving Kit for SharePoint 2010VRE Document Review Workflow Kit for SharePoint 2010: VRE Document Review Workflow Kit for SharePoint 2010 VRE Literature Review Kit for SharePoint 2010: VRE Literature Review Kit for SharePoint 2010 VRE Researcher and Project Templates for SharePoint 2010: VRE Researcher and Project Templates for SharePoint 2010 VRE RSS Feeds Kit for SharePoint 2010: VRE RSS Feeds Kit for SharePoint 2010 VRE User Administration (FBA) Kit for SharePoint 2010: VRE User Administration (FBA) Kit for SharePoint 2010 WebPart Collapser: WebPart Collapser is a lightweight, customizable jQuery plugin for SharePoint 2007 that allows visitors to expand/collapse WebParts. Through the use of cookies, the collapsed state of any webparts will be saved and collapsed each time a user visits a page. WPF Hex Editor: hex editor which is created with WPF with a xaml designed UI.Xoorscript: A proprietary scripting language created by Jared Thomson for the purpose of script defining an easy to use make system. The plans for this project are minimal for now, but if things go well I may expand it. This is low priority for me.

    Read the article

  • How can I get popup window using commandButton in Trinidad?

    - by vikram
    How can I get popup window using commandButton in Trinidad? My problem is that by clicking on Add button from dialogdemo.jspx, not any popup window or dialog box is opened. This is dialogdemo.jspx file: <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:f="http://java.sun.com/jsf/core" xmlns:tr="http://myfaces.apache.org/trinidad" version="1.2"> <jsp:directive.page contentType="text/html;charset=utf-8" /> <f:view> <tr:document title="Dialog Demo"> <tr:form> <!-- The field for the value; we point partialTriggers at the button to ensure it gets redrawn when we return --> <tr:inputText label="Pick a number:" partialTriggers="buttonId" value="#{launchDialog.input}" /> <!-- The button for launching the dialog: we've also configured the width and height of that window --> <tr:commandButton text="Add" action="dialog:chooseInteger" id="buttonId" windowWidth="300" windowHeight="200" partialSubmit="true" useWindow="true" returnListener="#{launchDialog.returned}" /> </tr:form> </tr:document> </f:view> </jsp:root> Here is the associated managed bean LaunchDialogBean.java: package jsfpkg; import org.apache.myfaces.trinidad.component.UIXInput; import org.apache.myfaces.trinidad.event.ReturnEvent; public class LaunchDialogBean { private UIXInput _input; public UIXInput getInput() { return _input; } public void setInput(UIXInput input) { _input = input; } public void returned(ReturnEvent event) { if (event.getReturnValue() != null) { getInput().setSubmittedValue(null); getInput().setValue(event.getReturnValue()); } } } Here is the popup file Popup.jspx: <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:trh="http://myfaces.apache.org/trinidad/html" xmlns:tr="http://myfaces.apache.org/trinidad" version="2.0"> <jsp:directive.page contentType="text/html;charset=utf-8" /> <f:view> <tr:document title="Add dialog"> <tr:form> <!-- Two input fields --> <tr:panelForm> <tr:inputText label="Number 1:" value="#{chooseInteger.value1}" required="true" /> <tr:inputText label="Number 2:" value="#{chooseInteger.value2}" required="true" /> </tr:panelForm> <!-- Two buttons --> <tr:panelGroup layout="horizontal"> <tr:commandButton text="Submit" action="#{chooseInteger.select}" /> <tr:commandButton text="Cancel" immediate="true" action="#{chooseInteger.cancel}" /> </tr:panelGroup> </tr:form> </tr:document> </f:view> </jsp:root> For that I have written the bean ChooseIntegerBean.java package jsfpkg; import org.apache.myfaces.trinidad.context.RequestContext; public class ChooseIntegerBean { private Integer _value1; private Integer _value2; public Integer getValue1() { return _value1; } public void setValue1(Integer value1) { _value1 = value1; } public Integer getValue2() { return _value2; } public void setValue2(Integer value2) { _value2 = value2; } public String cancel() { RequestContext.getCurrentInstance().returnFromDialog(null, null); return null; } public String select() { Integer value = new Integer(getValue1().intValue() + getValue2().intValue()); RequestContext.getCurrentInstance().returnFromDialog(value, null); return null; } } Here is my faces-config.xml: <managed-bean> <managed-bean-name>chooseInteger</managed-bean-name> <managed-bean-class>jsfpkg.ChooseIntegerBean</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> <managed-bean> <managed-bean-name>launchDialog</managed-bean-name> <managed-bean-class>jsfpkg.LaunchDialogBean</managed-bean-class> <managed-bean-scope> request </managed-bean-scope> </managed-bean> <navigation-rule> <from-view-id>/dialogdemo.jspx</from-view-id> <navigation-case> <from-outcome>dialog:chooseInteger</from-outcome> <to-view-id>/dialogbox.jspx</to-view-id> </navigation-case> </navigation-rule>

    Read the article

  • i have a win32 windows application and want to capture full screen and remove the border of window d

    - by moon
    win32 windows application and want to capture full screen and remove the border of window displayed any one tell me how can i do so if this window capture the mouse keyboard controls then it will be ideal? // MonitorScreen.cpp : Defines the entry point for the application. // include "stdafx.h" include "MonitorScreen.h" define MAX_LOADSTRING 100 // Global Variables: HINSTANCE hInst; // current instance TCHAR szTitle[MAX_LOADSTRING]; // The title bar text TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name // Forward declarations of functions included in this code module: ATOM MyRegisterClass(HINSTANCE hInstance); BOOL InitInstance(HINSTANCE, int); LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM); int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); // TODO: Place code here. MSG msg; HACCEL hAccelTable; // Initialize global strings LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); LoadString(hInstance, IDC_MONITORSCREEN, szWindowClass, MAX_LOADSTRING); MyRegisterClass(hInstance); // Perform application initialization: if (!InitInstance (hInstance, nCmdShow)) { return FALSE; } hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_MONITORSCREEN)); // Main message loop: while (GetMessage(&msg, NULL, 0, 0)) { if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } return (int) msg.wParam; } // // FUNCTION: MyRegisterClass() // // PURPOSE: Registers the window class. // // COMMENTS: // // This function and its usage are only necessary if you want this code // to be compatible with Win32 systems prior to the 'RegisterClassEx' // function that was added to Windows 95. It is important to call this function // so that the application will get 'well formed' small icons associated // with it. // ATOM MyRegisterClass(HINSTANCE hInstance) { WNDCLASSEX wcex; int s =sizeof(WNDCLASSEX); wcex.cbSize =sizeof(WNDCLASSEX); wcex.style = DESKTOP_HOOKCONTROL ;//CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = NULL;//hInstance; wcex.hIcon = NULL;//LoadIcon(hInstance, MAKEINTRESOURCE(IDI_MONITORSCREEN)); wcex.hCursor = NULL;//LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)(9); wcex.lpszMenuName = NULL;//MAKEINTRESOURCE(IDC_MONITORSCREEN); wcex.lpszClassName = szWindowClass; wcex.hIconSm = NULL;//LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL)); return RegisterClassEx(&wcex); } // // FUNCTION: InitInstance(HINSTANCE, int) // // PURPOSE: Saves instance handle and creates main window // // COMMENTS: // // In this function, we save the instance handle in a global variable and // create and display the main program window. // BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) { HWND hWnd; hInst = hInstance; // Store instance handle in our global variable hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL); if (!hWnd) { return FALSE; } ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd); return TRUE; } // // FUNCTION: WndProc(HWND, UINT, WPARAM, LPARAM) // // PURPOSE: Processes messages for the main window. // // WM_COMMAND - process the application menu // WM_PAINT - Paint the main window // WM_DESTROY - post a quit message and return // // LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { int wmId, wmEvent; PAINTSTRUCT ps; HDC hdc; switch (message) { case WM_COMMAND: wmId = LOWORD(wParam); wmEvent = HIWORD(wParam); // Parse the menu selections: switch (wmId) { case IDM_ABOUT: DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About); break; case IDM_EXIT: DestroyWindow(hWnd); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } break; case WM_PAINT: hdc = BeginPaint(hWnd, &ps); // TODO: Add any drawing code here... EndPaint(hWnd, &ps); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } return 0; } // Message handler for about box. INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { UNREFERENCED_PARAMETER(lParam); switch (message) { case WM_INITDIALOG: return (INT_PTR)TRUE; case WM_COMMAND: if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { EndDialog(hDlg, LOWORD(wParam)); return (INT_PTR)TRUE; } break; } return (INT_PTR)FALSE; }

    Read the article

  • how to use a class method as a WIN32 application callback method (WINPROC)... Error static struct HI

    - by numerical25
    I am receiving errors and at the same time trying to make this work so please read what I got to say. Thanks.... I am creating a c++ application and majority of the application is encapsulated into a class. That means that my WinProc function is a static class method that I use as my call back method for my win32 application. The problem is that since I created that as a win32 application, every class member I use inside that method has to be static as well. Including my HINSTANCE class which I use inside of it. Now I receive this error error LNK2001: unresolved external symbol "public: static struct HINSTANCE__ I need to figure out how to make this all work and below is my class declaration. My static member static HINSTANCE m_hInst is causing the error I believe. #pragma once #include "stdafx.h" #include "resource.h" #define MAX_LOADSTRING 100 class RenderEngine { protected: int m_width; int m_height; ATOM RegisterEngineClass(); public: static HINSTANCE m_hInst; //<------ This is causing the error HWND m_hWnd; int m_nCmdShow; TCHAR m_szTitle[MAX_LOADSTRING]; // The title bar text TCHAR m_szWindowClass[MAX_LOADSTRING]; // the main window class name bool InitWindow(); bool InitDirectX(); bool InitInstance(); //static functions static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); static INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); int Run(); }; Below is the implementation #include "stdafx.h" #include "RenderEngine.h" bool RenderEngine::InitWindow() { RenderEngine::m_hInst = NULL; // Initialize global strings LoadString(m_hInst, IDS_APP_TITLE, m_szTitle, MAX_LOADSTRING); LoadString(m_hInst, IDC_RENDERENGINE, m_szWindowClass, MAX_LOADSTRING); if(!RegisterEngineClass()) { return false; } if(!InitInstance()) { return false; } return true; } ATOM RenderEngine::RegisterEngineClass() { WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = RenderEngine::WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = m_hInst; wcex.hIcon = LoadIcon(m_hInst, MAKEINTRESOURCE(IDI_RENDERENGINE)); wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wcex.lpszMenuName = MAKEINTRESOURCE(IDC_RENDERENGINE); wcex.lpszClassName = m_szWindowClass; wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL)); return RegisterClassEx(&wcex); } LRESULT CALLBACK RenderEngine::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { int wmId, wmEvent; PAINTSTRUCT ps; HDC hdc; switch (message) { case WM_COMMAND: wmId = LOWORD(wParam); wmEvent = HIWORD(wParam); // Parse the menu selections: switch (wmId) { case IDM_ABOUT: DialogBox(m_hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About); break; case IDM_EXIT: DestroyWindow(hWnd); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } break; case WM_PAINT: hdc = BeginPaint(hWnd, &ps); // TODO: Add any drawing code here... EndPaint(hWnd, &ps); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } return 0; } bool RenderEngine::InitInstance() { m_hWnd = NULL; m_hWnd = CreateWindow(m_szWindowClass, m_szTitle, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, m_hInst, NULL); if (!m_hWnd) { return FALSE; } if(!ShowWindow(m_hWnd, m_nCmdShow)) { return false; } UpdateWindow(m_hWnd); return true; } // Message handler for about box. INT_PTR CALLBACK RenderEngine::About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { UNREFERENCED_PARAMETER(lParam); switch (message) { case WM_INITDIALOG: return (INT_PTR)TRUE; case WM_COMMAND: if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { EndDialog(hDlg, LOWORD(wParam)); return (INT_PTR)TRUE; } break; } return (INT_PTR)FALSE; } int RenderEngine::Run() { MSG msg; HACCEL hAccelTable; hAccelTable = LoadAccelerators(m_hInst, MAKEINTRESOURCE(IDC_RENDERENGINE)); // Main message loop: while (GetMessage(&msg, NULL, 0, 0)) { if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } return (int) msg.wParam; } and below is the code being used within the WinMain RenderEngine go; int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); // TODO: Place code here. RenderEngine::m_hInst = hInstance; go.m_nCmdShow = nCmdShow; if(!go.InitWindow()) { return 0; } go.Run(); return 0; } If anything does not make any sense, then I apologize, I am a newb. Thanks for the help!!

    Read the article

  • my window's handle is unused and cannot be evaluated

    - by numerical25
    I am trying to encapsulate my Win32 application into a class. My problem occurs when trying to initiate my primary window for the application below is my declaration and implementation... I notice the issue within my class method InitInstance(); declaration #pragma once #include "stdafx.h" #include "resource.h" #define MAX_LOADSTRING 100 class RenderEngine { protected: int m_width; int m_height; ATOM RegisterEngineClass(); public: static HINSTANCE m_hInst; HWND m_hWnd; int m_nCmdShow; TCHAR m_szTitle[MAX_LOADSTRING]; // The title bar text TCHAR m_szWindowClass[MAX_LOADSTRING]; // the main window class name bool InitWindow(); bool InitDirectX(); bool InitInstance(); //static functions static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); static INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); int Run(); }; implementation #include "stdafx.h" #include "RenderEngine.h" HINSTANCE RenderEngine::m_hInst = NULL; bool RenderEngine::InitWindow() { RenderEngine::m_hInst = NULL; // Initialize global strings LoadString(m_hInst, IDS_APP_TITLE, m_szTitle, MAX_LOADSTRING); LoadString(m_hInst, IDC_RENDERENGINE, m_szWindowClass, MAX_LOADSTRING); if(!RegisterEngineClass()) { return false; } if(!InitInstance()) { return false; } return true; } ATOM RenderEngine::RegisterEngineClass() { WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = RenderEngine::WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = m_hInst; wcex.hIcon = LoadIcon(m_hInst, MAKEINTRESOURCE(IDI_RENDERENGINE)); wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wcex.lpszMenuName = MAKEINTRESOURCE(IDC_RENDERENGINE); wcex.lpszClassName = m_szWindowClass; wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL)); return RegisterClassEx(&wcex); } LRESULT CALLBACK RenderEngine::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { int wmId, wmEvent; PAINTSTRUCT ps; HDC hdc; switch (message) { case WM_COMMAND: wmId = LOWORD(wParam); wmEvent = HIWORD(wParam); // Parse the menu selections: switch (wmId) { case IDM_ABOUT: DialogBox(m_hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About); break; case IDM_EXIT: DestroyWindow(hWnd); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } break; case WM_PAINT: hdc = BeginPaint(hWnd, &ps); // TODO: Add any drawing code here... EndPaint(hWnd, &ps); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } return 0; } bool RenderEngine::InitInstance() { m_hWnd = NULL;// When I step into my code it says on this line 0x000000 unused = ??? expression cannot be evaluated m_hWnd = CreateWindow(m_szWindowClass, m_szTitle, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, m_hInst, NULL); if (!m_hWnd)// At this point, memory has been allocated unused = ??. It steps over this { return FALSE; } if(!ShowWindow(m_hWnd, m_nCmdShow))// m_nCmdShow = 1 and m_hWnd is still unused and expression {//Still cannot be evaluated. This statement is true. and shuts down. return false; } UpdateWindow(m_hWnd); return true; } // Message handler for about box. INT_PTR CALLBACK RenderEngine::About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { UNREFERENCED_PARAMETER(lParam); switch (message) { case WM_INITDIALOG: return (INT_PTR)TRUE; case WM_COMMAND: if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { EndDialog(hDlg, LOWORD(wParam)); return (INT_PTR)TRUE; } break; } return (INT_PTR)FALSE; } int RenderEngine::Run() { MSG msg; HACCEL hAccelTable; hAccelTable = LoadAccelerators(m_hInst, MAKEINTRESOURCE(IDC_RENDERENGINE)); // Main message loop: while (GetMessage(&msg, NULL, 0, 0)) { if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } return (int) msg.wParam; } and my winMain function that calls the class // RenderEngine.cpp : Defines the entry point for the application. #include "stdafx.h" #include "RenderEngine.h" // Global Variables: RenderEngine go; int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); // TODO: Place code here. RenderEngine::m_hInst = hInstance; go.m_nCmdShow = nCmdShow; if(!go.InitWindow()) { return 0; } go.Run(); return 0; }

    Read the article

  • Repaint window problems

    - by nXqd
    #include "stdafx.h" // Mario Headers #include "GameMain.h" #define MAX_LOADSTRING 100 // Global Variables: HINSTANCE hInst; // current instance TCHAR szTitle[MAX_LOADSTRING]; // The title bar text TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name // Mario global variables ================= CGameMain* gGameMain; HWND hWnd; PAINTSTRUCT ps; // ======================================== // Forward declarations of functions included in this code module: ATOM MyRegisterClass(HINSTANCE hInstance); BOOL InitInstance(HINSTANCE, int); LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM); // My unprocess function ===================================== void OnCreate(HWND hWnd) { } void OnKeyUp(WPARAM wParam) { switch (wParam) { case VK_LEFT: gGameMain->KeyReleased(LEFT); break; case VK_UP: gGameMain->KeyReleased(UP); break; case VK_RIGHT: gGameMain->KeyReleased(RIGHT); break; case VK_DOWN: gGameMain->KeyReleased(DOWN); break; } } void OnKeyDown(HWND hWnd,WPARAM wParam) { switch (wParam) { case VK_LEFT: gGameMain->KeyPressed(LEFT); break; case VK_UP: gGameMain->KeyPressed(UP); break; case VK_RIGHT: gGameMain->KeyPressed(RIGHT); break; case VK_DOWN: gGameMain->KeyPressed(DOWN); break; } } void OnPaint(HWND hWnd) { HDC hdc = BeginPaint(hWnd,&ps); RECT rect; GetClientRect(hWnd,&rect); HDC hdcDouble = CreateCompatibleDC(hdc); HBITMAP hdcBitmap = CreateCompatibleBitmap(hdc,rect.right,rect.bottom); HBITMAP bmOld = (HBITMAP)SelectObject(hdcDouble, hdcBitmap); gGameMain->SetHDC(&hdcDouble); gGameMain->SendMessage(MESSAGE_PAINT); BitBlt(hdc,0,0,rect.right,rect.bottom,hdcDouble,0,0,SRCCOPY); SelectObject(hdcDouble,bmOld); DeleteDC(hdcDouble); DeleteObject(hdcBitmap); DeleteDC(hdc); } void OnDestroy() { gGameMain->isPlaying = false; EndPaint(hWnd,&ps); } // My unprocess function ===================================== ATOM MyRegisterClass(HINSTANCE hInstance) { WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = hInstance; wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_GDIMARIO)); wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wcex.lpszMenuName = MAKEINTRESOURCE(IDC_GDIMARIO); wcex.lpszClassName = szWindowClass; wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL)); return RegisterClassEx(&wcex); } BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) { hInst = hInstance; // Store instance handle in our global variable hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, WIDTH, HEIGHT, 0, NULL, hInstance, NULL); if (!hWnd) { return FALSE; } // ---------------- Start gdiplus ------------------ GdiplusStartup(&gdiToken,&gdiStartInput,NULL); // ------------------------------------------------- // Init GameMain gGameMain = new CGameMain(); ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd); return TRUE; } LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { int wmId, wmEvent; switch (message) { case WM_COMMAND: wmId = LOWORD(wParam); wmEvent = HIWORD(wParam); // Parse the menu selections: switch (wmId) { case IDM_ABOUT: DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About); break; case IDM_EXIT: DestroyWindow(hWnd); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } break; case WM_KEYDOWN: OnKeyDown(hWnd,wParam); break; case WM_KEYUP: OnKeyUp(wParam); break; case WM_CREATE: OnCreate(hWnd); break; case WM_PAINT: OnPaint(hWnd); break; case WM_DESTROY: OnDestroy(); PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } return 0; } // Message handler for about box. INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { UNREFERENCED_PARAMETER(lParam); switch (message) { case WM_INITDIALOG: return (INT_PTR)TRUE; case WM_COMMAND: if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { EndDialog(hDlg, LOWORD(wParam)); return (INT_PTR)TRUE; } break; } return (INT_PTR)FALSE; } int APIENTRY _tWinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPTSTR lpCmdLine,int nCmdShow) { UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); // TODO: Place code here. MSG msg; HACCEL hAccelTable; // Initialize global strings LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); LoadString(hInstance, IDC_GDIMARIO, szWindowClass, MAX_LOADSTRING); MyRegisterClass(hInstance); // Perform application initialization: if (!InitInstance (hInstance, nCmdShow)) { return FALSE; } hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_GDIMARIO)); // Main message loop: // GameLoop PeekMessage(&msg,NULL,0,0,PM_NOREMOVE); while (gGameMain->isPlaying) { while (PeekMessage(&msg,NULL,0,0,PM_REMOVE)) { if (msg.message == WM_QUIT) break; TranslateMessage(&msg); DispatchMessage(&msg); } if (gGameMain->enterNextState) { gGameMain->SendMessage(MESSAGE_ENTER); gGameMain->enterNextState = false; } gGameMain->SendMessage(MESSAGE_UPDATE); InvalidateRect(hWnd,NULL,FALSE); /*if (gGameMain->exitCurrentState) { gGameMain->SendMessage(MESSAGE_EXIT); gGameMain->enterNextState = true; gGameMain->exitCurrentState = false; }*/ ::Sleep(gGameMain->timer); // Do your game stuff here } GdiplusShutdown(gdiToken); // Shut down gdiplus token return (int) msg.wParam; } I use InvalidateRect(hWnd,NULL,FALSE); for repaint window, but the problem I met is when I repaint without any changes in Game struct . First it paints my logo well, the second time ( just call InvalidateRect(hWnd,NULL,FALSE); without gGameMain-SendMessage(MESSAGE_ENTER); which is init some variables for painting . Thanks for reading this :)

    Read the article

< Previous Page | 1 2